FreeBSD/src b75412f — sys/kern vfs_syscalls.c, sys/sys syscallsubr.h

kern_undelete: remove unused pathseg argument

I'd failed to pass it down to NDINIT, but nothing calls kern_uninit
with a path argument in sys space here or in CheriBSD so just drop it.

Effort:         CHERI upstreaming
Reported by:    llm-postcr
Sponsored by:   Innovate UK
Fixes:          7273d80ba18c ("vfs_syscalls.c: add kern_ and user_ implementations")
DeltaFile
+2-2sys/kern/vfs_syscalls.c
+1-2sys/sys/syscallsubr.h
+3-42 files

FreeBSD/src 53d8733 — sys/netipsec ipsec.c

ipsec: Do not reference the default policy for packets without a PCB

When no security policy matches a packet, ipsec[46]_getpolicy() returns
the default policy with a new reference, and the caller drops it right
after looking at the policy type.  Once any security policy is
configured, every forwarded packet goes through ip_forward() and
ipsec4_forward(), which checks the inbound and the outbound policy.
That is four atomic operations per packet on one reference count that
all CPUs write.

The default policy is allocated with its vnet and freed only when the
vnet goes away, and the sysctl limits it to NONE or DISCARD.  A packet
without a PCB has no policy cache to keep it in.  In that case, check
the policy type directly and take no reference, for NONE as well as for
DISCARD.  Packets with a PCB still take the reference, because the PCB
caches the policy.

No functional change intended.  DISCARD still drops the packet, and the
policy violation counters are incremented as before.

    [5 lines not shown]
DeltaFile
+30-6sys/netipsec/ipsec.c
+30-61 files

FreeBSD/src 0246afd — sys/conf files, sys/modules/zfs Makefile

zfs: add missing vdev_anyraid.c to module build after 013c77e66 merge
DeltaFile
+1-0sys/modules/zfs/Makefile
+1-0sys/conf/files
+2-02 files

FreeBSD/src d601628 — sys/kern kern_prot.c, sys/sys syscallsubr.h

freebsd14_[gs]groups: add kern_ and user_ implementations

Effort:         CHERI upstreaming
Sponsored by:   DARPA, AFRL
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2284
DeltaFile
+20-7sys/kern/kern_prot.c
+4-0sys/sys/syscallsubr.h
+24-72 files

FreeBSD/src 9f47314 — sys/kern kern_fork.c, sys/sys syscallsubr.h

pdrfork(2): add kern_pdrfork

Effort:         CHERI upstreaming
Sponsored by:   DARPA, AFRL
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2284
DeltaFile
+20-15sys/kern/kern_fork.c
+1-0sys/sys/syscallsubr.h
+21-152 files

FreeBSD/src b1482e0 — sys/kern sysv_shm.c, sys/sys syscallsubr.h

SysV SHM: make kern_shmat static

This is the opposite of most kern_ cases, but SysV IP is designed to be
loaded as a module and freebsd32 support lives inside the main
implementation file.  Arguably it should be in a seperate module with a
dependency, but that's a refactor for another day.

Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2284
DeltaFile
+0-2sys/sys/syscallsubr.h
+1-1sys/kern/sysv_shm.c
+1-32 files

FreeBSD/src 30d7590 — sys/kern kern_exit.c, sys/sys syscallsubr.h

pdwait(2): add user_pdwait

Effort:         CHERI upstreaming
Sponsored by:   DARPA, AFRL
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2284
DeltaFile
+21-11sys/kern/kern_exit.c
+2-0sys/sys/syscallsubr.h
+23-112 files

FreeBSD/src 965170d — sys/sys syscallsubr.h, sys/vm swap_pager.c

swap{on,off}(2): add/expose kern_ implementations

Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2284
DeltaFile
+9-2sys/vm/swap_pager.c
+3-0sys/sys/syscallsubr.h
+12-22 files

FreeBSD/src 2b85ea0 — sys/cddl/compat/opensolaris/kern opensolaris.c

zfs: fix build after recent import

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+0-2sys/cddl/compat/opensolaris/kern/opensolaris.c
+0-21 files

