FreeBSD/src 132f5d0usr.sbin/mountd mountd.c

mountd: Add check for "=" after exports(5) options

Some exports(5) options take a "=arg" component that provides an
argument value for the option.  Others do not.
Without this patch, if "=arg" was provided for an option that did
not take an argument value, the "=arg" was simply ignored.
This could result in confusion w.r.t. what was being exported,
as noted by the Problem Report.

This patch adds a check for "=arg" for the options that do not
take an argument value and fails the exports line if one is found.

PR:     281003
(cherry picked from commit 3df987c99d1194a0e43a84853e934aa0c0ab09db)
DeltaFile
+40-4usr.sbin/mountd/mountd.c
+40-41 files

FreeBSD/src c09ca8fusr.sbin/mountd mountd.c

mountd: Add check for "=" after exports(5) options

Some exports(5) options take a "=arg" component that provides an
argument value for the option.  Others do not.
Without this patch, if "=arg" was provided for an option that did
not take an argument value, the "=arg" was simply ignored.
This could result in confusion w.r.t. what was being exported,
as noted by the Problem Report.

This patch adds a check for "=arg" for the options that do not
take an argument value and fails the exports line if one is found.

PR:     281003
(cherry picked from commit 3df987c99d1194a0e43a84853e934aa0c0ab09db)
DeltaFile
+40-4usr.sbin/mountd/mountd.c
+40-41 files

FreeBSD/src 39f615esys/net pfvar.h, sys/netpfil/pf pf.c

pf: rename the pf_pdesc field rh_cnt to badopts

It is also used for IPv4 options now.
ok mcbride@ henning@

Reviewed by:    zlei
Obtained from:  OpenBSD, bluhm <bluhm at openbsd.org>, 4fe6abd45f
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46650
DeltaFile
+3-3sys/netpfil/pf/pf.c
+1-1sys/net/pfvar.h
+4-42 files

FreeBSD/src 86fc6f8sys/net pfvar.h, sys/netpfil/pf pf.c

pf: make pf_setup_pdesc() a static function

We only ever call it from pf_test(), and implement it in the same source file.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46706
DeltaFile
+0-6sys/net/pfvar.h
+1-1sys/netpfil/pf/pf.c
+1-72 files

FreeBSD/src f8e9942sys/netpfil/pf pf_norm.c

pf: remove ip(6) header argument from pf_reassemble(6)()

Instead of passing the ip header and mbuf to pf_reassemble(), lookup
the header address in the mbuf.
ok henning@

Reviewed by:    zlei
Obtained from:  OpenBSD, bluhm <bluhm at openbsd.org>, 074ee1f915
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46652
DeltaFile
+8-6sys/netpfil/pf/pf_norm.c
+8-61 files

FreeBSD/src 27f54besys/net pfvar.h, sys/netpfil/pf pf.c pf_ioctl.c

pf: merge pf_test() and pf_test6()

Bye bye pf_test6(). Only one pf_test function for both IPv4 and v6.
The functions were 95% identical anyway.
OK bluhm@ mcbride@ and most probably henning@ as well

Obtained from:  OpenBSD, claudio <claudio at openbsd.org>, c8bc4f6e29
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46649
DeltaFile
+167-451sys/netpfil/pf/pf.c
+4-4sys/net/pfvar.h
+4-4sys/netpfil/pf/pf_ioctl.c
+175-4593 files

FreeBSD/src 1235d27lib/libsys __error.c Makefile, lib/libthr/sys thr_error.c

lib{c,sys}: stop exposing errno symbol

Officially since C11 (and in reality FreeBSD since 3.0 with commit
1b46cb523df3) errno has been defined to be a macro.  Rename the symbol
to __libsys_errno and move it to FBSDprivate_1.0 and confine it entierly
to libsys for use by libthr.  Add a FBSD_1.0 compat symbol for existing
binaries that were incorrectly linked to the errno symbol during
libc.so.7's lifetime.

This deliberately breaks linking software that directly links to errno.
Such software is broken and will fail in surprising ways if it becomes
threaded (e.g., if it triggers loading of a pam or nss module that
uses threads.)

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D46780
DeltaFile
+5-5lib/libsys/__error.c
+3-4lib/libthr/thread/thr_rtld.c
+2-3lib/libthr/sys/thr_error.c
+2-0lib/libsys/Makefile
+1-0lib/libsys/Symbol.map
+0-1lib/libsys/Symbol.sys.map
+13-136 files

FreeBSD/src 0b32516sys/compat/linuxkpi/common/include/linux ieee80211.h, sys/compat/linuxkpi/common/include/net mac80211.h

LinuxKPI: 802.11: move functions between header files

Move some ieee8022_{is,has,get}_... functions working on header fields
from mac80211.h to ieee80211.h to avoid problems with #includes.

No functional changes.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+351-0sys/compat/linuxkpi/common/include/linux/ieee80211.h
+0-341sys/compat/linuxkpi/common/include/net/mac80211.h
+351-3412 files

