]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agoUse KERNEL_PANICKED() in more places
Mitchell Horne [Thu, 2 Jun 2022 13:14:41 +0000 (10:14 -0300)]
Use KERNEL_PANICKED() in more places

This is slightly more optimized than checking panicstr directly. For
most of these instances performance doesn't matter, but let's make
KERNEL_PANICKED() the common idiom.

Reviewed by: mjg
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D35373

2 years agoApply llvm fix for possible hangs with CPUTYPE=skylake-avx512
Dimitry Andric [Wed, 1 Jun 2022 21:43:18 +0000 (23:43 +0200)]
Apply llvm fix for possible hangs with CPUTYPE=skylake-avx512

Merge commit e8305c0b8f49 from llvm git (by Simon Pilgrim)

    [X86] combineX86ShuffleChain - don't fold to truncate(concat(V1,V2)) if it was already a PACK op

    Fixes #55050

PR: 264394
Reported by: VVD <vvd@unislabs.com>
MFC after: 3 days

2 years agohwpmc: Make powerpc memory allocation alike to x86.
Alexander Motin [Wed, 1 Jun 2022 18:50:27 +0000 (14:50 -0400)]
hwpmc: Make powerpc memory allocation alike to x86.

It should remove some unneeded pointer dereferences.

MFC after: 1 month

2 years agoApply compiler-rt fix for building with earlier versions of clang
Dimitry Andric [Wed, 1 Jun 2022 18:29:15 +0000 (20:29 +0200)]
Apply compiler-rt fix for building with earlier versions of clang

Merge commit 18efa420da5f from llvm git (by Brooks Davis)

  compiler-rt: Allow build without __c11_atomic_fetch_nand

  Don't build atomic fetch nand libcall functions when the required
  compiler builtin isn't available. Without this compiler-rt can't be
  built with LLVM 13 or earlier.

  Not building the libcall functions isn't optimal, but aligns with the
  usecase in FreeBSD where compiler-rt from LLVM 14 is built with an LLVM
  13 clang and no LLVM 14 clang is built.

  Reviewed By:   efriedma

  Differential Revision:  https://reviews.llvm.org/D126710

MFC after: 3 days

2 years agodtrace: add warning for /dev/dtrace/prototype
Christos Margiolis [Wed, 1 Jun 2022 16:58:31 +0000 (12:58 -0400)]
dtrace: add warning for /dev/dtrace/prototype

Let the programmer know that creating a device is not necessary.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D35381

2 years agodtrace: remove /dev/dtrace/fbt
Christos Margiolis [Wed, 1 Jun 2022 16:26:07 +0000 (12:26 -0400)]
dtrace: remove /dev/dtrace/fbt

It is unused.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D35377

2 years agodtrace: remove /dev/dtrace/profile
Christos Margiolis [Wed, 1 Jun 2022 16:42:35 +0000 (12:42 -0400)]
dtrace: remove /dev/dtrace/profile

It is unused.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D35380

2 years agodtrace: remove /dev/dtrace/dtmalloc
Christos Margiolis [Wed, 1 Jun 2022 16:39:23 +0000 (12:39 -0400)]
dtrace: remove /dev/dtrace/dtmalloc

It is unused.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D35379

2 years agogetpagesize(3): add .Xr to sysconf(3)
Ed Maste [Mon, 30 May 2022 19:34:34 +0000 (15:34 -0400)]
getpagesize(3): add .Xr to sysconf(3)

POSIX deprecated getpagesize(3).  The portable way to obtain the page
size is `sysconf(_SC_PAGESIZE)`.

Reviewed by: cperciva (earlier), imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35352

2 years agohwpmc: Remove always zero pc_resync field.
Alexander Motin [Wed, 1 Jun 2022 15:05:50 +0000 (11:05 -0400)]
hwpmc: Remove always zero pc_resync field.

MFC after: 1 month

2 years agostress2: Updated the exclude list and sorted it
Peter Holm [Wed, 1 Jun 2022 08:03:23 +0000 (10:03 +0200)]
stress2: Updated the exclude list and sorted it

2 years agostress2: Added syzkaller reproducers
Peter Holm [Wed, 1 Jun 2022 08:02:08 +0000 (10:02 +0200)]
stress2: Added syzkaller reproducers

2 years agostress2: Added procctl(2) PROC_REAP_KILL regression tests
Peter Holm [Wed, 1 Jun 2022 07:58:28 +0000 (09:58 +0200)]
stress2: Added procctl(2) PROC_REAP_KILL regression tests

2 years agonetinet6: fix panic on kldunload pfsync
Kristof Provost [Tue, 31 May 2022 19:11:14 +0000 (21:11 +0200)]
netinet6: fix panic on kldunload pfsync

Commit d6cd20cc5 ("netinet6: fix ndp proxying") caused us to panic when
unloading pfsync:

Fatal trap 12: page fault while in kernel mode
cpuid = 19; apic id = 38
fault virtual address = 0x20
fault code = supervisor read data, page not present
instruction pointer = 0x20:0xffffffff80dfe7f4
stack pointer         = 0x28:0xfffffe015d4f8ac0
frame pointer         = 0x28:0xfffffe015d4f8ae0
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 5477 (kldunload)
trap number = 12
panic: page fault
cpuid = 19
time = 1654023100
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe015d4f8880
vpanic() at vpanic+0x17f/frame 0xfffffe015d4f88d0
panic() at panic+0x43/frame 0xfffffe015d4f8930
trap_fatal() at trap_fatal+0x387/frame 0xfffffe015d4f8990
trap_pfault() at trap_pfault+0xab/frame 0xfffffe015d4f89f0
calltrap() at calltrap+0x8/frame 0xfffffe015d4f89f0
--- trap 0xc, rip = 0xffffffff80dfe7f4, rsp = 0xfffffe015d4f8ac0, rbp = 0xfffffe015d4f8ae0 ---
in6_purge_proxy_ndp() at in6_purge_proxy_ndp+0x14/frame 0xfffffe015d4f8ae0
if_purgeaddrs() at if_purgeaddrs+0x24/frame 0xfffffe015d4f8b90
if_detach_internal() at if_detach_internal+0x1c2/frame 0xfffffe015d4f8bf0
if_detach() at if_detach+0x71/frame 0xfffffe015d4f8c20
pfsync_clone_destroy() at pfsync_clone_destroy+0x1dd/frame 0xfffffe015d4f8c70
if_clone_destroyif() at if_clone_destroyif+0x239/frame 0xfffffe015d4f8cc0
if_clone_detach() at if_clone_detach+0xc8/frame 0xfffffe015d4f8cf0
vnet_pfsync_uninit() at vnet_pfsync_uninit+0xda/frame 0xfffffe015d4f8d10
vnet_deregister_sysuninit() at vnet_deregister_sysuninit+0x85/frame 0xfffffe015d4f8d40
linker_file_sysuninit() at linker_file_sysuninit+0x147/frame 0xfffffe015d4f8d70
linker_file_unload() at linker_file_unload+0x269/frame 0xfffffe015d4f8db0
kern_kldunload() at kern_kldunload+0x18d/frame 0xfffffe015d4f8e00
amd64_syscall() at amd64_syscall+0x12e/frame 0xfffffe015d4f8f30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe015d4f8f30
--- syscall (444, FreeBSD ELF64, sys_kldunloadf), rip = 0x1601eab28cba, rsp = 0x1601e9c363f8, rbp = 0x1601e9c36c50 ---