FreeBSD/src 29b2402 — sys/contrib/openzfs/cmd/zfs zfs_main.c, sys/contrib/openzfs/cmd/zpool zpool_main.c

zfs: merge openzfs/zfs at 013c77e66

Notable upstream pull request merges:
 #17567 816804dfd Add support for anyraid vdevsG
 #18826 -multiple FDT: don't extend dedup across RAIDZ expansion
 #18861 1ff8fc14a Fix out-of-bound access when resizing in receive_spill
 #19026 518021947 Add alloc factor logic
 #19091 e056f4df3 don't send spill or oversized blocks as WRITE_EMBEDDED
 #19125 6d5d3f635 Wait for the txg-time database write before setting
                  spa_final_txg
 #19170 b060bcb1d zio: drop a queued scan read only when its block is freed
 #19171 3db7dde41 dsl_scan: resume a scan which suspends at the origin
                  snapshot
 #19178 497f28f07 vdev_raidz: keep unverified dRAID rebuild repairs
                  speculative
 #19188 5f1957a15 spa: number new txgs above every uberblock on disk
 #19190 495d09b51 Export zpool_valid_proplist from libzfs
 #19191 ed07ad74e zdb: Lower eviction timeouts on prefetched data
 #19192 86b3fb1f4 Build the pool stats config without the namespace lock

    [161 lines not shown]
DeltaFile
+1,043-1,051sys/contrib/openzfs/cmd/zpool/zpool_main.c
+1,948-66sys/contrib/openzfs/lib/libnvpair/libnvpair.abi
+1,773-0sys/contrib/openzfs/module/zfs/vdev_anyraid.c
+650-647sys/contrib/openzfs/cmd/zfs/zfs_main.c
+559-650sys/contrib/openzfs/lib/libzfs/libzfs.abi
+501-397sys/contrib/openzfs/lib/libzfs/libzfs_pool.c
+6,474-2,811706 files not shown
+37,206-14,722712 files

FreeBSD/src 1ebf46e — sys/kern kern_module.c

modstat: don't copyout while holding a lock

If a user arranges for a page fault to never be filled (e.g., via a
FUSE file system), this can hold the shared lock forever.

To make this all work, refactor kern_modstat and freebsd32_modstat to
malloc a temporary buffer and fill it before copying it out rather
than doing a bunch of copies.

Add COMPAT_* ifdefs around compat code.  The module_stat_v1 code is
really for a.out binaries in practice and thus a bit questionable.

Reviewed by:    markj
Reported by:    llm-postcr
Sponsored by:   Innovate UK
Fixes:          7f8c2056db1e ("modstat: avoid copying from freed memory")
Differential Revision:  https://reviews.freebsd.org/D61432
DeltaFile
+153-108sys/kern/kern_module.c
+153-1081 files

FreeBSD/src f20c712 — sys/kern vfs_extattr.c, sys/sys syscallsubr.h

extattr*(2): add kern_ and user_ implementaions

Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2284
DeltaFile
+69-45sys/kern/vfs_extattr.c
+20-0sys/sys/syscallsubr.h
+89-452 files

FreeBSD/src 622365c — sys/kern kern_ntptime.c, sys/sys syscallsubr.h

ntp_gettime(2): add kern_ntp_gettime

Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2284
DeltaFile
+7-1sys/kern/kern_ntptime.c
+2-0sys/sys/syscallsubr.h
+9-12 files

FreeBSD/src 7273d80 — sys/kern vfs_syscalls.c, sys/sys syscallsubr.h

vfs_syscalls.c: add kern_ and user_ implementations

Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2284
DeltaFile
+123-57sys/kern/vfs_syscalls.c
+30-3sys/sys/syscallsubr.h
+153-602 files

FreeBSD/src 7ca5de2 — sys/kern vfs_cache.c, sys/sys syscallsubr.h

__getcwd(2), __getrealpath(2); add kern_ implementations

This corrects a accidentialy introduced definition of kern___getcwd.

Effort:         CHERI upstreaming
Fixes:          d718de812fe1 ("Introduce kern_mmap_req().")
Sponsored by:   DARPA, AFRL, Innovate UK
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2284
DeltaFile
+8-4sys/kern/vfs_cache.c
+3-2sys/sys/syscallsubr.h
+11-62 files

