mirror-linux/arch/arm/lib
Mark Rutland ea1432a402 locking/atomic: arm: fix sync ops
[ Upstream commit dda5f312bb ]

The sync_*() ops on arch/arm are defined in terms of the regular bitops
with no special handling. This is not correct, as UP kernels elide
barriers for the fully-ordered operations, and so the required ordering
is lost when such UP kernels are run under a hypervsior on an SMP
system.

Fix this by defining sync ops with the required barriers.

Note: On 32-bit arm, the sync_*() ops are currently only used by Xen,
which requires ARMv7, but the semantics can be implemented for ARMv6+.

Fixes: e54d2f6152 ("xen/arm: sync_bitops")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230605070124.3741859-2-mark.rutland@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-19 16:21:02 +02:00
..
Makefile
ashldi3.S
ashrdi3.S
backtrace-clang.S ARM: implement IRQ stacks 2021-12-03 15:11:31 +01:00
backtrace.S ARM: implement IRQ stacks 2021-12-03 15:11:31 +01:00
bitops.h locking/atomic: arm: fix sync ops 2023-07-19 16:21:02 +02:00
bswapsdi2.S
call_with_stack.S ARM: 9233/1: stacktrace: Skip frame pointer boundary check for call_with_stack() 2022-10-04 11:09:47 +01:00
changebit.S
clear_user.S
clearbit.S
copy_from_user.S ARM: memcpy: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
copy_page.S
copy_template.S ARM: memcpy: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
copy_to_user.S ARM: memcpy: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
csumipv6.S
csumpartial.S
csumpartialcopy.S arm: propagate the calling convention changes down to csum_partial_copy_from_user() 2020-08-20 15:45:16 -04:00
csumpartialcopygeneric.S arm: propagate the calling convention changes down to csum_partial_copy_from_user() 2020-08-20 15:45:16 -04:00
csumpartialcopyuser.S arm: propagate the calling convention changes down to csum_partial_copy_from_user() 2020-08-20 15:45:16 -04:00
delay-loop.S
delay.c
div64.S
findbit.S ARM: findbit: fix overflowing offset 2022-07-29 09:54:26 +01:00
getuser.S
io-readsb.S
io-readsl.S
io-readsw-armv3.S
io-readsw-armv4.S
io-writesb.S
io-writesl.S
io-writesw-armv3.S
io-writesw-armv4.S
lib1funcs.S
lshrdi3.S
memchr.S
memcpy.S ARM: memcpy: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
memmove.S ARM: memmove: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
memset.S ARM: memset: clean up unwind annotations 2021-12-03 15:11:32 +01:00
muldi3.S
putuser.S
setbit.S
strchr.S
strrchr.S
testchangebit.S locking/atomic: arm: fix sync ops 2023-07-19 16:21:02 +02:00
testclearbit.S locking/atomic: arm: fix sync ops 2023-07-19 16:21:02 +02:00
testsetbit.S locking/atomic: arm: fix sync ops 2023-07-19 16:21:02 +02:00
uaccess_with_memcpy.c ARM: 9290/1: uaccess: Fix KASAN false-positives 2023-04-20 12:35:10 +02:00
ucmpdi2.S
xor-neon.c crypto: arm/xor - make vectorized C code Clang-friendly 2022-02-11 20:39:39 +11:00