x86/uaccess: Enable hardened usercopy
authorKees Cook <keescook@chromium.org>
Thu, 23 Jun 2016 22:04:01 +0000 (15:04 -0700)
committerKees Cook <keescook@chromium.org>
Tue, 26 Jul 2016 21:41:48 +0000 (14:41 -0700)
commit5b710f34e194c6b7710f69fdb5d798fdf35b98c1
treeed1e71a6c526cf24861803af7e48b81ce68e82b6
parentf5509cc18daa7f82bcc553be70df2117c8eedc16
x86/uaccess: Enable hardened usercopy

Enables CONFIG_HARDENED_USERCOPY checks on x86. This is done both in
copy_*_user() and __copy_*_user() because copy_*_user() actually calls
down to _copy_*_user() and not __copy_*_user().

Based on code from PaX and grsecurity.

Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
arch/x86/Kconfig
arch/x86/include/asm/uaccess.h
arch/x86/include/asm/uaccess_32.h
arch/x86/include/asm/uaccess_64.h