FreeBSD/src 87d8a91 — sys/kern vfs_mount.c, sys/sys syscallsubr.h

nmount(2): add kern_nmount

Effort:         CHERI UK
Sponsored by:   Innovate UK
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2284
DeltaFile
+12-6sys/kern/vfs_mount.c
+2-0sys/sys/syscallsubr.h
+14-62 files

FreeBSD/src c1dbf3f — sys/dev/clk/allwinner ccu_h6.c

aw_ccu: h6: Use the 1x PLL_PERIPH as parents of the MMC clocks

The MMC clocks of the H6 have the doubled outputs of the PLL_PERIPH0
and PLL_PERIPH1 as inputs of their mux, followed by a fixed post divider
of 2 that the driver does not know about.  The rate it computed was
twice the real one: on a Pine H64 the SD card requested at 50MHz and the
eMMC at 52MHz ran at half of that, and transfers at about half the speed
they should reach.  U-Boot does the same compensation, as it pretends
the parent is the 1x PLL.

Name the 1x PLLs as parents, like the H3 driver does.  The position in
the mux is the same.

Tested on: H6
DeltaFile
+6-1sys/dev/clk/allwinner/ccu_h6.c
+6-11 files

FreeBSD/src aa70464 — sys/arm/allwinner/h6 h6_r_padconf.c

allwinner: h6: Put the PM pins in bank M

The PM0 to PM4 entries of the pad table of the R_PIO controller had port
0 and pin 0, copied from the PL ones, so no pin could be found for a
<&r_pio 1 N> specifier.  On the Pine H64 model B the reset GPIO of the
SDIO WiFi power sequence is PM3, and the kernel panicked in
mmc_pwrseq_attach() with "invalid pin" as the pin number was never set.

Use port 1 and the real pin numbers, like the PL entries do with port 0.

Tested on: H6
DeltaFile
+5-5sys/arm/allwinner/h6/h6_r_padconf.c
+5-51 files

FreeBSD/src 256d628 — sys/arm/allwinner aw_gpio.c

aw_gpio: Fail when a pin cannot be mapped

aw_gpio_map_gpios() returned success without setting the pin when no
entry of the pad table matched the bank and pin of the specifier, so
the caller went on with whatever was in its variable.  Return EINVAL.

Tested on: H6
DeltaFile
+3-3sys/arm/allwinner/aw_gpio.c
+3-31 files

FreeBSD/src ba775ce — sys/dev/clk/allwinner ccu_h6.c

aw_ccu: h6: Add the HDMI CEC clock

Add the HDMI CEC clock, a mux and a gate.  Its second parent is
PLL_PERIPH0(2X) divided by a fixed 36621, which gives about 32.768kHz,
so add this division as a fixed clock.

Tested on: H6
DeltaFile
+23-0sys/dev/clk/allwinner/ccu_h6.c
+23-01 files

FreeBSD/src 31f2b82 — sys/dev/clk/allwinner ccu_h6.c

aw_ccu: h6: Document why the UART gates are not enabled

Enabling the gates makes uart_snps get the clock rate from the CCU, it
then detects a 256 bytes FIFO and the input of the console is delayed:
a character is only seen when the next one is typed.  Explain it in the
comment instead of the old "weird behavior".

Tested on: H6
DeltaFile
+6-1sys/dev/clk/allwinner/ccu_h6.c
+6-11 files

FreeBSD/src 333b4fd — sys/dev/clk/allwinner ccu_h6.c

aw_ccu: h6: Add the CSI clocks

Add the CCI gate, the TOP and MCLK clocks, and the bus gate and reset of
the CSI.  The mux of the TOP clock has no parent for the value 1.

Tested on: H6
DeltaFile
+32-0sys/dev/clk/allwinner/ccu_h6.c
+32-01 files

FreeBSD/src df6fa02 — sys/dev/clk/allwinner ccu_h6.c

aw_ccu: h6: Add the HDMI, TCON and HDCP clocks

