linux/arch/arm64
Mark Rutland 76624175dc 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>
2017-02-08 19:32:54 +00:00
..
boot Amlogic fixes for v4.10 2017-01-04 16:42:00 +01:00
configs ARM64: defconfig: enable DRM_MESON as module 2017-01-03 09:31:13 -08:00
crypto crypto: arm64/crc32 - accelerated support based on x86 SSE implementation 2016-12-07 20:01:22 +08:00
include arm64: uaccess: consistently check object sizes 2017-02-08 19:32:54 +00:00
kernel arm64: remove wrong CONFIG_PROC_SYSCTL ifdef 2017-02-08 14:57:39 +00:00
kvm arm64: KVM: Save/restore the host SPE state when entering/leaving a VM 2017-02-02 18:33:01 +00:00
lib arm64: don't pull uaccess.h into *.S 2016-12-26 13:05:17 -05:00
mm arm64: dma-mapping: Fix dma_mapping_error() when bypassing SWIOTLB 2017-01-26 12:25:14 +00:00
net arm64: bpf: optimize LD_ABS, LD_IND 2016-06-10 23:11:50 -07:00
xen arm64: don't pull uaccess.h into *.S 2016-12-26 13:05:17 -05:00
Kconfig arm64: mm: enable CONFIG_HOLES_IN_ZONE for NUMA 2017-02-06 18:51:50 +00:00
Kconfig.debug efi: arm64: Add vmlinux debug link to the Image binary 2017-02-03 15:22:37 +00:00
Kconfig.platforms ARM: SoC driver updates for v4.10 2016-12-15 16:03:25 -08:00
Makefile arm64: Add detection code for broken .inst support in binutils 2016-12-06 15:54:21 +00:00