summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/Kconfig
diff options
context:
space:
mode:
authorMichael Ellerman2016-11-15 11:59:38 +0100
committerMichael Ellerman2016-12-02 03:01:04 +0100
commitf6853eb561fb9bfd56dfe0009f0ea27540937bd5 (patch)
tree6a018bfd5c2be4e74a16eb5bfbc619c3f1f4a52c /arch/powerpc/Kconfig
parentpowerpc Don't print misleading facility name in facility unavailable exception (diff)
downloadkernel-qcow2-linux-f6853eb561fb9bfd56dfe0009f0ea27540937bd5.tar.gz
kernel-qcow2-linux-f6853eb561fb9bfd56dfe0009f0ea27540937bd5.tar.xz
kernel-qcow2-linux-f6853eb561fb9bfd56dfe0009f0ea27540937bd5.zip
powerpc/64: Define ILLEGAL_POINTER_VALUE for 64-bit
This is used in poison.h to offset poison values so that they don't point directly into user space. The value we choose sits roughly between user and kernel space, which means on their own the poison values don't point anywhere useful. If an attacker can cause an access at some offset from the poison value then we may still be in trouble, but by putting the poison values between user and kernel space we maximise the required size of that offset. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/Kconfig')
-rw-r--r--arch/powerpc/Kconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 48923c349ccb..48001e754ff2 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -580,6 +580,13 @@ config ARCH_SPARSEMEM_DEFAULT
config SYS_SUPPORTS_HUGETLBFS
bool
+config ILLEGAL_POINTER_VALUE
+ hex
+ # This is roughly half way between the top of user space and the bottom
+ # of kernel space, which seems about as good as we can get.
+ default 0x5deadbeef0000000 if PPC64
+ default 0
+
source "mm/Kconfig"
config ARCH_MEMORY_PROBE