Add the module clocks, bus gates and resets of HDMI, TCON LCD0, TCON
TV0 and HDCP, and the HDMI slow clock.  The TCON LCD clock has no
divider.

The HDMI CEC clock is not added, its second parent is PLL_PERI0(2X)
divided by 36621, which needs a fixed pre-divider.

Tested on: H6
DeltaFile
+80-0sys/dev/clk/allwinner/ccu_h6.c
+80-01 files

FreeBSD/src b1fdc48 — sys/dev/clk/allwinner ccu_h6.c

aw_ccu: h6: Add the DE, DI, GPU, CE, VE, EMCE and VP9 clocks

Add the module clocks, bus gates and resets of the display engine, the
deinterlacer, the GPU, the crypto engine, the video engine, the EMCE
and the VP9 decoder.

Tested on: H6
DeltaFile
+114-0sys/dev/clk/allwinner/ccu_h6.c
+114-01 files

FreeBSD/src 69919ba — sys/dev/clk/allwinner ccu_h6_r.c

aw_ccu: h6: Add the IR, W1, RSB and RTC clocks of the R CCU

Add the IR and 1-wire module clocks, which are a gate, a mux, a power
of two N and a M, the RSB and RTC bus gates and the RSB reset.

The manual does not document the registers of the R CCU, the offsets
and the fields are the ones used by Linux.

Tested on: H6
DeltaFile
+28-0sys/dev/clk/allwinner/ccu_h6_r.c
+28-01 files

FreeBSD/src 4b958e7 — sys/dev/clk/allwinner ccu_h6.c

aw_ccu: h6: Add the PCIe clocks

Add the 100MHz reference clock, which is PLL_PERIPH0(4X) divided by 24,
its two gates, the MAXI and AUX clocks, and the bus gate and the two
resets of PCIe.

Tested on: H6
DeltaFile
+44-0sys/dev/clk/allwinner/ccu_h6.c
+44-01 files

FreeBSD/src 6019034 — sys/dev/clk/allwinner ccu_h6.c ccu_h6_r.c

aw_ccu: h6: Fix the id of PLL_DE and the names of the R_APB2 gates

CLK_PLL_DE had the same id as CLK_PLL_VE, 14, so two clocks of the CCU
shared an id.  Use 15 as the Linux driver does.

The gates of the R_APB2 UART and I2C were named r_apb1-uart and
r_apb1-i2c, but their parent is r_apb2.  Name them after it.

Tested on: H6
DeltaFile
+2-2sys/dev/clk/allwinner/ccu_h6_r.c
+1-1sys/dev/clk/allwinner/ccu_h6.c
+3-32 files

FreeBSD/src 6f35f21 — sys/dev/clk/allwinner ccu_h6.c

aw_ccu: h6: Add the DRAM clock

Add the DRAM clock, which is PLL_DDR0 divided by 1 to 4, and the bus
gate and the reset of the DRAM.  The firmware sets up the DRAM, they are
not meant to be changed.

Tested on: H6
DeltaFile
+19-0sys/dev/clk/allwinner/ccu_h6.c
+19-01 files

FreeBSD/src 4ba979e — sys/dev/clk/allwinner ccu_h6.c

aw_ccu: h6: Add the PWM, IOMMU and THS clocks

Add the bus gates and the resets of the PWM controller, the IOMMU and
the thermal sensor.  They are on the APB1 bus.

The manual has no reset for the IOMMU but the binding has one and Linux
uses the bit 16 of its register for it.  This bit cannot be written, so
this reset does nothing.

Tested on: H6
DeltaFile
+22-0sys/dev/clk/allwinner/ccu_h6.c
+22-01 files

FreeBSD/src 9d30cc3 — sys/dev/clk/allwinner ccu_h6.c

aw_ccu: h6: Add the SPI, NAND, SCR, TS and CIR-TX clocks

Add the module clocks of NAND0, NAND1, SPI0, SPI1, TS and CIR-TX,
which are all a gate, a mux, a power of two N and a M.  Also add the
bus gates and resets of NAND, SCR, SPI, TS and CIR-TX.

Tested on: H6
DeltaFile
+105-0sys/dev/clk/allwinner/ccu_h6.c
+105-01 files