BACKPORT: usercopy: fold builtin_const check into inline function
authorKees Cook <keescook@chromium.org>
Wed, 31 Aug 2016 23:04:21 +0000 (16:04 -0700)
committerSami Tolvanen <samitolvanen@google.com>
Thu, 8 Sep 2016 18:10:20 +0000 (18:10 +0000)
commit1fd70f71e8f428f0c191a6b86e72e700dbe34bed
tree6944861cfd0510830f5cfdc34258a961d9d502a2
parent1a4f17ec07cc4a938b6695e92e4f2b2ec7c3d527
BACKPORT: usercopy: fold builtin_const check into inline function

Instead of having each caller of check_object_size() need to remember to
check for a const size parameter, move the check into check_object_size()
itself. This actually matches the original implementation in PaX, though
this commit cleans up the now-redundant builtin_const() calls in the
various architectures.

Signed-off-by: Kees Cook <keescook@chromium.org>
Change-Id: I348809399c10ffa051251866063be674d064b9ff
(cherry picked from 81409e9e28058811c9ea865345e1753f8f677e44)
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
include/linux/thread_info.h