FreeBSD/src fbaab13contrib/llvm-project/clang/include/clang/Serialization ASTReader.h ASTDeserializationListener.h, contrib/llvm-project/clang/lib/Frontend MultiplexConsumer.cpp

contrib/llvm-project: fix clang crash compiling modules

clang++ may crash when compiling certain C++20 modules.  Backport the
fix from LLVM upstream.

This fixes LLVM bug 102684:
https://github.com/llvm/llvm-project/issues/102684.

PR:     287803
MFC after:      3 days
Obtained from:  https://github.com/llvm/llvm-project/pull/102855
Reviewed by:    kevans, dim
Approved by:    kevans (mentor)
Differential Revision:  https://reviews.freebsd.org/D51041

(cherry picked from commit 55dfaeae8e9aa95f0b724d90ad2423ca1b623142)
DeltaFile
+73-18contrib/llvm-project/clang/lib/Serialization/ASTReader.cpp
+6-0contrib/llvm-project/clang/lib/Serialization/ASTWriter.cpp
+5-0contrib/llvm-project/clang/lib/Frontend/MultiplexConsumer.cpp
+3-0contrib/llvm-project/clang/include/clang/Serialization/ASTReader.h
+2-0contrib/llvm-project/clang/include/clang/Serialization/ASTDeserializationListener.h
+1-0contrib/llvm-project/clang/include/clang/Serialization/ASTWriter.h
+90-181 files not shown
+91-187 files

FreeBSD/src 039fedc. RELNOTES

RELNOTES: Add an entry for recent "nocto" changes
DeltaFile
+9-0RELNOTES
+9-01 files

FreeBSD/src 1b832d5. UPDATING

UPDATING: Add an entry for commits 171f66b0c2ca and 8e2a90ac8089
DeltaFile
+7-0UPDATING
+7-01 files

FreeBSD/src d8c5c51sys/sys param.h

param.h: Bump __FreeBSD_version for NFS api changes

Commits 171f66b0c2ca and 8e2a90ac8089 changed the internal
api between nfscommon.ko and the other nfs modules.
Bump __FreeBSD_version to 1500049 for this.

All NFS related modules must be rebuilt from up-to-date
sources.
DeltaFile
+1-1sys/sys/param.h
+1-11 files

FreeBSD/src e790bcdsbin/pfctl pfctl_parser.c

pfctl: Use error label in host_if()

This brings it in line with host() and host_dns().

OK sashan miko

Obtained from:  OpenBSD, kn <kn at openbsd.org>, d127311405
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+5-8sbin/pfctl/pfctl_parser.c
+5-81 files

FreeBSD/src 5c0eb43sbin/pfctl pfctl_parser.c pfctl_parser.h

pfctl: Move AF-specific mask logic from callers into set_ipmask()

Instead of doing the same dance with every caller, check for user provided
mask or address familiy specific maximum inside the function itself.

Feedback and OK claudio

Obtained from:  OpenBSD, kn <kn at openbsd.org>, c04427dd30
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+19-16sbin/pfctl/pfctl_parser.c
+1-1sbin/pfctl/pfctl_parser.h
+20-172 files

FreeBSD/src a59e796sbin/pfctl pfctl_parser.c

pfctl: Zap v4mask and v6mask in host()

Simply defer checks whether a mask has been specified to where it's set in
host_*(); this is to reduce address family specific code.

OK sashan

Obtained from:  OpenBSD, kn <kn at openbsd.org>, 17e25e9423
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+9-13sbin/pfctl/pfctl_parser.c
+9-131 files

FreeBSD/src eb6c221sbin/pfctl pfctl_parser.c

pfctl: Zap bits in host_v4(), use mask parameter

This avoids a duplicate strrchr() call and makes the function consistent
with host_v6() regarding mask handling.

While here, use the destination's size in memcpy instead of hardcoding its
type.

OK sashan

Obtained from:  OpenBSD, kn <kn at openbsd.org>, a7ede25358
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+4-5sbin/pfctl/pfctl_parser.c
+4-51 files

FreeBSD/src b728aaasbin/pfctl pfctl_parser.c

pfctl: Simplify getaddrinfo() error handling

`error' is not used so drop it and jump to the end.

OK sashan

Obtained from:  OpenBSD, kn <kn at openbsd.org>, da7f49d74e
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+4-7sbin/pfctl/pfctl_parser.c
+4-71 files

FreeBSD/src 5d9877bsbin/pfctl pfctl_parser.c

pfctl: Simplify host()

Get rid of the `cont' flag, zap obvious comments, add error label.

OK benno sashan

Obtained from:  OpenBSD, kn <kn at openbsd.org>, a98f6f5f17
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+12-26sbin/pfctl/pfctl_parser.c
+12-261 files

FreeBSD/src 466ac79sbin/pfctl pf_print_state.c pfctl_parser.c

pfctl: Move duplicate code into new helper print_addr_str()

This simply puts the wiggle around inet_ntop() from four into one location.

OK benno

Obtained from:  OpenBSD, kn <kn at openbsd.org>, 88d4e2f324
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+16-18sbin/pfctl/pf_print_state.c
+1-8sbin/pfctl/pfctl_parser.c
+1-0sbin/pfctl/pfctl.h
+18-263 files

FreeBSD/src 7b82e36sbin/pfctl pfctl_parser.c

pfctl: Use strtonum in host()

This is simpler than checking three cases for `q' and gives nicer error
messages. While here, use `v6mask' as maximum netmask instead of hardcoding
it.

OK sashan

Obtained from:  OpenBSD, kn <kn at openbsd.org>, e351e6cba3
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+6-5sbin/pfctl/pfctl_parser.c
+6-51 files

FreeBSD/src 50e733fsys/fs/nfs nfs_commonacl.c nfs_var.h, sys/fs/nfsclient nfs_clstate.c nfs_clvnops.c

nfscl: Use delegation ACE when mounted with nocto

For NFSv4.1/4.2, there is an ACE in the delegation reply.
Without this patch, this ACE is ignored by the NFSv4 client.

This patch enables use of the ACE to avoid the need for
Access RPCs when the "nocto" option is specified.
This requires a NFSv4.1/4.2 server that does not reply
with a bogus ACE that is too generous w.r.t. access permissions.
Note that the recent commit 0d51adee3072 added use of the NFSv4
ACL for generation of the ACE in the reply.  This patch might be
needed for this client change to work correctly if NFSv4 ACLs are
being used on the NFSv4.1/4.2 exported file systems.

This only affects NFSv4 mounts with the "nocto" mount option
and only if NFSv4 servers are issuing delegations with ACEs
that specify access.  Some NFSv4 servers, such as the Linux
knfsd reply with ACEs that do not allow any access, so this
patch has no effect for them.
DeltaFile
+51-0sys/fs/nfsclient/nfs_clstate.c
+12-0sys/fs/nfsclient/nfs_clvnops.c
+1-1sys/fs/nfs/nfs_commonacl.c
+1-0sys/fs/nfs/nfs_var.h
+65-14 files

FreeBSD/src fc03742share/man/man4 gve.4, sys/dev/gve gve_main.c gve_rx_dqo.c

gve: Add support for 4k RX Buffers when using DQO queue formats

This change adds support for using 4K RX Buffers when using DQO queue
formats when a boot-time tunable flag is set to true by the user.
When this flag is enabled, the driver will use 4K RX Buffer size either
when HW LRO is enabled or mtu > 2048.

Signed-off-by: Vee Agarwal <veethebee at google.com>

Reviewed by:    markj, ziaee
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D50786

(cherry picked from commit 71702df6126226b31dc3ec66459388e32b993be1)
DeltaFile
+27-3sys/dev/gve/gve_main.c
+15-11sys/dev/gve/gve_rx_dqo.c
+20-0sys/dev/gve/gve.h
+6-2sys/dev/gve/gve_dqo.h
+8-0share/man/man4/gve.4
+4-1sys/dev/gve/gve_adminq.c
+80-171 files not shown
+84-177 files

FreeBSD/src c6e0defsys/dev/gve gve.h

gve: Relax a static assertion

It's okay if MCLBYTES is larger than the default receive buffer size.

