diff options
| author | Uros Bizjak <ubizjak@gmail.com> | 2025-12-08 17:33:34 +0100 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2025-12-21 10:55:55 -0800 |
| commit | e09f6be4a3558e01afb4d16705ce57006a6f9712 (patch) | |
| tree | 249e41c8118b2b70c88ea6d88ddaa45409dccc42 /tools/testing | |
| parent | c2f2f005a1c2e2d06f07511068917fa729614c18 (diff) | |
x86/bpf: Avoid emitting LOCK prefix for XCHG atomic ops
The x86 XCHG instruction is implicitly locked when one of the
operands is a memory location, making an explicit LOCK prefix
unnecessary.
Stop emitting the LOCK prefix for BPF_XCHG in the JIT atomic
read-modify-write helpers. This avoids redundant instruction
prefixes while preserving correct atomic semantics.
No functional change for other atomic operations.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: https://lore.kernel.org/r/20251208163420.7643-1-ubizjak@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions
