[lkml]   [2019]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[RFC PATCH 3/4] mm: Add kconfig entries for user stack pointer checking
Provide Kconfig entries to enable/disable user stack pointer checking
and also for architectures to expose the system call controls via
prctl() once they have augmented their system call entry path to perform
the necessary checks.

Cc: Kees Cook <>
Cc: Jann Horn <>
Cc: Andrew Morton <>
Cc: Matthew Wilcox <>
Cc: Michal Hocko <>
Cc: Peter Zijlstra <>
Signed-off-by: Will Deacon <>
mm/Kconfig | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

diff --git a/mm/Kconfig b/mm/Kconfig
index 25c71eb8a7db..35f044162501 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -758,4 +758,21 @@ config GUP_BENCHMARK

+ bool "Check user stack pointer points to stack pages"
+ depends on MMU
+ default y
+ help
+ This feature can be used to enforce that the user stack pointer
+ points to either the kernel-allocated user stack or a mapping
+ created with the MAP_STACK flag.
+ By default, no checks are performed, and an application must
+ opt-in via the PR_SP_CHECK prctl() system call if it wishes to
+ enable checking. Checking can be independently controlled for
+ system calls and page fault handling.
+ bool
 \ /
  Last update: 2019-02-11 19:00    [W:0.040 / U:26.220 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site