BACKPORT: x86/uaccess: Enable hardened usercopy
authorKees Cook <keescook@chromium.org>
Thu, 23 Jun 2016 22:04:01 +0000 (15:04 -0700)
committerSami Tolvanen <samitolvanen@google.com>
Tue, 6 Sep 2016 15:53:48 +0000 (15:53 +0000)
commit9c61fcc2b39760263436b13b97071ae6e8eeb5f2
tree91a5d918a3024ba50bb48e25891be9b67a6d6b2a
parentd677b3104d3c8e927211f20083a6c2e97e003b87
BACKPORT: 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>
Change-Id: I260db1d4572bdd2f779200aca99d03a170658440
(cherry picked from commit 5b710f34e194c6b7710f69fdb5d798fdf35b98c1)
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
arch/x86/Kconfig
arch/x86/include/asm/uaccess.h
arch/x86/include/asm/uaccess_32.h
arch/x86/include/asm/uaccess_64.h