diff options
author | Mark Rutland <mark.rutland@arm.com> | 2021-07-13 11:52:53 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-07-16 18:46:45 +0200 |
commit | cf3ee3c8c29dc349b2cf52e5e72e8cb805ff5e57 (patch) | |
tree | 3a341d32735ffce29fa67bc5bd0f84eb7fe2423d /security/tomoyo | |
parent | 67d1b0de258ad066e1fc85d0ceaa75e107fb45bb (diff) | |
download | linux-stable-cf3ee3c8c29dc349b2cf52e5e72e8cb805ff5e57.tar.gz linux-stable-cf3ee3c8c29dc349b2cf52e5e72e8cb805ff5e57.tar.bz2 linux-stable-cf3ee3c8c29dc349b2cf52e5e72e8cb805ff5e57.zip |
locking/atomic: add generic arch_*() bitops
Now that all architectures provide arch_atomic_long_*(), we can
implement the generic bitops atop these rather than atop
atomic_long_*(), and provide arch_*() forms of the bitops that are safe
to use in noinstr code.
Now that all architectures provide arch_atomic_long_*(), we can
build the generic arch_*() bitops atop these, which can be safely used
in noinstr code. The regular bitop wrappers are built atop these.
As the generic non-atomic bitops use plain accesses, these will be
implicitly instrumented unless they are inlined into noinstr functions
(which is similar to arch_atomic*_read() when based on READ_ONCE()).
The wrappers are modified so that where the underlying arch_*() function
uses a plain access, no explicit instrumentation is added, as this is
redundant and could result in confusing reports.
Since function prototypes get excessively long with both an `arch_`
prefix and `__always_inline` attribute, the return type and function
attributes have been split onto a separate line, matching the style of
the generated atomic headers.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210713105253.7615-6-mark.rutland@arm.com
Diffstat (limited to 'security/tomoyo')
0 files changed, 0 insertions, 0 deletions