From 96dc4f9fb64690fc34410415fd1fc609cf803f61 Mon Sep 17 00:00:00 2001 From: Sahara Date: Thu, 16 Feb 2017 18:29:15 +0000 Subject: 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 Signed-off-by: James Morse [kees: adjusted naming and commit log] Signed-off-by: Kees Cook --- include/linux/thread_info.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/linux/thread_info.h') 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 + +/* + * 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 #ifdef __KERNEL__ -- cgit v1.2.3