FreeBSD/src bdd5eb3sys/arm64/iommu iommu.c, sys/dev/iommu iommu_gas.c iommu.h

iommu: change iommu_domain_map_ops to take iommu_map_entry

instead of base/size.

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+11-14sys/arm64/iommu/iommu.c
+10-5sys/x86/iommu/intel_idpgtbl.c
+5-7sys/dev/iommu/iommu_gas.c
+4-4sys/dev/iommu/iommu.h
+2-2sys/x86/iommu/intel_ctx.c
+32-325 files

FreeBSD/src d50403asys/arm64/iommu iommu.c, sys/dev/iommu busdma_iommu.c iommu.h

iommu: add per-unit sysctls reporting the state of DMA and interrupt remapping

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+4-1sys/x86/iommu/intel_intrmap.c
+4-0sys/dev/iommu/busdma_iommu.c
+2-0sys/x86/iommu/intel_drv.c
+2-0sys/arm64/iommu/iommu.c
+1-0sys/dev/iommu/iommu.h
+13-15 files

FreeBSD/src 3848dc4sys/x86/iommu intel_idpgtbl.c

dmar: on unmap, postpone freeing page table pages after the invalidation is done

IOMMU is free to access page tables until we invalidate them

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+18-13sys/x86/iommu/intel_idpgtbl.c
+18-131 files

FreeBSD/src f713ed6sys/dev/iommu iommu_gas.c iommu.h, sys/x86/iommu iommu_utils.c intel_idpgtbl.c

iommu: extend iommu_map_entry to store the list of associated freed page table pages

The pages are inserted into the added slist if the entry parameter is
passed to iommu_pgfree().  For now it is nop.

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+11-4sys/x86/iommu/iommu_utils.c
+11-3sys/dev/iommu/iommu_gas.c
+2-2sys/x86/iommu/intel_idpgtbl.c
+2-1sys/x86/iommu/x86_iommu.h
+3-0sys/dev/iommu/iommu.h
+29-105 files

FreeBSD/src 1784fb4sys/vm vm_page.c vm_page.h

vm_page_free_pages_toq(): return the count of freed pages

Reviewed by:    bnovkov
Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D46820
DeltaFile
+3-2sys/vm/vm_page.c
+1-1sys/vm/vm_page.h
+4-32 files

FreeBSD/src 10ebd23sys/x86/iommu intel_idpgtbl.c intel_ctx.c

intel_idpgtbl.c: rename domain_* functions to dmar_*

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+33-33sys/x86/iommu/intel_idpgtbl.c
+3-3sys/x86/iommu/intel_ctx.c
+3-3sys/x86/iommu/intel_dmar.h
+39-393 files

FreeBSD/src fc2efd2. RELNOTES

RELNOTES: RSA host keys for SSH are deprecated

Ficticious hash since there's no actual code change; but the release
notes for FreeBSD 15 should say that RSA host keys for SSH will no
longer be generated by default in FreeBSD 16.

Discussed on:   freebsd-arch
Sponsored by:   Amazon
DeltaFile
+4-0RELNOTES
+4-01 files

FreeBSD/src 5ac9320usr.bin/procstat procstat_rlimitusage.c procstat.c

procstat(1): add rlimitusage subcommand

Reviewed by:    markj, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D46747
DeltaFile
+76-0usr.bin/procstat/procstat_rlimitusage.c
+2-0usr.bin/procstat/procstat.c
+2-0usr.bin/procstat/procstat.h
+1-0usr.bin/procstat/Makefile
+81-04 files

FreeBSD/src 6126f4elib/libprocstat libprocstat.c Symbol.map

libprocstat: add procstat_getrlimitusage()

Reviewed by:    markj, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D46747
DeltaFile
+53-0lib/libprocstat/libprocstat.c
+5-0lib/libprocstat/Symbol.map
+3-0lib/libprocstat/libprocstat.h
+61-03 files

FreeBSD/src c85d306sys/kern kern_resource.c, sys/sys sysctl.h

sysctl: add KERN_PROC_RLIMIT_USAGE

Reviewed by:    markj, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D46747
DeltaFile
+50-0sys/kern/kern_resource.c
+1-0sys/sys/sysctl.h
+51-02 files

FreeBSD/src 927f379sys/compat/freebsd32 freebsd32_systrace_args.c freebsd32_syscall.h, sys/kern systrace_args.c

Regen
DeltaFile
+30-0sys/compat/freebsd32/freebsd32_systrace_args.c
+30-0sys/kern/systrace_args.c
+7-0sys/sys/sysproto.h
+2-1sys/compat/freebsd32/freebsd32_syscall.h
+2-1sys/sys/syscall.h
+2-1sys/sys/syscall.mk
+73-36 files not shown
+81-312 files

FreeBSD/src 9b29fc8lib/libsys Symbol.sys.map, sys/sys resource.h

Userspace enablement for getrlimitusage(2)

