summaryrefslogtreecommitdiff
path: root/include/linux/thread_info.h
diff options
context:
space:
mode:
authorSahara <keun-o.park@darkmatter.ae>2017-02-16 18:29:15 +0000
committerKees Cook <keescook@chromium.org>2017-04-04 14:30:29 -0700
commit96dc4f9fb64690fc34410415fd1fc609cf803f61 (patch)
tree31971ed38668c7492910a70da3b6e1faf5f0509f /include/linux/thread_info.h
parent4495c08e84729385774601b5146d51d9e5849f81 (diff)
downloadlwn-96dc4f9fb64690fc34410415fd1fc609cf803f61.tar.gz
lwn-96dc4f9fb64690fc34410415fd1fc609cf803f61.zip
usercopy: Move enum for arch_within_stack_frames()
This patch moves the arch_within_stack_frames() return value enum up in the header files so that per-architecture implementations can reuse the same return values. Signed-off-by: Sahara <keun-o.park@darkmatter.ae> Signed-off-by: James Morse <james.morse@arm.com> [kees: adjusted naming and commit log] Signed-off-by: Kees Cook <keescook@chromium.org>
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 58373875e8ee..0dbe41be6181 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__