Files
ack-tegra/include/linux
Thomas Gleixner 6149fc36c0 uaccess: Provide unsafe_atomic_store_release_user()
The upcoming support for unlocking robust futexes in the kernel requires
store release semantics. Syscalls do not imply memory ordering on all
architectures so the unlock operation requires a barrier.

This barrier can be avoided when stores imply release like on x86.

Provide a generic version with a smp_mb() before the unsafe_put_user(),
which can be overridden by architectures.

Provide also a ARCH_MEMORY_ORDER_TSO Kconfig option, which can be selected
by architectures with Total Store Order (TSO), where store implies release,
so that the smp_mb() in the generic implementation can be avoided.

If that is set a barrier() is used instead of smp_mb(), which is not
required for the use case at hand, but makes it future proof for other
usage to prevent the compiler from reordering.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: André Almeida <andrealmeid@igalia.com>
Link: https://patch.msgid.link/20260602090535.513181528@kernel.org
2026-06-03 11:38:50 +02:00
..
…
…
…
…
…
…
…
…
2026-04-02 15:52:49 +02:00
2026-03-18 15:11:40 +05:30
…
2026-03-19 23:55:27 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-04-03 16:53:50 -04:00
…
…
…
…
…
2026-04-07 08:22:24 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-04-04 08:10:37 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-03-31 19:15:21 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-04-16 07:03:40 -07:00
2026-03-23 13:33:51 -04:00
…
…
2026-04-07 17:38:07 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
2026-06-03 11:38:49 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-04-05 13:53:28 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-04-01 10:19:41 +02:00
…
…
…
…
…
…
…
…
…
2026-04-03 16:53:50 -04:00
2026-04-03 16:53:50 -04:00
…
…
…
…
…
2026-03-18 09:59:57 +00:00
…
…
…
…
…
…
2026-04-06 11:39:54 +02:00
2026-04-05 13:53:00 -07:00
…
…
2026-03-17 15:34:47 +05:30
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-03-27 07:35:05 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-04-05 13:53:10 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-04-20 11:35:17 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-03-27 17:14:31 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-03-31 07:04:00 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-03-25 20:11:29 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-03-23 12:41:58 +01:00
…
…
…
…
…
…
2026-03-13 08:22:54 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-04-06 09:06:39 +02:00
…
…
…
…
2026-03-30 16:43:24 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…