Reviewed by:    markj, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D46747
DeltaFile
+3-0sys/sys/resource.h
+1-0lib/libsys/Symbol.sys.map
+4-02 files

FreeBSD/src f028f44sys/kern kern_resource.c syscalls.master, sys/sys resource.h

Add getrlimitusage(2)

Reviewed by:    markj, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D46747
DeltaFile
+115-0sys/kern/kern_resource.c
+7-0sys/kern/syscalls.master
+3-0sys/sys/resource.h
+125-03 files

FreeBSD/src 9c3e516sys/kern kern_descrip.c, sys/sys filedesc.h

Add proc_nfiles(9)

which returns a snapshot of the count of the opened files in the
process.

Reviewed by:    markj, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D46747
DeltaFile
+34-12sys/kern/kern_descrip.c
+2-0sys/sys/filedesc.h
+36-122 files

FreeBSD/src 869d760sys/dev/beri/virtio virtio.c, usr.sbin/bhyve virtio.c

bhyve: avoid TOCTOU on iov_len in virtio_vq_recordon()

Avoid a race condition when accessing guest memory, by reading memory
contents only once.

This has also been applied to _vq_record() in
sys/dev/beri/virtio/virtio.c, as per markj@'s suggestion.

Reported by:    Synacktiv
Reviewed by:    markj
Security:       HYP-10
Sponsored by:   The Alpha-Omega Project
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D45735
DeltaFile
+8-3sys/dev/beri/virtio/virtio.c
+7-2usr.sbin/bhyve/virtio.c
+15-52 files

FreeBSD/src 94693ecsys/amd64/vmm vmm_ioport.c

bhyve: initialize register value

In case of an error in a code pattern like

```
uint64_t val;
error = memread(vcpu, gpa, &val, 1, arg);
error = vie_update_register(vcpu, reg, val, size);
```

uninitialized stack data would be used.

Reported by:    Synacktiv
Reviewed by:    markj
Security:       HYP-21
Sponsored by:   The Alpha-Omega Project
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D46107
DeltaFile
+1-1sys/amd64/vmm/vmm_ioport.c
+1-11 files

FreeBSD/src 7fe4203lib/libpfctl libpfctl.c, sys/netpfil/pf pf_nl.c pf_nl.h

pf: fix max-src-conn when rules are added via netlink

Reviewed by:    kp
Differential Revision:  https://reviews.freebsd.org/D46797
DeltaFile
+2-0sys/netpfil/pf/pf_nl.c
+2-0lib/libpfctl/libpfctl.c
+1-0sys/netpfil/pf/pf_nl.h
+5-03 files

FreeBSD/src e8ff5e5sys/netpfil/pf pf_nl.c

pf: fix incorrect parsing of state export filter

We saved the af parameter to the proto field.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-1sys/netpfil/pf/pf_nl.c
+1-11 files

FreeBSD/src 9bf9164sys/dev/e1000 if_em.c if_em.h

e1000: Clean up ITR/EITR in preparation for AIM

Provide macros to derive the various needed values and make it a bit
more clear the differences between em and igb.

The igb default EITR was not landing at the right offset.

Respect the 'max_interrupt_rate' tunable.

MFC after:      1 week
Sponsored by:   BBOX.io
DeltaFile
+8-12sys/dev/e1000/if_em.c
+9-2sys/dev/e1000/if_em.h
+17-142 files

FreeBSD/src 1c578f1sys/dev/e1000 if_em.c

e1000: Clean up legacy absolute and packet timers

The absolute and packet timers only apply to lem and em with some only
applying to the later.

This cleans up the sysctl tree to only show these where applicable and
stops writing to unexpected registers for igb.

MFC after:      1 week
Sponsored by:   BBOX.io
DeltaFile
+59-57sys/dev/e1000/if_em.c
+59-571 files

FreeBSD/src 4447308sys/dev/ixgbe if_sriov.c

ixgbe: update if_sriov to use the new mailbox apis

This fixes a page fault when creating VFs and updates to the new mailbox
API and naming conventions.

The functionality works to the same level that it did before my recent
changes. In particular on my 82599 it creates both passthru and ixv
interfaces. In either case, the PF seems to lose the ability to pass
traffic. The ixv driver fails to attach. These issues are present with
or without my updates.

If you use SR-IOV on ixgbe I would be interested in hearing what does
or does not work for you.

MFC after:      6 days

(cherry picked from commit 36c516b31136f645472c12d8597534656272acd6)
DeltaFile
+23-23sys/dev/ixgbe/if_sriov.c
+23-231 files

FreeBSD/src ed31e4esys/dev/ixgbe if_sriov.c

ixgbe: fix compilation for VF

The mailbox API changed in version 15 and these array ops were left out
of the recent code import as applicable to FreeBSD.

Reported by:    vishwin, yasu
Differential Revision:  https://reviews.freebsd.org/D46708

(cherry picked from commit 267f223f622fdbf779cc43b5a564bb02e2b59ecd)
DeltaFile
+7-7sys/dev/ixgbe/if_sriov.c
+7-71 files