summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-02 20:45:15 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-02 20:45:15 +0300
commit5958cc49ed2961a059d92ae55afeeaba64a783a0 (patch)
treea67dee85e1188aff30af7b52224bf1b74608ef90 /include
parent2575be8ad32f9910d7e7c118e73f529b8d5b8b7b (diff)
parent517e1fbeb65f5eade8d14f46ac365db6c75aea9b (diff)
downloadlinux-5958cc49ed2961a059d92ae55afeeaba64a783a0.tar.xz
Merge tag 'usercopy-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull hardened usercopy updates from Kees Cook: "A couple hardened usercopy changes: - drop now unneeded is_vmalloc_or_module() check (Laura Abbott) - use enum instead of literals for stack frame API (Sahara)" * tag 'usercopy-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: mm/usercopy: Drop extra is_vmalloc_or_module() check usercopy: Move enum for arch_within_stack_frames()
Diffstat (limited to 'include')
-rw-r--r--include/linux/thread_info.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index 55125d674338..d7d3ea637dd0 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -22,6 +22,18 @@
#endif
#include <linux/bitops.h>
+
+/*
+ * For per-arch arch_within_stack_frames() implementations, defined in
+ * asm/thread_info.h.
+ */
+enum {
+ BAD_STACK = -1,
+ NOT_STACK = 0,
+ GOOD_FRAME,
+ GOOD_STACK,
+};
+
#include <asm/thread_info.h>
#ifdef __KERNEL__