UPSTREAM: x86/uaccess: force copy_*_user() to be inlined
authorKees Cook <keescook@chromium.org>
Tue, 6 Sep 2016 18:56:01 +0000 (11:56 -0700)
committerSami Tolvanen <samitolvanen@google.com>
Thu, 8 Sep 2016 18:10:09 +0000 (18:10 +0000)
commit1a4f17ec07cc4a938b6695e92e4f2b2ec7c3d527
tree6e7538e434ce209de27992c31b58ab45a6221f7e
parentd942dd3b7c156b005bf01c33af729ab783182f4c
UPSTREAM: x86/uaccess: force copy_*_user() to be inlined

As already done with __copy_*_user(), mark copy_*_user() as __always_inline.
Without this, the checks for things like __builtin_const_p() won't work
consistently in either hardened usercopy nor the recent adjustments for
detecting usercopy overflows at compile time.

The change in kernel text size is detectable, but very small:

 text      data     bss     dec      hex     filename
12118735  5768608 14229504 32116847 1ea106f vmlinux.before
12120207  5768608 14229504 32118319 1ea162f vmlinux.after

Signed-off-by: Kees Cook <keescook@chromium.org>
Change-Id: I284c85c2a782145f46655a91d4f83874c90eba61
(cherry picked from commit e6971009a95a74f28c58bbae415c40effad1226c)
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
arch/x86/include/asm/uaccess.h