diff options
author | Mark Rutland <mark.rutland@arm.com> | 2017-02-07 12:33:55 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-02-08 19:32:54 +0000 |
commit | 76624175dcae6f7a808d345c0592908a15ca6975 (patch) | |
tree | ba9f758b22dbf8498a3b2694fe63c0dfbc2f2e14 /include/linux/iio/timer/stm32-timer-trigger.h | |
parent | 21bdbb7102edeaebb5ec4ef530c8f442f7562c96 (diff) |
arm64: uaccess: consistently check object sizes
Currently in arm64's copy_{to,from}_user, we only check the
source/destination object size if access_ok() tells us the user access
is permissible.
However, in copy_from_user() we'll subsequently zero any remainder on
the destination object. If we failed the access_ok() check, that applies
to the whole object size, which we didn't check.
To ensure that we catch that case, this patch hoists check_object_size()
to the start of copy_from_user(), matching __copy_from_user() and
__copy_to_user(). To make all of our uaccess copy primitives consistent,
the same is done to copy_to_user().
Cc: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'include/linux/iio/timer/stm32-timer-trigger.h')
0 files changed, 0 insertions, 0 deletions