aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/thread_info.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-02 10:45:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-02 10:45:15 -0700
commit5958cc49ed2961a059d92ae55afeeaba64a783a0 (patch)
treea67dee85e1188aff30af7b52224bf1b74608ef90 /include/linux/thread_info.h
parentMerge tag 'pstore-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux (diff)
parentmm/usercopy: Drop extra is_vmalloc_or_module() check (diff)
downloadwireguard-linux-5958cc49ed2961a059d92ae55afeeaba64a783a0.tar.xz
wireguard-linux-5958cc49ed2961a059d92ae55afeeaba64a783a0.zip
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/linux/thread_info.h')
-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__