1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00
freebsd/sys
Andrew Turner 39757e1068 buf_ring: Ensure correct ordering of loads
When enqueueing on an architecture with a weak memory model ensure
loading br->br_prod_head and br->br_cons_tail are ordered correctly.

If br_cons_tail is loaded first then other threads may perform a
dequeue and enqueue before br_prod_head is loaded. This will mean the
tail is one less than it should be and the code under the
prod_next == cons_tail check could incorrectly be skipped.

buf_ring_dequeue_mc has the same issue with br->br_prod_tail and
br->br_cons_head so needs the same fix.

Reported by:	Ali Saidi <alisaidi@amazon.com>
Co-developed by: Ali Saidi <alisaidi@amazon.com>
Reviewed by:	imp, kib, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D46155

(cherry picked from commit fe2445f47d)
2024-09-02 10:11:57 +01:00
..
amd64 amd64 GENERIC: Switch uart hints from "isa" to "acpi" 2024-07-23 09:29:17 -04:00
arm arm: Add a missing interrupt to the generic timer 2024-07-15 13:34:29 +01:00
arm64 arm64: Ensure sctlr and pstate are in known states 2024-09-02 10:11:57 +01:00
bsm
cam ctl: avoid heap info leak in ctl_request_sense 2024-08-26 09:28:17 -04:00
cddl
compat linuxkpi: use canonical tests for is_{zero,broadcast}_ether_addr 2024-08-11 19:03:42 -04:00
conf Post-13.4-branch updates 2024-08-01 17:07:12 -07:00
contrib Fix enum warnings in ath_hal's ar9300 2024-08-13 11:24:16 +02:00
crypto
ddb
dev dev/uart: Add APMC0D08 as found in the Intel E2100 2024-09-02 10:11:57 +01:00
dts
fs nfsproto.h: Define the new mode_umask attribute 2024-08-30 19:02:57 -07:00
gdb
geom
gnu
i386 Adjust comments referencing vm_mem_init() 2024-06-06 12:54:35 -03:00
isa
kern kern: Align the declaration of kernconfstring with its definition 2024-09-02 13:03:41 +08:00
kgssapi
libkern
mips
modules ice_ddp: Update package to 1.3.36.0 2024-07-30 21:29:15 -07:00
net fibs: Limit the WARNING message to only once when setting up with multiple fibs 2024-08-02 02:04:54 +08:00
net80211 net80211: Correct a comment 2024-06-25 12:27:06 +08:00
netgraph
netinet tcp: fix format of sysctl variable 2024-08-30 08:47:03 +02:00
netinet6 sctp(4): Fix typos in source code comments 2024-08-12 14:53:15 +02:00
netipsec
netlink
netpfil pf: cope with SCTP port re-use 2024-08-27 14:17:59 +02:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed ibcore: Mark write-only variables 2024-07-15 13:35:21 +01:00
opencrypto
powerpc Adjust comments referencing vm_mem_init() 2024-06-06 12:54:35 -03:00
riscv Adjust comments referencing vm_mem_init() 2024-06-06 12:54:35 -03:00
rpc
security
sys buf_ring: Ensure correct ordering of loads 2024-09-02 10:11:57 +01:00
teken
tests
tools
ufs Do not allow snapshots on UFS filesystems using gjournal. 2024-07-28 12:06:52 -07:00
vm vm: Add kva_alloc_aligned 2024-09-02 10:11:57 +01:00
x86 Increase IOAPIC_MAX_ID to 255 (from 254) 2024-05-27 11:25:28 -04:00
xdr
xen
Makefile
README.md

FreeBSD Kernel Source:

This directory contains the source files and build glue that make up the FreeBSD kernel and its modules, including both original and contributed software.

Kernel configuration files are located in the conf/ subdirectory of each architecture. GENERIC is the configuration used in release builds. NOTES contains documentation of all possible entries. LINT is a compile-only configuration used to maximize build coverage and detect regressions.

Documentation:

Source code documentation is maintained in a set of man pages, under section 9. These pages are located in share/man/man9, from the top-level of the src tree. Consult intro(9) for an overview of existing pages.

Some additional high-level documentation of the kernel is maintained in the Architecture Handbook.

Source Roadmap:

Directory Description
amd64 AMD64 (64-bit x86) architecture support
arm 32-bit ARM architecture support
arm64 64-bit ARM (AArch64) architecture support
cam Common Access Method storage subsystem - cam(4) and ctl(4)
cddl CDDL-licensed optional sources such as DTrace
conf kernel build glue
compat Linux compatibility layer, FreeBSD 32-bit compatibility
contrib 3rd-party imported software such as OpenZFS
crypto crypto drivers
ddb interactive kernel debugger - ddb(4)
fs most filesystems, excluding UFS, NFS, and ZFS
dev device drivers
gdb kernel remote GDB stub - gdb(4)
geom GEOM framework - geom(4)
i386 i386 (32-bit x86) architecture support
kern main part of the kernel
libkern libc-like and other support functions for kernel use
modules kernel module infrastructure
net core networking code
net80211 wireless networking (IEEE 802.11) - net80211(4)
netgraph graph-based networking subsystem - netgraph(4)
netinet IPv4 protocol implementation - inet(4)
netinet6 IPv6 protocol implementation - inet6(4)
netipsec IPsec protocol implementation - ipsec(4)
netpfil packet filters - ipfw(4), pf(4), and ipfilter(4)
opencrypto OpenCrypto framework - crypto(7)
powerpc PowerPC/POWER (32 and 64-bit) architecture support
riscv 64-bit RISC-V architecture support
security security facilities - audit(4) and mac(4)
sys kernel headers
tests kernel unit tests
ufs Unix File System - ffs(7)
vm virtual memory system
x86 code shared by AMD64 and i386 architectures