android_kernel_samsung_msm8976/arch/arm64
Mark Rutland 4b1500d4f8 arm64: vdso: fix clock_getres for 4GiB-aligned res
commit c80ed088a519da53f27b798a69748eaabc66aadf upstream.

The vdso tries to check for a NULL res pointer in __kernel_clock_getres,
but only checks the lower 32 bits as is uses CBZ on the W register the
res pointer is held in.

Thus, if the res pointer happened to be aligned to a 4GiB boundary, we'd
spuriously skip storing the timespec to it, while returning a zero error code
to the caller.

Prevent this by checking the whole pointer, using CBZ on the X register
the res pointer is held in.

Fixes: 9031fefde6 ("arm64: VDSO support")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reported-by: Andrew Pinski <apinski@cavium.com>
Reported-by: Mark Salyzyn <salyzyn@android.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 21:46:04 +02:00
..
boot Import latest Samsung release 2017-04-18 03:43:52 +02:00
configs defconfig: Remove CONFIG_SND_SOC_MSM8X16 2019-07-27 21:45:56 +02:00
crypto crypto: arm64/crc32 - bring in line with generic CRC32 2017-04-18 12:17:34 +02:00
include arm64/ptrace: Avoid uninitialised struct padding in fpr_set() 2019-07-27 21:43:00 +02:00
kernel arm64: vdso: fix clock_getres for 4GiB-aligned res 2019-07-27 21:46:04 +02:00
kvm
lib arm64: strcmp: align to 64B cache line 2017-04-18 12:17:54 +02:00
mm Revert "arm64: mm: ensure that the zero page is visible to the page table walker" 2017-04-18 17:24:53 +02:00
xen
Kconfig Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD 2017-04-18 17:02:28 +02:00
Kconfig.debug arm64: Disable Samsung security restrictions by default 2017-04-18 04:44:48 +02:00
Makefile Import latest Samsung release 2017-04-18 03:43:52 +02:00