Go to file
Ilya Leoshkevich 68378982f0 s390/bpf: Emit a barrier for BPF_FETCH instructions
BPF_ATOMIC_OP() macro documentation states that "BPF_ADD | BPF_FETCH"
should be the same as atomic_fetch_add(), which is currently not the
case on s390x: the serialization instruction "bcr 14,0" is missing.
This applies to "and", "or" and "xor" variants too.

s390x is allowed to reorder stores with subsequent fetches from
different addresses, so code relying on BPF_FETCH acting as a barrier,
for example:

  stw [%r0], 1
  afadd [%r1], %r2
  ldxw %r3, [%r4]

may be broken. Fix it by emitting "bcr 14,0".

Note that a separate serialization instruction is not needed for
BPF_XCHG and BPF_CMPXCHG, because COMPARE AND SWAP performs
serialization itself.

Fixes: ba3b86b9ce ("s390/bpf: Implement new atomic ops")
Reported-by: Puranjay Mohan <puranjay12@gmail.com>
Closes: https://lore.kernel.org/bpf/mb61p34qvq3wf.fsf@kernel.org/
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20240507000557.12048-1-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2024-05-12 16:55:57 -07:00
arch s390/bpf: Emit a barrier for BPF_FETCH instructions 2024-05-12 16:55:57 -07:00
block block-6.9-20240420 2024-04-20 11:28:02 -07:00
certs
crypto bpf-next-for-netdev 2024-04-29 13:12:19 -07:00
Documentation ARC: Add eBPF JIT support 2024-05-12 16:51:36 -07:00
drivers net: phy: micrel: Add support for PTP_PF_EXTTS for lan8814 2024-04-29 13:37:19 +01:00
fs Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-04-25 12:41:37 -07:00
include riscv, bpf: inline bpf_get_smp_processor_id() 2024-05-12 16:54:34 -07:00
init init/main.c: Fix potential static_command_line memory overflow 2024-04-13 00:59:36 +09:00
io_uring net: extend ubuf_info callback to ops structure 2024-04-22 16:21:35 -07:00
ipc sysctl: treewide: constify ctl_table_header::ctl_table_arg 2024-04-22 08:56:31 +01:00
kernel riscv, bpf: inline bpf_get_smp_processor_id() 2024-05-12 16:54:34 -07:00
lib bpf-next-for-netdev 2024-04-29 13:12:19 -07:00
LICENSES
mm mm/shmem: inline shmem_is_huge() for disabled transparent hugepages 2024-04-16 15:39:51 -07:00
net bpf: tcp: Allow to write tp->snd_cwnd_stamp in bpf_tcp_ca 2024-05-02 16:26:56 -07:00
rust
samples samples/bpf: Add valid info for VMLINUX_BTF 2024-04-29 16:10:03 -07:00
scripts kbuild,bpf: Switch to using --btf_features for pahole v1.26 and later 2024-05-09 14:44:35 -07:00
security
sound ALSA: seq: ump: Fix conversion from MIDI2 to MIDI1 UMP messages 2024-04-19 12:07:14 +02:00
tools selftests/bpf: Drop get_port in test_tcp_check_syncookie 2024-05-09 13:40:38 -07:00
usr
virt KVM: Drop unused @may_block param from gfn_to_pfn_cache_invalidate_start() 2024-04-11 12:58:53 -07:00
.clang-format
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap Including fixes from netfilter, wireless and bluetooth. 2024-04-25 11:19:38 -07:00
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS ARC: Add eBPF JIT support 2024-05-12 16:51:36 -07:00
Makefile Linux 6.9-rc5 2024-04-21 12:35:54 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.