Fixes:  71702df61262 ("gve: Add support for 4k RX Buffers when using DQO queue formats")

(cherry picked from commit 3b4bc5d70e1c2066fcb6e8535941258c88999fa2)
DeltaFile
+1-1sys/dev/gve/gve.h
+1-11 files

FreeBSD/src 5396386sys/sys namei.h

namei: clear internal flags in NDREINIT()

same as it is done for NDRESTART()

Fixes:  e05e33041c252
Reported and tested by: pho
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 58b2bd33aff71c0268d99d63e9c83f6544d3beb3)
DeltaFile
+1-0sys/sys/namei.h
+1-01 files

FreeBSD/src 031cd54sys/kern vfs_cache.c

vfs cache: Add NAMEILOOKUP to the whitelist of fastpath lookup flags

Otherwise the lockless name lookup path is inadvertently disabled since
NAMEILOOKUP isn't recognized.

Reviewed by:    olce, kib
Fixes:          7587f6d4840f ("namei: Make stackable filesystems check harder for jail roots")
Differential Revision:  https://reviews.freebsd.org/D50532

(cherry picked from commit f4158953007f557061d91f99d2374d48d8376cc6)
DeltaFile
+1-1sys/kern/vfs_cache.c
+1-11 files

FreeBSD/src 3230a62sys/compat/freebsd32 freebsd32_misc.c, sys/kern sys_process.c

ptrace: Rename the internal command range constants

No functional change intended.

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D50866

(cherry picked from commit ee609560ad2a5fa7cacf06a3879987e118588625)
DeltaFile
+4-4sys/sys/ptrace.h
+1-1sys/compat/freebsd32/freebsd32_misc.c
+1-1sys/kern/sys_process.c
+6-63 files

FreeBSD/src a667678sys/kern vfs_vnops.c

vfs: Don't clobber namei flags in vn_open_cred()

Otherwise NAMEILOOKUP is cleared.  More generally it seems quite
surprising that the flags set by vn_open_cred() callers are not
automatically preserved.  Modify open2nameif() such that it takes
already-set namei flags into account.

Reviewed by:    olce, kib
Fixes:          7587f6d4840f ("namei: Make stackable filesystems check harder for jail roots")
Differential Revision:  https://reviews.freebsd.org/D50531

(cherry picked from commit e05e33041c252dc236939683c01ca4b7b083562c)
DeltaFile
+14-8sys/kern/vfs_vnops.c
+14-81 files

FreeBSD/src 336fec5sys/compat/freebsd32 freebsd32_misc.c, sys/compat/linux linux_ptrace.c

linux: Fix usage of ptrace(PT_GET_SC_ARGS)

The native handler expects the argument to be a pointer to an array of 8
syscall arguments, whereas the emulation provided an array that holds up
to 6.

Handle this by adding a new range of Linuxulator-specific ptrace
commands.  In particular, introduce PTLINUX_GET_SC_ARGS, which always
copies exactly six arguments.  This fixes the problem and removes the
hack of checking the target thread ABI to decide whether to apply a
Linux-specific quirk to PT_GET_SC_ARGS.

Reviewed by:    kib
MFC after:      2 weeks
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D50758

(cherry picked from commit 48a656c588f9fb995b9c524b57dd5febd9f69168)
DeltaFile
+21-6sys/kern/sys_process.c
+4-14sys/compat/linux/linux_ptrace.c
+8-0sys/sys/ptrace.h
+3-0sys/compat/freebsd32/freebsd32_misc.c
+36-204 files

FreeBSD/src 3feafabsys/fs/nullfs null_vnops.c, sys/fs/unionfs union_vnops.c

namei: Make stackable filesystems check harder for jail roots

Suppose a process has its cwd pointing to a nullfs directory, where the
lower directory is also visible in the jail's filesystem namespace.
Suppose that the lower directory vnode is moved out from under the
nullfs mount.  The nullfs vnode still shadows the lower vnode, and
dotdot lookups relative to that directory will instantiate new nullfs
vnodes outside of the nullfs mountpoint, effectively shadowing the lower
filesystem.

