FreeBSD/src fc3907clib/libutil fparseln.3 fparseln.c

fparseln: Update license

Remove 3rd and 4th clauses in christos' license. OK christos.

Obtained from:  NetBSD
DeltaFile
+2-8lib/libutil/fparseln.3
+2-7lib/libutil/fparseln.c
+4-152 files

FreeBSD/src 9a39435lib/libutil fparseln.3 fparseln.c

Revert "fparseln: Update NetBSD version strings"

This reverts commit 1a968da448b0795184884ffe428fb24d7e695628.

I was mistakenly looking at the version strings in the CVS attic
but the function was moved to libc/stdio where it matches the
current string.
DeltaFile
+1-1lib/libutil/fparseln.3
+1-1lib/libutil/fparseln.c
+2-22 files

FreeBSD/src 1a968dalib/libutil fparseln.3 fparseln.c

fparseln: Update NetBSD version strings

The correponding changes (mostly ANSIfication) were done long ago locally.
No functional change.

Obtained from:  NetBSD (libutil CVS Attic)
DeltaFile
+1-1lib/libutil/fparseln.3
+1-1lib/libutil/fparseln.c
+2-22 files

FreeBSD/src 048ad7asbin/ifconfig af_inet.c

ifconfig: Fix default netmask calculation

Reported by:    phk
Reviewed by:    emaste, kp
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D45570

(cherry picked from commit 8a9f0fa42b1c6cffd45459bb552e138083b00369)
DeltaFile
+4-4sbin/ifconfig/af_inet.c
+4-41 files

FreeBSD/src d0cb467sys/dev/hyperv/vmbus vmbus.c hyperv_mmu.c

Hyper-V: move memory alloc call for tlb hypercall out of smp_rendezvous

The allocation call could result in sleep lock violation if it is in
smp_rendezvous. Move it out. Also move the pcpu memory pointer to
vmbus_pcpu_data since it is only used on Hyper-V.

PR:             279738
Reported by:    gbe
Fixes:          2b887687edc25bb4553f0d8a1183f454a85d413d
MFC after:      2 weeks
Sponsored by:   Microsoft
DeltaFile
+66-24sys/dev/hyperv/vmbus/vmbus.c
+3-3sys/dev/hyperv/vmbus/hyperv_mmu.c
+3-2sys/dev/hyperv/vmbus/vmbus_var.h
+72-293 files

FreeBSD/src 35e9830sys/dev/md md.c

md: round-trip the MUSTDEALLOC and RESERVE options

If those options are requested when the device is created, ensure that
they will be reported by MDIOCQUERY.

Reviewed by:    imp
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1270

(cherry picked from commit 9d449caddd4f442ba4ebfd2edafa1aef4fcba4c8)
DeltaFile
+2-2sys/dev/md/md.c
+2-21 files

FreeBSD/src d26c565tools/test/stress2/misc umountf2.sh

stress2: Revert change accidentally added in ff4a72c159e0
DeltaFile
+1-2tools/test/stress2/misc/umountf2.sh
+1-21 files

FreeBSD/src ad9cc86sys/compat/linux linux_ioctl.c linux_ioctl.h

linux: Translate Linux NVME ioctls to the lower layers.

The lower layers implement a ABI compatible Linux ioctl for a few of the
Linux IOCTLs. Translate them and pass them down. Since they are ABI
compatible, just use the nvme ioctl name.

Co-Authored-by: Warner Losh <imp at bsdimp.com>
Reviewed by:    chuck
Differential Revision:  https://reviews.freebsd.org/D45416
DeltaFile
+35-0sys/compat/linux/linux_ioctl.c
+14-0sys/compat/linux/linux_ioctl.h
+49-02 files

FreeBSD/src 1bce7cdsys/dev/nvme nvme_ctrlr.c nvme_linux.h

nvme: Add Linux copatible ioctls

Add the NVME_IOCTL_ID, NVME_IOCTL_ADMIN_CMD, and NVME_IOCTL_IO_CMD Linux
compatible ioctls. These may be run on either an I/O (ns) dev or a nvme
(admin) dev. Linux allows both on either device, and programs use this
and aren't careful about having the right device open. Emulate this
feature, and implement these ioctls. The data is passed in into the
kernel in host byte order (not converted to le). Results are returned in
host order.

The timeout field is ignore, and the metadata and metadata_len fields
must be zero.

The addr field can be null, even when the data_len is non zero (FreeBSD's
ioctl interface prohibits this, Linux's just ignores the inconsistency).

Only the cdw10 is returned from the command: the status is not returned
in 'result' field. XXX need to verify that this is what Linux does on an
error signaled from the drive.

    [16 lines not shown]
DeltaFile
+113-1sys/dev/nvme/nvme_ctrlr.c
+58-0sys/dev/nvme/nvme_linux.h
+13-1sys/dev/nvme/nvme_ns.c
+6-0sys/dev/nvme/nvme.h
+190-24 files

FreeBSD/src 5198178sys/sys cdefs.h

cdefs.h: Add POSIX.1-2024 values

Sponsored by:           Netflix
DeltaFile
+5-2sys/sys/cdefs.h
+5-21 files

FreeBSD/src 517c585sys/vm vm_phys.c

vm_phys: Make sure that vm_phys_enq_chunk() stays in bounds

vm_phys_enq_chunk() inserts a run of pages into the buddy queues.  When
lazy initialization is enabled, only the first page of each run is
initialized; vm_phys_enq_chunk() thus initializes the page following the
just-inserted run.

This fails to account for the possibility that the page following the
run doesn't belong to the segment.  Handle that in vm_phys_enq_chunk().

Reported by:    KASAN
Reported by:    syzbot+1097ef4cee8dfb240e31 at syzkaller.appspotmail.com
Fixes:  b16b4c22d2d1 ("vm_page: Implement lazy page initialization")
DeltaFile
+6-2sys/vm/vm_phys.c
+6-21 files

FreeBSD/src 80b4232sys/dev/nvme nvme_ns.c

nvme: Fix panic on detach after ce75bfcac9cfe

MFC after: 2 weeks
DeltaFile
+4-3sys/dev/nvme/nvme_ns.c
+4-31 files

FreeBSD/src 2d08f6blibexec/rc rc.subr

rc.subr: add some sanity checks for service jails

Add some sanity checks when service jails are used in jails:
 - children.max > 0
 - children.max - children.cur > 0

The nesting is too deep at those places to have a sane formatting, so no
line wrapping at the usual column.
If someone has a better idea how to format this: feel free to go ahead.
DeltaFile
+34-5libexec/rc/rc.subr
+34-51 files

FreeBSD/src a70ecfblibexec/rc rc.subr, share/man/man5 rc.conf.5

rc.subr: add new sysv option for service jails

Clarify that the "sysvipc" svcj option inherits from the host / parent.
Add "sysvipcnew" which creates a new SysV namespace for the service
jail.
Sanity check that only one of them is used.
DeltaFile
+11-0libexec/rc/rc.subr
+6-2share/man/man5/rc.conf.5
+17-22 files

FreeBSD/src 2909dddusr.sbin/ctld kernel.c ctld.c

ctld: plug memory leaks

MFC after:      2 weeks
Reviewed by:    mav
Sponsored by:   Axcient
Reported by:    valgrind
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1288
DeltaFile
+36-0usr.sbin/ctld/kernel.c
+1-0usr.sbin/ctld/ctld.c
+37-02 files

FreeBSD/src 134f7b5sys/riscv/riscv locore.S

riscv: improve commentary around initial stvec

Make it explicit why we must set the trap vector before enabling virtual
memory.

Reviewed by:    br, jhb, markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D45474
DeltaFile
+12-4sys/riscv/riscv/locore.S
+12-41 files

FreeBSD/src 0e4e770sys/riscv/riscv machdep.c

riscv: adjust physmem reservation

Make sure we do this BEFORE pmap_bootstrap().

Reviewed by:    markj, jhb
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D45325
DeltaFile
+5-4sys/riscv/riscv/machdep.c
+5-41 files

FreeBSD/src 3ff9815sys/riscv/riscv pmap.c

riscv: Don't handle missing kernel L3 pages

This code path should never be hit, if it does it means we did not
bootstrap correctly. Turn it into a panic like we do on amd64 and arm64.

Reviewed by:    markj, jhb
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D45326
DeltaFile
+5-38sys/riscv/riscv/pmap.c
+5-381 files

FreeBSD/src cadc9c7stand/efi/boot1 Makefile

boot/efi: Fix warning for non-standard formats when debugging

Add -Wno-format for zfs_module and regroup. This fixes warnings when
EFI_DEBUG is defined.

PR: 279071
Reviewed-by: imp
DeltaFile
+4-3stand/efi/boot1/Makefile
+4-31 files

FreeBSD/src e6ecffcshare/man/man4 sndstat.4, sys/dev/sound/pcm sndstat.c

sound: Include sound(4) channel information in sndstat nvlist

Extend SNDST_DSPS_PROVIDER_INFO for sound(4) to include information
about each channel in a given device, similar to how cat'ing
/dev/sndstat with hw.snd.verbose=2 works.

While here, document all provider_info fields.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    dev_submerge.ch, markj
Differential Revision:  https://reviews.freebsd.org/D45501

(cherry picked from commit bbca3a75bb412f7106a569b82c616404103be084)
DeltaFile
+120-20share/man/man4/sndstat.4
+113-2sys/dev/sound/pcm/sndstat.c
+32-5sys/sys/sndstat.h
+265-273 files

FreeBSD/src 97ab935sys/arm64/rockchip rk_pinctrl.c

rk_pinctrl: fix error check

The parse_bias method returns a signed int, with a value of -1 when
the device tree reports nothing of the bias configuration. Convert the
local 'bias' from unsigned to signed to properly check this condition.

PR:             229721
Reviewed by:    mhorne
MFC after:      3 days
DeltaFile
+2-2sys/arm64/rockchip/rk_pinctrl.c
+2-21 files

FreeBSD/src fb1028dsys/dev/sound/pci/hda hdac.h hdac.c

hda: add support for Tiger Lake-H

PR:             272682
Reported by:    Miguel Salcedo
Reviewed by:    emaste
DeltaFile
+2-0sys/dev/sound/pci/hda/hdac.h
+1-0sys/dev/sound/pci/hda/hdac.c
+1-0sys/dev/sound/pci/hda/hdacc.c
+4-03 files

FreeBSD/src aa6fb1dusr.sbin/tzsetup tzsetup.c tzsetup.8

tzsetup: ask local/UTC question only on x86

Storing local time in the RTC is a legacy of 1990s PCs; it's not
relevant on other platforms of interest to FreeBSD.

While here switch to C99 bool.

Sponsored by:   The FreeBSD Foundation
Reviewed by:    allanjude (earlier), imp (earlier)
Differential Revision: https://reviews.freebsd.org/D45575
DeltaFile
+15-10usr.sbin/tzsetup/tzsetup.c
+2-1usr.sbin/tzsetup/tzsetup.8
+17-112 files

FreeBSD/src ec73588sys/sys libkern.h

libkern.h: Make more self-sufficient

libkern.h uses KASSERT, which fails when building in the boot
loader. This is hacked around in a number of other places, but it's
easier to just include sys/kassert.h here. Those other hacks still work,
but are no longer really needed and can be torn down over time.

Reviewed by: emaste
Sponsored by: Netflix
DeltaFile
+1-0sys/sys/libkern.h
+1-01 files

FreeBSD/src 4fd5b8astand/powerpc/boot1.chrp Makefile

boot1.chrp: Include memset

Normally, memset isn't used. However for OPT_INIT_ALL=zero it is. Always
include it since we're not space constrained and latter-day loaders won't
include a copy if it's not actually used.

Reviewed by: emaste
Sponsored by: Netflix
DeltaFile
+1-1stand/powerpc/boot1.chrp/Makefile
+1-11 files

FreeBSD/src de4bfd6sys/netinet udp_var.h

udp_var: correct intoudpcb macro unintended identifier dependency

Change 483fe9651 embedded struct inpcb into struct udpcb and updated the
intoudpcb macro to use __containerof to locate it. This change accidentally
introduced a dependency on the identifier inp being defined in the block the
macro is expanded in. This should have been the macro argument ip. This change
makes this simple correction.

No functional change intended.

Reviewed by:    kp
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-1sys/netinet/udp_var.h
+1-11 files

FreeBSD/src 07da0adsys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames

The "Invalid TXQ" error from iwlwifi seems to be triggered by a
frame being sent for a sta which is no longer known to the driver/fw.

While we make sure to trigger the sending of the frame in net80211
early enough (by calling (*iv_newstate)() early on rather than at
the end), TX in LinuxKPI is run in a deferred task.  When we drop the
net80211 ic lock again and re-acquire the LHW lock the packet may not
yet have made it to the driver.
Work around this between the (ic and lhw) locks by making sure
(a) no new packets get queued after we return from (*iv_newstate)(),
and (b) the TX task has run or gets cancelled and we manually push
any remaining packets out (or let lsta_free() clean them up).
The disabled packet queuing now also needs to be re-enabled in
scan_to_auth() in case an lsta is staying in service or gets re-used.

Also make sure that any following lkpi_wake_tx_queues() calls no
longer ignore queues which have not seen a prior dequeue.

    [10 lines not shown]
DeltaFile
+86-9sys/compat/linuxkpi/common/src/linux_80211.c
+86-91 files

FreeBSD/src f70e21esys/compat/linuxkpi/common/src linux_80211.c linux_80211.h

LinuxKPI: 802.11: rename chanctx_conf for consistency

We used to call the struct ieee80211_chanctx_conf variable "conf"
in some places but that becomes confusing with bss_conf and other
"conf" bits.  On the vif it is already called chanctx_conf thus also
rename it on the internal struct lkpi_chanctx and for our variables
in the implementation.

This should not have any external visibility.
No functional changes intended.

Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45185

(cherry picked from commit d1af434d99941d32a09c48fb3ef77ef83e203d29)
DeltaFile
+44-44sys/compat/linuxkpi/common/src/linux_80211.c
+3-3sys/compat/linuxkpi/common/src/linux_80211.h
+47-472 files

FreeBSD/src 24cb6fesys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: remove unneeded re-lookup in lkpi_80211_txq_tx_one()

Given we are passed the lsta in as a function argument there is no
need to re-lookup the sta by ni and possibly not find it.
We know the sta and ni from the lsta and whether it is uploaded to
firmware or not we can check directly from the local lsta flag.

Reviewed by:    cc
Differential Revision: https://reviews.freebsd.org/D43965

(cherry picked from commit ac867c20e67423e5019ab90148c387ea127eeffb)
DeltaFile
+38-44sys/compat/linuxkpi/common/src/linux_80211.c
+38-441 files

FreeBSD/src 66627e5sys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls

Lock the two TX MO downcalls into driver/firmware in
lkpi_80211_txq_tx_one() to make sure they cannot happen in the
middle of other (net80211 triggered) updates calling down into
the driver/firmware.

Sponsored by:   The FreeBSD Foundation (commit)
Reviewed by:    cc
Differential Revision: https://reviews.freebsd.org/D43966

(cherry picked from commit 45bce6fa306fc3a211949f63c9bbb7932fe5a3bd)
DeltaFile
+4-0sys/compat/linuxkpi/common/src/linux_80211.c
+4-01 files