Thread (1 message) 1 message, 1 author, 2017-05-05
DORMANTno replies

[PATCH 4/6] arm64: armv8_deprecated: ensure extension of addr

From: Punit Agrawal <hidden>
Date: 2017-05-05 14:51:05

Mark Rutland [off-list ref] writes:
Our compat swp emulation holds the compat user address in an unsigned
int, which it passes to __user_swpX_asm(). When a 32-bit value is passed
in a register, the upper 32 bits of the register are unknown, and we
must extend the value to 64 bits before we can use it as a base address.

This patch casts the address to unsigned long to ensure it has been
suitably extended, avoiding the potential issue, and silencing a related
warning from clang.

Fixes: bd35a4adc4131c53 ("arm64: Port SWP/SWPB emulation support from arm")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Matthias Kaehlcke <mka@chromium.org>
Cc: Punit Agrawal <redacted>
Cc: Will Deacon <redacted>
From the description, the problem looks quite serious. I'm surprised
this hasn't exploded before.

FWIW,

        Acked-by: Punit Agrawal [off-list ref]

Thanks!


[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help