All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/64: Define ILLEGAL_POINTER_VALUE for 64-bit
@ 2016-11-15 10:59 Michael Ellerman
  2016-12-03 11:28 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2016-11-15 10:59 UTC (permalink / raw)
  To: linuxppc-dev

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>
---
 arch/powerpc/Kconfig | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 65fba4c34cd7..87705c113452 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -548,6 +548,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
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: powerpc/64: Define ILLEGAL_POINTER_VALUE for 64-bit
  2016-11-15 10:59 [PATCH] powerpc/64: Define ILLEGAL_POINTER_VALUE for 64-bit Michael Ellerman
@ 2016-12-03 11:28 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2016-12-03 11:28 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev

On Tue, 2016-11-15 at 10:59:38 UTC, Michael Ellerman wrote:
> 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>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/f6853eb561fb9bfd56dfe0009f0ea2

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-03 11:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-15 10:59 [PATCH] powerpc/64: Define ILLEGAL_POINTER_VALUE for 64-bit Michael Ellerman
2016-12-03 11:28 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.