This phenomenon can be abused to escape a chroot, since the nullfs
vnodes instantiated by these dotdot lookups defeat the root vnode check
in vfs_lookup(), which uses vnode pointer equality to test for the
process root.

Fix this by extending nullfs and unionfs to perform the same check,
exploiting the fact that the passed componentname is embedded in a
nameidata structure to avoid changing the VOP_LOOKUP interface.  That
is, add a flag to indicate that containerof can be used to get the full

    [9 lines not shown]
DeltaFile
+30-11sys/kern/vfs_lookup.c
+18-10sys/fs/nullfs/null_vnops.c
+21-0sys/fs/unionfs/union_vnops.c
+1-10sys/kern/vfs_cache.c
+4-1sys/sys/namei.h
+74-325 files

FreeBSD/src f56b66ftests/sys/kern jail_lookup_root.c Makefile

tests: Add a regression test for commit 7587f6d4840f8

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D50533

(cherry picked from commit a5dac34f6e98c47bd7cb1946e39cc45432e167a8)
DeltaFile
+171-0tests/sys/kern/jail_lookup_root.c
+2-0tests/sys/kern/Makefile
+173-02 files

FreeBSD/src 3f4efe3sys/kern vfs_cache.c

namei: Remove a now-unused variable

Reported by:    bapt
Fixes:          7587f6d4840f ("namei: Make stackable filesystems check harder for jail roots")

(cherry picked from commit 14ec281a09d7818def2083ef0c3e28f8101f4268)
DeltaFile
+1-3sys/kern/vfs_cache.c
+1-31 files

FreeBSD/src d1ac3e2sys/dev/wg if_wg.c

wg: fix LINT-NOIP build

Fixes:  d15d610fac97df4fefed3f14b31dcfbdcec65bf9
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+2-0sys/dev/wg/if_wg.c
+2-01 files

FreeBSD/src e56247esbin/pfctl pfctl.c

pfctl: Stop checking table commands for `create'

Tiny left over from 2003 when it was removed. Twist the logic by checking
for `show' and `test' to make it even simpler.

OK sashan henning

Obtained from:  OpenBSD, kn <kn at openbsd.org>, 764778e2ff
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-1sbin/pfctl/pfctl.c
+1-11 files

FreeBSD/src d8d7bd5sbin/pfctl parse.y

pfctl: simplify FOM_PRIO handling

Obtained from:  OpenBSD, kn <kn at openbsd.org>, d114b77333
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+2-6sbin/pfctl/parse.y
+2-61 files

FreeBSD/src d18ed24sys/netpfil/pf pf.c

pf: trade few 'goto unlock: for 'break' in pf_test()

OK mpi@, OK henning@, OK jca@

Obtained from:  OpenBSD, sashan <sashan at openbsd.org>, 18b958d7c9
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+4-4sys/netpfil/pf/pf.c
+4-41 files

FreeBSD/src 8572367sys/netpfil/pf pf.c

pf: remove STATE_LOOKUP

the STATE_LOOKUP macro made sense ages ago. It stopped making sense
when we moved most of the functionality into a function. g/c the macro
and just call the function. ok mpi jca

Obtained from:  OpenBSD, henning <henning at openbsd.org>, 4fc68ab0d1
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+74-40sys/netpfil/pf/pf.c
+74-401 files

FreeBSD/src e031815sbin/pfctl pfctl_parser.c

pfctl: Add "listenrepv2" for MLDv2 Listener Reports from RFC3810

ok benno@

Obtained from:  OpenBSD, jca <jca at openbsd.org>, 42b7d0f07b
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+2-1sbin/pfctl/pfctl_parser.c
+2-11 files

FreeBSD/src e7be8e0sbin/pfctl parse.y

pfctl: use __func__ rather than hardcoding function names for errors

Do for most running out of memory err() what was done for most running
out of memory log_warn(). i.e. ("%s", __func__) instead of manual
function names and redundant verbiage about which wrapper detected the
out of memory condition.

ok henning@

Obtained from:  OpenBSD, krw <krw at openbsd.org>, a062aa9d6a
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+37-37sbin/pfctl/parse.y
+37-371 files