BACKPORT: mm: Implement stack frame object validation
authorKees Cook <keescook@chromium.org>
Tue, 12 Jul 2016 23:19:48 +0000 (16:19 -0700)
committerSami Tolvanen <samitolvanen@google.com>
Tue, 6 Sep 2016 15:53:23 +0000 (15:53 +0000)
commitc30d7340ee0b167a45cd8d6d5c48add8f62db9a5
tree908a52d94320f9ef45ddb567c7ab7f8f8a483063
parent1e701cdc5bbce1f5561ee25ff8709a18dc0b2282
BACKPORT: mm: Implement stack frame object validation

This creates per-architecture function arch_within_stack_frames() that
should validate if a given object is contained by a kernel stack frame.
Initial implementation is on x86.

This is based on code from PaX.

Signed-off-by: Kees Cook <keescook@chromium.org>
Change-Id: I1f3b299bb8991d65dcdac6af85d633d4b7776df1
(cherry picked from commit 0f60a8efe4005ab5e65ce000724b04d4ca04a199)
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
arch/Kconfig
arch/x86/Kconfig
arch/x86/include/asm/thread_info.h
include/linux/thread_info.h