diff options
author | Dong Bo <dongbo4@huawei.com> | 2017-04-25 14:11:29 +0800 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-05-30 11:07:41 +0100 |
commit | 48f99c8ec0b25756d0283ab058826ae07d14fad7 (patch) | |
tree | a61ab57045e1c1e367453038788073d3d0333d55 /arch/arm64/kernel/probes/kprobes.c | |
parent | 5ed02dbb497422bf225783f46e6eadd237d23d6b (diff) | |
download | op-kernel-dev-48f99c8ec0b25756d0283ab058826ae07d14fad7.zip op-kernel-dev-48f99c8ec0b25756d0283ab058826ae07d14fad7.tar.gz |
arm64: Preventing READ_IMPLIES_EXEC propagation
Like arch/arm/, we inherit the READ_IMPLIES_EXEC personality flag across
fork(). This is undesirable for a number of reasons:
* ELF files that don't require executable stack can end up with it
anyway
* We end up performing un-necessary I-cache maintenance when mapping
what should be non-executable pages
* Restricting what is executable is generally desirable when defending
against overflow attacks
This patch clears the personality flag when setting up the personality for
newly spwaned native tasks. Given that semi-recent AArch64 toolchains emit
a non-executable PT_GNU_STACK header, userspace applications can already
not rely on READ_IMPLIES_EXEC so shouldn't be adversely affected by this
change.
Cc: <stable@vger.kernel.org>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Dong Bo <dongbo4@huawei.com>
[will: added comment to compat code, rewrote commit message]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/probes/kprobes.c')
0 files changed, 0 insertions, 0 deletions