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 <[email protected]>
Signed-off-by: James Morse <[email protected]>
[kees: adjusted naming and commit log]
Signed-off-by: Kees Cook <[email protected]>
This commit is contained in:
Sahara 2017-02-16 18:29:15 +00:00 • committed by Kees Cook
commit 96dc4f9fb6
3 changed files with 20 additions and 13 deletions

View file

@ -19,15 +19,9 @@
#include <linux/sched.h>
#include <linux/sched/task.h>
#include <linux/sched/task_stack.h>
#include <linux/thread_info.h>
#include <asm/sections.h>
enum {
BAD_STACK = -1,
NOT_STACK = 0,
GOOD_FRAME,
GOOD_STACK,
};
/*
* Checks if a given pointer and length is contained by the current
* stack frame (if possible).