This happens because ifp->if_afdata[AF_INET6] is NULL. Check for this,
just as we already do in a few other places.
See also c139b3c19b52a ("arp/nd: Cope with late calls to
iflladdr_event").

Reviewed by: melifaro
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D35374

2 years agoTwo bug fixes to UFS/FFS superblock integrity checks when reading a superblock.
Kirk McKusick [Wed, 1 Jun 2022 02:55:54 +0000 (19:55 -0700)]
Two bug fixes to UFS/FFS superblock integrity checks when reading a superblock.

Two bugs have been reported with the UFS/FFS superblock integrity
checks that were added in commit 076002f24d35.

The code checked that fs_sblockactualloc was properly set to the
location of the superblock. The fs_sblockactualloc field was an
addition to the superblock in commit dffce2150eea on Jan 26 2018
and used a field that was zero in filesystems created before it
was added. The integrity check had to be expanded to accept the
fs_sblockactualloc field being zero so as not to reject filesystems
created before Jan 26 2018.

The integrity check set an upper bound on the value of fs_maxcontig
based on the maximum transfer size supported by the kernel. It
required that fs->fs_maxcontig <= maxphys / fs->fs_bsize. The kernel
variable maxphys defines the maximum transfer size permitted by the
controllers and/or buffering. The fs_maxcontig parameter controls the
maximum number of blocks that the filesystem will read or write in
a single transfer. It is calculated when the filesystem is created
as maxphys / fs_bsize. The bug appeared in the loader because it
uses a maxphys of 128K even when running on a system that supports
larger values. If the filesystem was built on a system that supports
a larger maxphys (1M is typical) it will have configured fs_maxcontig
for that larger system so would fail the test when run with the smaller
maxphys used by the loader. So we bound the upper allowable limit
for fs_maxconfig to be able to at least work with a 1M maxphys on the
smallest block size filesystem: 1M / 4096 == 256. We then use the
limit for fs_maxcontig as fs_maxcontig <= MAX(256, maxphys / fs_bsize).
There is no harm in allowing the mounting of filesystems that make larger
than maxphys I/O requests because those (mostly 32-bit machines) can
(very slowly) handle I/O requests that exceed maxphys.

Thanks to everyone who helped sort out the problems and the fixes.

Reported by:  Cy Schubert, David Wolfskill
Diagnosis by: Mark Johnston, John Baldwin
Reviewed by:  Warner Losh
Tested by:    Cy Schubert, David Wolfskill
MFC after:    1 month (with 076002f24d35)
Differential Revision: https://reviews.freebsd.org/D35219

2 years agonetinet6: Fix mbuf leak in NDP
Arseny Smalyuk [Tue, 31 May 2022 20:04:51 +0000 (20:04 +0000)]
netinet6: Fix mbuf leak in NDP

Mbufs leak when manually removing incomplete NDP records with pending packet via ndp -d.
It happens because lltable_drop_entry_queue() rely on `la_numheld`
counter when dropping NDP entries (lles). It turned out NDP code never
increased `la_numheld`, so the actual free never happened.

Fix the issue by introducing unified lltable_append_entry_queue(),
common for both ARP and NDP code, properly addressing packet queue
maintenance.

Reviewed By: melifaro
Differential Revision: https://reviews.freebsd.org/D35365
MFC after: 2 weeks

2 years agopf: fix a race against kif destruction in pf_test{,6}
Mateusz Guzik [Tue, 31 May 2022 20:00:37 +0000 (20:00 +0000)]
pf: fix a race against kif destruction in pf_test{,6}

ifp kif was dereferenced prior to taking the lock and
could have been nullified later.

Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision:

2 years agonfs: skip bootpc when vfs.root.mountfrom is other than nfs
Alfredo Dal'Ava Junior [Tue, 31 May 2022 19:03:43 +0000 (16:03 -0300)]
nfs: skip bootpc when vfs.root.mountfrom is other than nfs

If "vfs.root.mountfrom" is set and the value is something other
than "nfs:*", it means the user doesn't want to mount root via nfs,
there's no reason to continue with bootpc

This fixes the powerpcspe kernel (MPC85XXSPE) that's compiled with
BOOTP_NFSROOT by default and gets stuck on bootpc/dhcp request loop
when no DHCP server is available on the network, even when user
specifies a local disk via "vfs.root.mountfrom" kernel parameter.

Reviewed by: imp
MFC after: 2 weeks
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D35098

2 years agonfscl: Enable support for the Lookup+Open RPC
Rick Macklem [Tue, 31 May 2022 18:59:39 +0000 (11:59 -0700)]
nfscl: Enable support for the Lookup+Open RPC

Commits 3ad1e1c1ce20 and 57014f21e754 added a Lookup+Open
RPC for NFSv4.1/4.2, which can reduce the RPC count by
10-20% for some loads.  This has now received a fair amount
of testing, so I think it is ok to enable it.

Note that the Lookup+Open RPC is only used when the
"oneopenown" mount option is specified.  As such, this
change won't affect most NFSv4.1/4.2 mounts.

2 years agollvm MIPS target: add missed source file
Dimitry Andric [Tue, 31 May 2022 13:19:55 +0000 (15:19 +0200)]
llvm MIPS target: add missed source file

Otherwise, linking llvm binaries with this target enabled (which is not
the default) will fail with a number of undefined symbol errors:

  ld: error: undefined symbol: llvm::initializeMipsMulMulBugFixPass(llvm::PassRegistry&)
  ld: error: undefined symbol: llvm::createMipsMulMulBugPass()

MFC after: 3 days

2 years agomandoc: workaround lack of macro parsing in list -width
Eric van Gyzen [Tue, 17 May 2022 17:46:59 +0000 (12:46 -0500)]
mandoc: workaround lack of macro parsing in list -width

GNU tools parse macros in the -width argument of lists.  mandoc does not,
so it calculates an excessive width.  This often squeezes the text into
a very narrow column, especially in nested lists.

Implement the easy workaround suggested in the TODO list.  When there is
only one macro, at the beginning of the -width argument, this fixes the
formatting as well as a complete solution.

Reviewed by: bapt
Relnotes: yes
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D35245

2 years agorc: Fix quoting in the zpoolreguid script
Mark Johnston [Tue, 31 May 2022 14:51:28 +0000 (10:51 -0400)]
rc: Fix quoting in the zpoolreguid script

Reported by: 0mp
Fixes: 227caacc918a ("rc: Add a zpoolreguid rc.d script")
Sponsored by: The FreeBSD Foundation

2 years agolinux(4): Return EINVAL when the clockid has invalid bits are set
Dmitry Chagin [Tue, 31 May 2022 08:46:15 +0000 (11:46 +0300)]
linux(4): Return EINVAL when the clockid has invalid bits are set

Linux forbids PERTHREAD bit set for CLOCKFD clock.

MFC after: 2 weeks

2 years agolinux(4): Return ENOTSUP for unsupported clockid
Dmitry Chagin [Tue, 31 May 2022 08:43:00 +0000 (11:43 +0300)]
linux(4): Return ENOTSUP for unsupported clockid

It's much better from the user perspective to get a sane error code.

MFC after: 2 weeks

2 years agolinprocfs: Add /proc/vm/max_map_count
Dmitry Chagin [Tue, 31 May 2022 08:42:06 +0000 (11:42 +0300)]
linprocfs: Add /proc/vm/max_map_count

On Linux this limits the number of maps per mm struct.
We don't limit mappings, return a suitable large value.

Reviewed by: emaste
Differential revision: https://reviews.freebsd.org/D35351
MFC after: 2 weeks

2 years agolibpmc: Fix INVERT flag mapping for both Intel and AMD.
Alexander Motin [Tue, 31 May 2022 04:02:06 +0000 (00:02 -0400)]
libpmc: Fix INVERT flag mapping for both Intel and AMD.

Looks like somebody's trivial copy/paste bug.

MFC after: 1 month

2 years agosoo_aio_*: use socket buffer mutexes in struct socket directly
Gleb Smirnoff [Tue, 31 May 2022 03:38:34 +0000 (20:38 -0700)]
soo_aio_*: use socket buffer mutexes in struct socket directly

A miss from commit 4328318445a.

2 years agohwpmc: Add basic Intel Alderlake CPUs support.
Alexander Motin [Tue, 31 May 2022 03:17:37 +0000 (23:17 -0400)]
hwpmc: Add basic Intel Alderlake CPUs support.

The PMC subsystem is not designed for non-uniform CPU capabilities
(P/E-cores are different), but at least several working architectural
events like cpu_clk_unhalted.thread_p should be better than nothing.

MFC after: 1 month

2 years agohwpmc: Update Intel's programmable counters restrictions.
Alexander Motin [Tue, 31 May 2022 02:51:00 +0000 (22:51 -0400)]
hwpmc: Update Intel's programmable counters restrictions.

Primarily remove unneeded restrictions from later CPUs.

MFC after: 1 month

2 years agozdiff: avoid non-conformant features
Kyle Evans [Fri, 20 May 2022 20:38:03 +0000 (15:38 -0500)]
zdiff: avoid non-conformant features

`setvar` is a non-conformant feature that looks slightly neater but is
not portable to other /bin/sh implementations.  Making the script
portable is straightforward, so let's do it.

Tests are added to make sure that I didn't break anything major in the
process.

Reviewed by: bapt (previous version), jilles
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D35275

2 years agolibpmc: Disable hardcoding of Intel fixed counters.
Alexander Motin [Mon, 30 May 2022 23:58:40 +0000 (19:58 -0400)]
libpmc: Disable hardcoding of Intel fixed counters.

Intel json's now have pretty reasonable fixed counters representation
via event=0 and umask.  Hardcoded values create more confusion than fix.

MFC after: 1 month

2 years agohwpmc: Correct selection of Intel fixed counters.
Alexander Motin [Mon, 30 May 2022 23:46:48 +0000 (19:46 -0400)]
hwpmc: Correct selection of Intel fixed counters.

Intel json's use event=0 to specify fixed counter number via umask.
Alternatively fixed counters have equivalent programmable event/umask.

MFC after: 1 month

2 years agoirdma: fix LINT-NOIP/NOINET/NOINET6 builds
Mitchell Horne [Mon, 30 May 2022 20:47:32 +0000 (17:47 -0300)]
irdma: fix LINT-NOIP/NOINET/NOINET6 builds

This module depends on the presence of both INET and INET6 options in
order to compile.

Reviewed by: erj
Fixes: cdcd52d41e24 ("irdma: Add RDMA driver for Intel(R) Ethernet...")
Differential Revision: https://reviews.freebsd.org/D35343

2 years agoibcore: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen()
Hans Petter Selasky [Mon, 30 May 2022 18:19:33 +0000 (20:19 +0200)]
ibcore: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen()

The algorithm pre-allocates a cm_id since allocation cannot be done while
holding the cm.lock spinlock, however it doesn't free it on one error
path, leading to a memory leak.

Linux commit:
c14dfddbd869bf0c2bafb7ef260c41d9cebbcfec

PR: 264248
MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agomlx4core: Fix a memory leak when deleting slave's resources
Hans Petter Selasky [Mon, 30 May 2022 18:11:50 +0000 (20:11 +0200)]
mlx4core: Fix a memory leak when deleting slave's resources

mlx4_delete_all_resources_for_slave() in the resource tracker should free
all memory allocated for a slave. While releasing memory of fs_rule,
it misses releasing memory of fs_rule->mirr_mbox.

Linux commit:
461d5f1b59490ce0096dfda45e10038c122a7892

PR: 264249
MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agolibpmc: jevents: Sync with the latest Linux kernel.
Alexander Motin [Mon, 30 May 2022 18:07:31 +0000 (14:07 -0400)]
libpmc: jevents: Sync with the latest Linux kernel.

commit f4df0dbbe62ee8e4405a57b27ccd54393971c773
Date:   Wed May 25 22:04:10 2022 +0800

MFC after: 1 month

2 years agoRevert "libpmc: jevents: Partial style(9) pass"
Alexander Motin [Mon, 30 May 2022 14:07:31 +0000 (10:07 -0400)]
Revert "libpmc: jevents: Partial style(9) pass"

This file is shared with Linux.  Having local style patches does not
help with updating it.

This reverts commit 3ea691c2612952dc5e6963649ad64312bd6dff4f.

2 years agolinux(4): Properly restore the thread signal mask after signal delivery on i386
Dmitry Chagin [Mon, 30 May 2022 17:03:49 +0000 (20:03 +0300)]
linux(4): Properly restore the thread signal mask after signal delivery on i386

Replace sigframe sf_extramask by native sigset_t and use it to
store/restore the thread signal mask without conversion to/from
Linux signal mask.

Pointy hat to: dchagin
MFC after: 2 weeks

2 years agolinux(4): Prefer sizeof(object) vs sizeof(type)
Dmitry Chagin [Mon, 30 May 2022 17:03:14 +0000 (20:03 +0300)]
linux(4): Prefer sizeof(object) vs sizeof(type)

MFC after: 2 weeks

2 years agolinux(4): Error is not a bool, use proper comparison
Dmitry Chagin [Mon, 30 May 2022 17:00:30 +0000 (20:00 +0300)]
linux(4): Error is not a bool, use proper comparison

MFC afer: 2 weeks

2 years agolinux(4): Use the copyin_sigset() in the remaining places
Dmitry Chagin [Mon, 30 May 2022 16:59:45 +0000 (19:59 +0300)]
linux(4): Use the copyin_sigset() in the remaining places

MFC after: 2 weeks

2 years agolinux(4): Refactor SIGPWR mapping
Dmitry Chagin [Mon, 30 May 2022 16:55:49 +0000 (19:55 +0300)]
linux(4): Refactor SIGPWR mapping

Map Linux RT signals to the native RT signals starting from SIGRTMIN,
and Linux SIGPWR signal map to after the last RT signal.

MFC after: 2 weeks

2 years agolinux(4): Fix the type of a constant in the signal mask macro
Dmitry Chagin [Mon, 30 May 2022 16:53:52 +0000 (19:53 +0300)]
linux(4): Fix the type of a constant in the signal mask macro

Since l_sigset_t is 64-bit unsigned on all Linuxulators, fix the type
of a constant in the signal mask manipulation macro.
The suffix L indicates type long which is 32-bit on i386, therefore,
bitwise operations between a 32-bit constant and 64-bit signal mask
lead to the wrong result.

Pointy hat to: dchagin
MFC after: 2 weeks

2 years agolinux(4): Properly build argument list for the signal handler
Dmitry Chagin [Mon, 30 May 2022 16:53:12 +0000 (19:53 +0300)]
linux(4): Properly build argument list for the signal handler

Provide arguments 2 and 3 if signal handler installed with SA_SIGINFO.

MFC after: 2 weeks

2 years agolinux(4): Microoptimize rt_sendsig(), convert signal mask once
Dmitry Chagin [Mon, 30 May 2022 16:49:45 +0000 (19:49 +0300)]
linux(4): Microoptimize rt_sendsig(), convert signal mask once

On amd64 Linux saves the thread signal mask in both contexts, in the machine
dependent and in the machine independent. Both contexts are user accessible.
Convert the mask once, then copy it.

MFC after: 2 weeks

2 years agolinux(4): Avoid direct manipulation of td_sigmask
Dmitry Chagin [Mon, 30 May 2022 16:48:20 +0000 (19:48 +0300)]
linux(4): Avoid direct manipulation of td_sigmask

Use kern_sigprocmask() instead of direct manipulation of td_sigmask
to reschedule newly blocked signals.

MFC after: 2 weeks

2 years agolinux(4): Reduce duplication between MD parts of the Linuxulator
Dmitry Chagin [Mon, 30 May 2022 16:47:26 +0000 (19:47 +0300)]
linux(4): Reduce duplication between MD parts of the Linuxulator

Move sigprocmask actions defines under compat/linux,
they are identical across all Linux architectures.

MFC after: 2 weeks

2 years agosockbuf: retain backward compatibility with userland after d59bc188d652
Alexander V. Chernikov [Mon, 30 May 2022 14:56:25 +0000 (14:56 +0000)]
sockbuf: retain backward compatibility with userland after d59bc188d652

Add spare fields to xsockbuf in place of sb_mcnt / sb_ccnt to avoid
 rebuilding userland binaries like sockstat(1).

Reviewed by: glebius

2 years agosrc.conf.5: Regenerate
Mark Johnston [Mon, 30 May 2022 14:53:13 +0000 (10:53 -0400)]
src.conf.5: Regenerate

2 years agosrc.conf.5: Update the WITHOUT_ZFS description
Mark Johnston [Mon, 30 May 2022 14:45:57 +0000 (10:45 -0400)]
src.conf.5: Update the WITHOUT_ZFS description

... to take into account programs and libraries which might implement
some ZFS-specific features without being exclusive to ZFS.

Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35337

2 years agorc: Add a zpoolreguid rc.d script
Mark Johnston [Mon, 30 May 2022 14:43:44 +0000 (10:43 -0400)]
rc: Add a zpoolreguid rc.d script

If one boots up multiple copies of a template VM image containing a
zpool, the pool GUIDs will be identical, making it impossible to, e.g.,
share datasets between them.

This diff introduces a simple workaround for the problem: one can use
the script to, upon first boot, assign a new GUID to one or more zpools.
This will be useful when building ZFS-based VM images from release(7).

Reviewed by: mav, allanjude, asomers
Reviewed by: Pau Amma (docs)
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35336

2 years agogitignore: Ignore compile_commands.events.json
Mark Johnston [Sun, 29 May 2022 17:32:24 +0000 (13:32 -0400)]
gitignore: Ignore compile_commands.events.json

This is a temporary file that appears when a build is wrapped using
devel/bear.

MFC after: 1 week

2 years agopkgbase: Move pw to the runtime package
Doug Rabson [Mon, 30 May 2022 13:22:08 +0000 (14:22 +0100)]
pkgbase: Move pw to the runtime package

This allows building a container image with enough functionality for
downloading and installing packages without having to include the
utilities package.

Reviewed by: manu
MFC after:   2 weeks

2 years agopf: make sure the rule tree is allocated in DIOCCHANGERULE
Mateusz Guzik [Fri, 27 May 2022 22:15:34 +0000 (00:15 +0200)]
pf: make sure the rule tree is allocated in DIOCCHANGERULE

Original patch by: peter
Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agohwpmc: Use hardware PMCs freezing on PMI on Intel v2+.
Alexander Motin [Mon, 30 May 2022 13:07:30 +0000 (09:07 -0400)]
hwpmc: Use hardware PMCs freezing on PMI on Intel v2+.

Since version 2 Intel CPUs can freeze PMCs when intering PMI to reduce
PMI effects on collected statistics.  Since version 4 hardware supports
"streamlined" mechanism, not requiring IA_GLOBAL_CTRL MSR access.

MFC after: 1 month

2 years agolib/libgssapi: Trailing whitespace cleanup
Cy Schubert [Fri, 27 May 2022 20:48:23 +0000 (13:48 -0700)]
lib/libgssapi: Trailing whitespace cleanup

Clean up trailing whitespace (trailing spaces and trailing tabs).

MFC after: 1 week

2 years agosockstat: be more verbose when reporting kernel/userland size mismatch.
Alexander V. Chernikov [Mon, 30 May 2022 10:54:53 +0000 (10:54 +0000)]
sockstat: be more verbose when reporting kernel/userland size mismatch.

MFC after: 2 weeks

2 years agonetinet6: fix ndp proxying
KUROSAWA Takahiro [Mon, 30 May 2022 07:51:15 +0000 (07:51 +0000)]
netinet6: fix ndp proxying

We could insert proxy NDP entries by the ndp command, but the host
with proxy ndp entries had not responded to Neighbor Solicitations.
Change the following points for proxy NDP to work as expected:
* join solicited-node multicast addresses for proxy NDP entries
  in order to receive Neighbor Solicitations.
* look up proxy NDP entries not on the routing table but on the
  link-level address table when receiving Neighbor Solicitations.

Reviewed By: melifaro
Differential Revision: https://reviews.freebsd.org/D35307
MFC after: 2 weeks

2 years agolltable: introduce the llt_post_resolved callback
KUROSAWA Takahiro [Mon, 30 May 2022 07:38:54 +0000 (07:38 +0000)]
lltable: introduce the llt_post_resolved callback

In order to decrease ifdef INET/INET6s in the lltable implementation,
introduce the llt_post_resolved callback and implement protocol-dependent
code in the protocol-dependent part.

Reviewed By: melifaro
Differential Revision: https://reviews.freebsd.org/D35322
MFC after: 2 weeks

2 years agolltable: use sa_family_t instead of int for lltable.llt_af
KUROSAWA Takahiro [Mon, 30 May 2022 07:36:52 +0000 (07:36 +0000)]
lltable: use sa_family_t instead of int for lltable.llt_af

Reviewed By: melifaro, #network
Differential Revision: https://reviews.freebsd.org/D35323
MFC after: 2 weeks

2 years agox86/mp: don't create empty cpu groups
Corvin Köhne [Mon, 30 May 2022 09:19:14 +0000 (11:19 +0200)]
x86/mp: don't create empty cpu groups

When some APICs are disabled by tunables, some cpu groups could end up
empty. An empty cpu group causes the system to panic because not all
functions handle them correctly. Additionally, it's wasted time to
handle and inspect empty cpu groups. Therefore, just don't create them.

Reviewed by: kib, avg, cem
Sponsored by: Beckhoff Automation GmbH & Co. KG
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D24927

2 years agovmm: add tunable to trap WBINVD
Corvin Köhne [Mon, 30 May 2022 08:02:52 +0000 (10:02 +0200)]
vmm: add tunable to trap WBINVD

x86 is cache coherent. However, there are special cases where cache
coherency isn't ensured (e.g. when switching the caching mode). In these
cases, WBINVD can be used. WBINVD writes all cache lines back into main
memory and invalidates the whole cache.

Due to the invalidation of the whole cache, WBINVD is a very heavy
instruction and degrades the performance on all cores. So, we should
minimize the use of WBINVD as much as possible.

In a virtual environment, the WBINVD call is mostly useless. The guest
isn't able to break cache coherency because he can't switch the physical
cache mode. When using pci passthrough WBINVD might be useful.

Nevertheless, trapping and ignoring WBINVD is an unsafe operation. For
that reason, we implement it as tunable.

Reviewed by: jhb
Sponsored by: Beckhoff Automation GmbH & Co. KG
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D35253

2 years agobhyve: use bhyve_config for SMBIOS strings
Corvin Köhne [Mon, 30 May 2022 08:01:36 +0000 (10:01 +0200)]
bhyve: use bhyve_config for SMBIOS strings

Some software uses SMBIOS entries to identify the system on which it's
running. In order to make it possible to use such software inside a VM,
SMBIOS entries should be configurable. Therefore, bhyve_config can be
used. While only a few SMBIOS entries might be of interest, it makes
sense that all SMBIOS entries are configurable. This way all SMBIOS
tables are build the same way and there's no special handling for some
tables.

Reviewed by: jhb
Sponsored by: Beckhoff Automation GmbH & Co. KG
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34465

2 years agosctp: improve handling of listen() call
Michael Tuexen [Sun, 29 May 2022 18:40:30 +0000 (20:40 +0200)]
sctp: improve handling of listen() call

Fail the listen() call for 1-to-1 style sockets when the SCTP
association has been shutdown or aborted.

Reported by: syzbot+6c484f116b9dc88f7db1@syzkaller.appspotmail.com
MFC after: 3 days

2 years agohwpmc: Add Intel Core register defines up to version 5.
Alexander Motin [Sun, 29 May 2022 02:11:59 +0000 (22:11 -0400)]
hwpmc: Add Intel Core register defines up to version 5.

MFC after: 1 month

2 years agonfsstat: Add an entry to output NFSPROC_APPENDWRITE count
Rick Macklem [Sat, 28 May 2022 23:27:02 +0000 (16:27 -0700)]
nfsstat: Add an entry to output NFSPROC_APPENDWRITE count

Commit 5218d82c81f9 added a new NFSv4.1/4.2 procedure called
AppendWrite that uses a Verify to avoid a separate Getattr RPC
for the common case where the client knows the correct file
size for O_APPEND writes.

This patch modifies nfsstat so that it displays a count of
these new RPCs for the "-E -c" option.

2 years agomount_nfs: Only create a mounttab file entry is nmount(2) succeeds
Rick Macklem [Sat, 28 May 2022 22:48:40 +0000 (15:48 -0700)]
mount_nfs: Only create a mounttab file entry is nmount(2) succeeds

mount_nfs creates entries in the mounttab file and umount removes
them.  Entries in the mounttab file ae used by rpc.umntall to
notify the NFS server that NFSv3 entries need to be removed when
they have not been removed by umount.

Without this patch, an enty will be created in the mounttab file,
even if the nmount(2) syscall fails for the mount.  This patch
modifies the code so that the mounttab entry is only created
after nmount(2) succeeds.

This change only affects NFSv3 and only affects how showmount
displays NFSv3 mounts.

MFC after: 2 weeks

2 years agoApply clang fix for assertion failure building putty 0.77 on i386
Dimitry Andric [Sat, 28 May 2022 21:26:37 +0000 (23:26 +0200)]
Apply clang fix for assertion failure building putty 0.77 on i386

Merge commit 45084eab5e63 from llvm git (by Arthur Eubanks):

  [clang] Fix some clang->llvm type cache invalidation issues

  Take the following as an example

    struct z {
      z (*p)();
    };

    z f();

  When we attempt to get the LLVM type of f, we recurse into z. z itself
  has a function pointer with the same type as f. Given the recursion,
  Clang simply treats z::p as a pointer to an empty struct `{}*`. The
  LLVM type of f is as expected. So we have two different potential
  LLVM types for a given Clang type. If we store one of those into the
  cache, when we access the cache with a different context (e.g. we
  are/aren't recursing on z) we may get an incorrect result. There is some
  attempt to clear the cache in these cases, but it doesn't seem to handle
  all cases.

  This change makes it so we only use the cache when we are not in any
  sort of function context, i.e. `noRecordsBeingLaidOut() &&
  FunctionsBeingProcessed.empty()`, which are the cases where we may
  decide to choose a different LLVM type for a given Clang type. LLVM
  types for builtin types are never recursive so they're always ok.

  This allows us to clear the type cache less often (as seen with the
  removal of one of the calls to `TypeCache.clear()`). We
  still need to clear it when we use a placeholder type then replace it
  later with the final type and other dependent types need to be
  recalculated.

  I've added a check that the cached type matches what we compute. It
  triggered in this test case without the fix. It's currently not
  check-clang clean so it's not on by default for something like expensive
  checks builds.

  This change uncovered another issue where the LLVM types for an argument
  and its local temporary don't match. For example in type-cache-3, when
  expanding z::dc's argument into a temporary alloca, we ConvertType() the
  type of z::p which is `void ({}*)*`, which doesn't match the alloca GEP
  type of `{}*`.

  No noticeable compile time changes:
  https://llvm-compile-time-tracker.com/compare.php?from=3918dd6b8acf8c5886b9921138312d1c638b2937&to=50bdec9836ed40e38ece0657f3058e730adffc4c&stat=instructions

  Fixes #53465.

  Reviewed By: rnk

  Differential Revision: https://reviews.llvm.org/D118744

PR: 264318
Reported by: mandree
MFC after: 3 days

2 years agolinux(4): Handle multiple mbufs in a control message chain in recvmsg
Dmitry Chagin [Sat, 28 May 2022 20:48:45 +0000 (23:48 +0300)]
linux(4): Handle multiple mbufs in a control message chain in recvmsg

PR: 230274
MFC after: 2 weeks

2 years agolinux(4): Ratelimit message about unupported cmsg
Dmitry Chagin [Sat, 28 May 2022 20:48:16 +0000 (23:48 +0300)]
linux(4): Ratelimit message about unupported cmsg

MFC after: 2 weeks

2 years agolinux(4): Handle IP_ORIGDSTADDR socket option for IPPROTO_IP protocol level
Dmitry Chagin [Sat, 28 May 2022 20:47:40 +0000 (23:47 +0300)]
linux(4): Handle IP_ORIGDSTADDR socket option for IPPROTO_IP protocol level

MFC after: 2 weeks

2 years agolinux(4): Add LINUX_RATELIMIT_MSG_OPT2 for future use
Dmitry Chagin [Sat, 28 May 2022 20:47:23 +0000 (23:47 +0300)]
linux(4): Add LINUX_RATELIMIT_MSG_OPT2 for future use

MFC after: 2 weeks

2 years agolinux(4): Overwrite SO_TIMESTAMP counterpart
Dmitry Chagin [Sat, 28 May 2022 20:46:38 +0000 (23:46 +0300)]
linux(4): Overwrite SO_TIMESTAMP counterpart

A socket cannot mix SO_TIMESTAMP and SO_TIMESTAMPNS: the two modes
are mutually exclusive.

MFC after: 2 weeks

2 years agolinux(4): Refactor linux_common_recvmsg()
Dmitry Chagin [Sat, 28 May 2022 20:46:22 +0000 (23:46 +0300)]
linux(4): Refactor linux_common_recvmsg()

To improve readability lower nesting level, better naming for variables.
No functional changes.

MFC after: 2 weeks

2 years agolinux(4): Handle SO_TIMESTAMPNS socket option
Dmitry Chagin [Sat, 28 May 2022 20:46:05 +0000 (23:46 +0300)]
linux(4): Handle SO_TIMESTAMPNS socket option

The SO_TIMESTAMPNS enables or disables the receiving of the SCM_TIMESTAMPNS
control message. The cmsg_data field is a struct timespec.
To distinguish between SO_TIMESTAMP and SO_TIMESTAMPNS in the recvmsg()
map the last one to the SO_BINTIME and convert bintime to the timespec.
In the rest, implementation is identical to the SO_TIMESTAMP.

MFC after: 2 weeks

2 years agolinux(4): Handle 64-bit SO_TIMESTAMP for 32-bit binaries
Dmitry Chagin [Sat, 28 May 2022 20:45:39 +0000 (23:45 +0300)]
linux(4): Handle 64-bit SO_TIMESTAMP for 32-bit binaries

To solve y2k38 problem in the recvmsg syscall the new SO_TIMESTAMP
constant were added on v5.1 Linux kernel. So, old 32-bit binaries
that knows only 32-bit time_t uses the old value of the constant,
and binaries that knows 64-bit time_t uses the new constant.

To determine what size of time_t type is expected by the user-space,
store requested value (SO_TIMESTAMP) in the process emuldata structure.

MFC after: 2 weeks

2 years agolinux(4): For future use replace malloc type for l_sockaddr by M_LINUX
Dmitry Chagin [Sat, 28 May 2022 20:44:48 +0000 (23:44 +0300)]
linux(4): For future use replace malloc type for l_sockaddr by M_LINUX

MFC after: 2 weeks

2 years agolinux(4): Improve recvmsg() readability
Dmitry Chagin [Sat, 28 May 2022 20:44:02 +0000 (23:44 +0300)]
linux(4): Improve recvmsg() readability

To improve recvmsg() readability SCM_ handlers moved to a separate
functions.

MFC after: 2 weeks

2 years agolinux(4): For future use move SCM definitions below socket options
Dmitry Chagin [Sat, 28 May 2022 20:42:23 +0000 (23:42 +0300)]
linux(4): For future use move SCM definitions below socket options

MFC after: 2 weeks

2 years agolinux(4): Avoid EISCONN if addr is specified for sendto()
Dmitry Chagin [Sat, 28 May 2022 20:42:09 +0000 (23:42 +0300)]
linux(4): Avoid EISCONN if addr is specified for sendto()

If the socket is in a connected state, the target address should be
ignored.

MFC after: 2 weeks

2 years agolinux(4): Fix SO_LINGER l_onoff value
Dmitry Chagin [Sat, 28 May 2022 20:31:06 +0000 (23:31 +0300)]
linux(4): Fix SO_LINGER l_onoff value

On Linux l_onoff should be 1 when linger is used.

MFC after: 2 weeks

2 years agolinux(4): Add a helper to copyout getsockopt value
Dmitry Chagin [Sat, 28 May 2022 20:30:22 +0000 (23:30 +0300)]
linux(4): Add a helper to copyout getsockopt value

For getsockopt(), optlen is a value-result argument, which is modified
on return to indicate the actual size of the value returned.
For some cases this was missed, fixed.

MFC after: 2 weeks

2 years agolinux(4): Check the socket before any others sanity checks
Dmitry Chagin [Sat, 28 May 2022 20:29:12 +0000 (23:29 +0300)]
linux(4): Check the socket before any others sanity checks

Strictly speaking, this check is performed by the kern_recvit(), but in
the Linux emulation layer before calling the kernel we do other sanity
checks and conversions from Linux types to the native types. This changes
an order of the error returning that is critical for some buggy Linux
applications.

For recvmmsg() syscall this fixes a panic in case when the user-supplied
vlen value is 0, then error is not initialized and garbage passed to the
bsd_to_linux_errno().

MFC after: 2 weeks

2 years agoFix a memory leak from caf73e58579
Alan Somers [Sat, 28 May 2022 19:17:37 +0000 (13:17 -0600)]
Fix a memory leak from caf73e58579

Don't shadow an already-local variable with another local declaration.

Reported by: dteske
MFC after: 13 days
MFC with: caf73e58579343fc1661f43554b30115bb940535
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D35331

2 years agoFinish cpuset_getaffinity() after f35093f8
Dmitry Chagin [Sat, 28 May 2022 17:53:08 +0000 (20:53 +0300)]
Finish cpuset_getaffinity() after f35093f8

Split cpuset_getaffinity() into a two counterparts, where the
user_cpuset_getaffinity() is intended to operate on the cpuset_t from
user va, while kern_cpuset_getaffinity() expects the cpuset from kernel
va.
Accordingly, the code that clears the high bits is moved to the
user_cpuset_getaffinity(). Linux sched_getaffinity() syscall returns
the size of set copied to the user-space and then glibc wrapper clears
the high bits.

MFC after: 2 weeks

2 years agosysent: Get rid of bogus sys/sysent.h include.
Dmitry Chagin [Sat, 28 May 2022 17:52:17 +0000 (20:52 +0300)]
sysent: Get rid of bogus sys/sysent.h include.

Where appropriate hide sysent.h under proper condition.

MFC after: 2 weeks

2 years agosctp: use a consistent view of the send parameters
Michael Tuexen [Sat, 28 May 2022 17:35:58 +0000 (19:35 +0200)]
sctp: use a consistent view of the send parameters

Reported by: syzbot+e26628a755f78bacff16@syzkaller.appspotmail.com
MFC after: 3 days

2 years agosctp: ignore SCTP_SENDALL flag on 1-to-1 style sockets
Michael Tuexen [Sat, 28 May 2022 17:07:10 +0000 (19:07 +0200)]
sctp: ignore SCTP_SENDALL flag on 1-to-1 style sockets

MFC after: 3 days

2 years agosctp: improve handling of send() when association is shutdown
Michael Tuexen [Sat, 28 May 2022 15:40:17 +0000 (17:40 +0200)]
sctp: improve handling of send() when association is shutdown

Accept send() calls only when the association is not being
shut down or the expicit message EOR mode is used and the
application provides follow-up data.

Reported by: syzbot+341e9ebd9d24ca7dc62a@syzkaller.appspotmail.com
MFC after: 3 days

2 years agosctp: cleanup of error paths
Michael Tuexen [Sat, 28 May 2022 15:15:14 +0000 (17:15 +0200)]
sctp: cleanup of error paths

MFC after: 3 days

2 years agoAdd several sanitizer ignore lists under /usr/lib/clang
Dimitry Andric [Fri, 27 May 2022 18:23:37 +0000 (20:23 +0200)]
Add several sanitizer ignore lists under /usr/lib/clang

Some of the sanitizers from compiler-rt can use ignore lists, which are
loosely modeled on valgrind's example. Upstream provides default lists
for AddressSanitizer, CFI, and MemorySanitizer, so install these in the
expected location, /usr/lib/clang/14.0.3/share.

Reviewed by: emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35338

2 years agosctp: cleanup, no functional change except on error paths
Michael Tuexen [Sat, 28 May 2022 09:34:20 +0000 (11:34 +0200)]
sctp: cleanup, no functional change except on error paths

MFC after: 3 days

2 years agounix: unp_externalize() can M_WAITOK
Gleb Smirnoff [Sat, 28 May 2022 03:48:38 +0000 (20:48 -0700)]
unix: unp_externalize() can M_WAITOK

Reviewed by: markj
Differential revision: https://reviews.freebsd.org/D35318

2 years agonfscl: Add a diagnostic printf() for a "should never happen" case
Rick Macklem [Fri, 27 May 2022 21:32:46 +0000 (14:32 -0700)]
nfscl: Add a diagnostic printf() for a "should never happen" case

When a NFSv4.1/4.2 session to the NFS server (not a pNFS DS) is
replaced, the old session should always be marked defunct by
nfsess_defunct being set non-zero.

However, the hang reported by the PR suggests that this might
be the case.

This patch adds a printf() to indicate this has somehow happened.

PR: 260011
MFC after:  2 weeks

2 years agonfscl: Do not handle NFSERR_BADSESSION in operation code
Rick Macklem [Fri, 27 May 2022 21:20:31 +0000 (14:20 -0700)]
nfscl: Do not handle NFSERR_BADSESSION in operation code

The NFSERR_BADSESSION reply from a NFSv4.1/4.2 server
is handled by newnfs_request().  It should not be handled
separately after newnfs_request() has returned.

These two cases were spotted during code inspection.
One of them should only redo what newnfs_request() already
did by the same "nfscl" thread.  The other might have
resulted in recovery being done twice, but the code is
only used for "pnfs" mounts, so that would be rare.
Also, since NFSERR_BADSESSION should only be replied by
a server after the server reboots, this would be extremely
rare.

MFC after:  2 weeks

2 years agotests: Fix i386 and powerpc build
Cy Schubert [Fri, 27 May 2022 14:19:53 +0000 (07:19 -0700)]
tests: Fix i386 and powerpc build

Fix:

tests/sys/kern/unix_passfd_test.c:414:24: error: comparison of integers
of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
        ATF_REQUIRE(getnfds() == nfds + MAXFDS);
        ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
powerpc.powerpc/tmp/usr/include/atf-c/macros.h:144:15: note: expanded
from macro 'ATF_REQUIRE'
        if (!(expression)) \
              ^~~~~~~~~~
1 error generated.
--- unix_passfd_test.o ---

2 years agoDo comprehensive UFS/FFS superblock integrity checks when reading a superblock.
Kirk McKusick [Fri, 27 May 2022 19:21:11 +0000 (12:21 -0700)]
Do comprehensive UFS/FFS superblock integrity checks when reading a superblock.

Historically only minimal checks were made of a superblock when it
was read in as it was assumed that fsck would have been run to
correct any errors before attempting to use the filesystem. Recently
several bug reports have been submitted reporting kernel panics
that can be triggered by deliberately corrupting filesystem superblocks,
see Bug 263979 - [meta] UFS / FFS / GEOM crash (panic) tracking
which is tracking the reported corruption bugs.

This change upgrades the checks that are performed. These additional
checks should prevent panics from a corrupted superblock. Although
it appears in only one place, the new code will apply to the kernel
modules and (through libufs) user applications that read in superblocks.

Reported by:  Robert Morris and Neeraj
Reviewed by:  kib
Tested by:    Peter Holm
PR:           263979
MFC after:    1 month
Differential Revision: https://reviews.freebsd.org/D35219

2 years agoApply clang fix for assertion failure building webkit2-gtk
Dimitry Andric [Fri, 27 May 2022 17:43:39 +0000 (19:43 +0200)]
Apply clang fix for assertion failure building webkit2-gtk

Merge commit 30baa5d2a450 from llvm git (by Richard Smith):

  PR45879: Fix assert when constant evaluating union assignment.

  Consider the form of the first operand of a class assignment not the
  second operand when implicitly starting the lifetimes of union members.
  Also add a missing check that the assignment call actually came from a
  syntactic assignment, not from a direct call to `operator=`.

PR: 264280
Reported by: bapt
MFC after: 3 days

2 years agosockbuf: remove unused mbuf counter and cluster counter
Gleb Smirnoff [Fri, 27 May 2022 15:19:28 +0000 (08:19 -0700)]
sockbuf: remove unused mbuf counter and cluster counter

With M_EXTPG mbufs these two counters already do not represent the
reality.  As we are moving towards protocol independent socket buffers,
which may not even use mbufs at all, the counters become less and less
relevant.  The only userland seeing them was 'netstat -x'.

PR: 264181 (exp-run)
Reviewed by: markj
Differential revision: https://reviews.freebsd.org/D35334

2 years agoReplace subversion with git in the installation DVD
Alan Somers [Thu, 26 May 2022 19:08:34 +0000 (13:08 -0600)]
Replace subversion with git in the installation DVD

I assume the original reason for Subversion's inclusion was to checkout
the base system.  But now we use git for that.

Reviewed by: gjb
Sponsored by: Axcient
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35329