]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 weeks agostand: Spell LUA_COMPILE_SET correctly.
Warner Losh [Sat, 11 May 2024 18:05:53 +0000 (12:05 -0600)]
stand: Spell LUA_COMPILE_SET correctly.

MFC After: 2 days
Sponsored by: Netflix

5 weeks agonvmecontrol: Implement telemetry-log command.
Warner Losh [Mon, 8 Apr 2024 16:54:12 +0000 (10:54 -0600)]
nvmecontrol: Implement telemetry-log command.

This produces the same data as the Linux nvme-cli 'nvme telemetry-log'
command. It extracts the telemetry log from drive. This is a variable
length log, so we read the first page and find out how much of the log
to grab. There's 3 levels of details available, and we grab the level of
detail specified on the command line.

Sponsored by: Netflix

5 weeks agonvme: Add telemetry page definitions
Warner Losh [Sun, 7 Apr 2024 23:48:42 +0000 (17:48 -0600)]
nvme: Add telemetry page definitions

Add definition for page types 7 and 8 for host initiated telemetry and
controller initiated telemetry (they differ by one byte, but that byte
that's defined in the host version is reserved in the controller
version).

Sponsored by: Netflix

5 weeks agotcp rack: improve handling of front states
Michael Tuexen [Sat, 11 May 2024 14:28:45 +0000 (16:28 +0200)]
tcp rack: improve handling of front states

When the RACK stack wants to send a FIN, but still has outstanding
or unsent data, it sends a challenge ack. Don't do this when the
TCP endpoint is still in the front states, since it does not
make sense.
Reviewed by: rrs
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D45122

5 weeks agoarm64: add page-to-pte convenience macros
Doug Moore [Sat, 11 May 2024 06:04:48 +0000 (01:04 -0500)]
arm64: add page-to-pte convenience macros

Define macros to perform pte to vm_page and vm_page to pte conversions
without composing two macros, and use the convenience macros wherever
possible.

Reviewed by: alc
Differential Revision: https://reviews.freebsd.org/D44699

5 weeks agointr: Document how to get the interrupt frame
Warner Losh [Fri, 10 May 2024 21:41:36 +0000 (15:41 -0600)]
intr: Document how to get the interrupt frame

Document that the only way to get the interrupt thread is to use
curthread->td_intr_frame, rather than the old-style of having a NULL
pointer for the interrupt thread. As of 38c35248fe3b, support for that
has been removed. I neglected to update that commit message with these
details.

Suggested by: mhorne

5 weeks agokern/intr: remove support for passing trap frame as argument
Elliott Mitchell [Fri, 8 Oct 2021 21:43:26 +0000 (14:43 -0700)]
kern/intr: remove support for passing trap frame as argument

While otherwise a handy potential approach, getting the trap frame via
the argument isn't documented and isn't supposed to be used.  With all
uses removed, now remove support to end the mixed calling conventions.

Differential Revision: https://reviews.freebsd.org/D37688

Reviewed by: imp, mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/1225

5 weeks agounbound: Vendor import 1.20.0
Cy Schubert [Fri, 10 May 2024 20:56:34 +0000 (13:56 -0700)]
unbound: Vendor import 1.20.0

Release notes at
https://www.nlnetlabs.nl/news/2024/May/08/unbound-1.20.0-released/

Security: The DNSBomb vulnerability CVE-2024-33655

Merge commit 'c2a80056864d6eda0398fd127dc0ae515b39752b' into main

5 weeks agotftpd: silence gcc overflow warnings
Dag-Erling Smørgrav [Fri, 10 May 2024 21:15:54 +0000 (23:15 +0200)]
tftpd: silence gcc overflow warnings

GCC 13 complains that we might be writing too much to an on-stack buffer
when createing a filename.

In practice there is a check that filename isn't too long given the
time format and other static characters so GCC is incorrect, but GCC
isn't wrong that we're potentially trying to put a MAXPATHLEN length
string + some other characters into a MAXPATHLEN buffer (if you ignore
the check GCC can't realistically evaluate at compile time).

Switch to snprintf to populate filename to ensure that future logic
errors don't result in a stack overflow.

Shorten the questionably named yyyymmdd buffer enough to slience the
warning (checking the snprintf return value isn't sufficent) while
preserving maximum flexibility for admins who use the -F option.

MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D45086

5 weeks agotftpd: Satisfy clang-analyzer.
Dag-Erling Smørgrav [Fri, 10 May 2024 21:15:49 +0000 (23:15 +0200)]
tftpd: Satisfy clang-analyzer.

* Replace `random()` with `arc4random()`.
* Change some variable types.
* Drop some unused assignments.

MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D45132

5 weeks agotftpd: Add missing include.
Dag-Erling Smørgrav [Fri, 10 May 2024 21:15:45 +0000 (23:15 +0200)]
tftpd: Add missing include.

This went unnoticed due to namespace pollution in our headers.

MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D45131

5 weeks agotftpd: Drop unneeded includes.
Dag-Erling Smørgrav [Fri, 10 May 2024 21:15:42 +0000 (23:15 +0200)]
tftpd: Drop unneeded includes.

MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D45130

5 weeks agotftpd: Add missing `-S` option to synopsis.
Dag-Erling Smørgrav [Fri, 10 May 2024 21:15:37 +0000 (23:15 +0200)]
tftpd: Add missing `-S` option to synopsis.

MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D45129

5 weeks agoCONTRIBUTING.md/style: spring cleaning
Alexander Ziaee [Fri, 10 May 2024 06:07:59 +0000 (02:07 -0400)]
CONTRIBUTING.md/style: spring cleaning

+ move Lua to alphabetize subsections
+ word manpages like other subsections
+ man PR's shouldn't bump document date

MFC after: (maybe MFC to BETA3 along w/ e7ff917057ea ?)

5 weeks agolinux: Adjust rlimit SIGPENDING & MSGQUEUE behaviour to match linprocfs
Ricardo Branco [Fri, 10 May 2024 14:20:16 +0000 (16:20 +0200)]
linux: Adjust rlimit SIGPENDING & MSGQUEUE behaviour to match linprocfs

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

5 weeks agounbound: Vendor import 1.20.0
Cy Schubert [Fri, 10 May 2024 20:48:53 +0000 (13:48 -0700)]
unbound: Vendor import 1.20.0

Release notes at
https://www.nlnetlabs.nl/news/2024/May/08/unbound-1.20.0-released/

Security: The DNSBomb vulnerability CVE-2024-33655

5 weeks agovm: Change the return types of kernacc and useracc to bool
John Baldwin [Fri, 10 May 2024 20:43:56 +0000 (13:43 -0700)]
vm: Change the return types of kernacc and useracc to bool

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D45156

5 weeks agouio: Use switch statements when handling UIO_READ vs UIO_WRITE
John Baldwin [Fri, 10 May 2024 20:43:36 +0000 (13:43 -0700)]
uio: Use switch statements when handling UIO_READ vs UIO_WRITE

This is mostly to reduce the diff with CheriBSD which adds additional
constants to enum uio_rw, but also matches the normal style used for
uio_segflg.

Reviewed by: kib, emaste
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D45142

5 weeks agomd: Merge two switch statements in mdstart_vnode
John Baldwin [Fri, 10 May 2024 20:43:23 +0000 (13:43 -0700)]
md: Merge two switch statements in mdstart_vnode

While here, use bp->bio_cmd instead of auio.uio_rw to drive read vs
write behavior.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D45155

5 weeks agosctp: improve heartbeat timer computation
Michael Tuexen [Fri, 10 May 2024 18:58:01 +0000 (20:58 +0200)]
sctp: improve heartbeat timer computation
PR: 278666
Reviewed by: Albin Hellqvist
MFC after: 3 days
Pull Request: https://reviews.freebsd.org/D45107

5 weeks agoRevert "grdc: Add copyright"
Warner Losh [Fri, 10 May 2024 16:50:46 +0000 (10:50 -0600)]
Revert "grdc: Add copyright"

It turns out this wasn't in 4.4BSD. I had a false positive for gdc.c
(which is in 4.4BSD, but part of gated, not this). gdc.c comes from the
ncurses tests, so it shouldn't have this copyright. This version is
mostly Amos Shapir and John Lupien's code. It comes from ncurses test
directory. ncurses has made dozens of improvements to this file since
we imported it in 1997 (which pre-dates their online history), so it's
not clear if their new copyright applies (which doesn't mention Amos
or John) or if some other copyright applies. In any case, it wasn't
4.4BSD, so revert this.

This reverts commit 6ed7d0e3ac9c34fa9deeb73f2322b9f25b708788.

Sponsored by: Netflix

5 weeks agosctp: store heartbeat creation time as time_t
Michael Tuexen [Fri, 10 May 2024 18:40:15 +0000 (20:40 +0200)]
sctp: store heartbeat creation time as time_t
Reported by: Coverity Scan
CID: 1493087
MFC after: 3 days

5 weeks agosctp: store vtag expire time as time_t
Michael Tuexen [Fri, 10 May 2024 18:25:04 +0000 (20:25 +0200)]
sctp: store vtag expire time as time_t
Reported by: Coverity Scan
CID: 1492525
CID: 1493239
MFC after: 3 days

5 weeks agoIncrease IOAPIC_MAX_ID to 255 (from 254)
Ed Maste [Fri, 10 May 2024 17:40:59 +0000 (13:40 -0400)]
Increase IOAPIC_MAX_ID to 255 (from 254)

A test system provided by AMD panicked with "madt_parse_apics:
I/O APIC ID 255 too high".  I/O APIC ID 255 is acceptable, so increase
the limit.

Reviewed by: jhb, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45157

5 weeks agosctp: store cookie secret change time as time_t
Michael Tuexen [Fri, 10 May 2024 18:09:06 +0000 (20:09 +0200)]
sctp: store cookie secret change time as time_t
Reported by: Coverity Scan
CID: 1492349
CID: 1493281
MFC after: 3 days

5 weeks agomadt: print CPU APIC ID as signed int
Ed Maste [Fri, 10 May 2024 18:57:22 +0000 (14:57 -0400)]
madt: print CPU APIC ID as signed int

Instead of printing something like "MADT: Found CPU APIC ID 4294967295
ACPI ID 512: disabled" print the APIC ID as a singed int for a more
user-friendly -1.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45158

5 weeks agokmod.mk use ${XARGS}
Simon J. Gerraty [Fri, 10 May 2024 19:05:05 +0000 (12:05 -0700)]
kmod.mk use ${XARGS}

Also ${XARGS_J} this allows use of non-BSD xargs when building
kernel modules.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D45146

5 weeks agonvmf_transport: Remove invalid assertion
John Baldwin [Fri, 10 May 2024 16:12:03 +0000 (09:12 -0700)]
nvmf_transport: Remove invalid assertion

This is leftover from an earlier iteration of the code where 'nt' was
not dynamically allocated but was the passed in 'ops' pointer so was
always alive.

Reported by: Coverity Scan
CID:   1545042
Sponsored by: Chelsio Communications

5 weeks agoctl_backend_block: Correct value of NVME nsdata nuse field
John Baldwin [Fri, 10 May 2024 16:09:53 +0000 (09:09 -0700)]
ctl_backend_block: Correct value of NVME nsdata nuse field

Reported by: Coverity Scan
CID:   1545043
Sponsored by: Chelsio Communications

5 weeks agonvmecontrol: Free the addrinfo list when failing to open a TCP socket
John Baldwin [Fri, 10 May 2024 16:06:54 +0000 (09:06 -0700)]
nvmecontrol: Free the addrinfo list when failing to open a TCP socket

Reported by: Coverity Scan
CID:   1545048
Sponsored by: Chelsio Communications

5 weeks agonvmecontrol: Free array of I/O queue pairs on failure to handoff
John Baldwin [Fri, 10 May 2024 16:04:51 +0000 (09:04 -0700)]
nvmecontrol: Free array of I/O queue pairs on failure to handoff

This is harmless but cleaner.

Reported by: Coverity Scan
CID:   1545041,1545049
Sponsored by: Chelsio Communications

5 weeks agonvmf: Use strlcpy instead of strncpy to ensure termination
John Baldwin [Fri, 10 May 2024 15:56:51 +0000 (08:56 -0700)]
nvmf: Use strlcpy instead of strncpy to ensure termination

Reported by: Coverity Scan
CID:   1545054
Sponsored by: Chelsio Communications

5 weeks agonvmecontrol: Fix a sizeof mismatch
John Baldwin [Fri, 10 May 2024 15:54:02 +0000 (08:54 -0700)]
nvmecontrol: Fix a sizeof mismatch

In this case it is harmless since it is an array of pointers so the
resulting length is identical.

Reported by: Coverity Scan
CID: 1545055
Sponsored by: Chelsio Communications

5 weeks agogrdc: Add copyright
Warner Losh [Fri, 10 May 2024 15:22:44 +0000 (09:22 -0600)]
grdc: Add copyright

Add the stock BSD copyright and license from the 4.4-Lite distribution
(indirected by SPDX).

Sponsored by: Netflix

5 weeks agogrdc: add countdown timer mode
Gavin Atkinson [Fri, 10 May 2024 15:22:38 +0000 (09:22 -0600)]
grdc: add countdown timer mode

PR: 35113
Differential Revision: https://reviews.freebsd.org/D43463

5 weeks agoposix: POSIX-1.2008 moved SA_* from XSI to base standard
Warner Losh [Fri, 10 May 2024 15:18:43 +0000 (09:18 -0600)]
posix: POSIX-1.2008 moved SA_* from XSI to base standard

Starting with POSIX-1.2008, "The SA_RESETHAND, SA_RESTART, SA_SIGINFO,
SA_NOCLDWAIT, and SA_NODEFER constants are moved from the XSI option to
the Base." Make them so visible.

PR: 275328
Sponsored by: Netflix

5 weeks agoconf: Generate fdt_static_dtb.h in OBJDIR
Justin Hibbits [Thu, 9 May 2024 19:46:09 +0000 (15:46 -0400)]
conf: Generate fdt_static_dtb.h in OBJDIR

Though the kernel build expects ${.OBJDIR} to be equal to ${.CURDIR}
that may not always be the case.  Correctly generate fdt_static_dtb.h in
${.OBJDIR}, which is conceptually more correct anyway.

Obtained from: Juniper Networks, Inc.

5 weeks agotpm20: Support partial reads
Justin Hibbits [Thu, 9 May 2024 19:27:35 +0000 (15:27 -0400)]
tpm20: Support partial reads

Summary:
In some cases the TPM utilities may read only a partial block, instead
of a full block.  If a new command starts while in the middle of a read
it may cause the TPM to go catatonic and no longer respond to SPI.

Reviewed by: kd
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D45140

5 weeks agoukswitch: fix non-debug build
Ed Maste [Fri, 10 May 2024 12:52:06 +0000 (08:52 -0400)]
ukswitch: fix non-debug build

PR: 278847
Sponsored by: The FreeBSD Foundation

5 weeks agocat: Missed a couple.
Dag-Erling Smørgrav [Fri, 10 May 2024 11:04:56 +0000 (13:04 +0200)]
cat: Missed a couple.

MFC after: 3 days
Sponsored by: Klara, Inc.

5 weeks agocat: Check for lack of success rather than a specific failure.
Dag-Erling Smørgrav [Fri, 10 May 2024 10:59:18 +0000 (12:59 +0200)]
cat: Check for lack of success rather than a specific failure.

MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: oshogbo
Differential Revision: https://reviews.freebsd.org/D45149

5 weeks agoarm64: Update the page table list in locore
Andrew Turner [Wed, 24 Apr 2024 10:23:42 +0000 (11:23 +0100)]
arm64: Update the page table list in locore

The comment describing the page tables was out of date. Update it with
the current list.

Sponsored by: Arm Ltd

5 weeks agoarm64: Merge common page table creation code
Andrew Turner [Thu, 25 Apr 2024 13:06:23 +0000 (14:06 +0100)]
arm64: Merge common page table creation code

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45061

5 weeks agoarm64/gicv3: Check if the hardware supports LPIs
Andrew Turner [Tue, 23 Apr 2024 11:28:23 +0000 (12:28 +0100)]
arm64/gicv3: Check if the hardware supports LPIs

Some simulators have the ITS in the DTB passed to the kernel, however
it is a runtime configuration option to enable it.

Check the GICD_TYPER register to see if LPIs are enabled before
attaching the ITS driver.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D44914

5 weeks agodev/psci: Check all compat strings
Andrew Turner [Tue, 23 Apr 2024 11:27:09 +0000 (12:27 +0100)]
dev/psci: Check all compat strings

When searching for the PSCI FDT node we only check a few compat strings.
Use the existing compat_data array to check all strings the driver may
attach to.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D44913

5 weeks agoarm64: Flush the spintable release address
Andrew Turner [Fri, 3 May 2024 16:17:25 +0000 (17:17 +0100)]
arm64: Flush the spintable release address

Ensure the spintable release address is written back from the cache
to memory. The other CPUs reading this may not be reading it with the
cache enabled so ensure it is written to the point of coherency
before issuing the wakeup sev.

As cpu_dcache_wbinv_range includes the needed barrier remove it from
the inline asm before the sev instruction.

Reviewed by: jhibbits, kevans
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45083

5 weeks agoarm64: Support a shared release for spin-table
Andrew Turner [Mon, 29 Apr 2024 14:23:42 +0000 (15:23 +0100)]
arm64: Support a shared release for spin-table

When releasing multiple CPUs that share a release address we need them
to wait for their turn to boot. Add a mechanism to do this by booting
them until they enable the TLB before waiting their turn to enter
init_secondary.

Reviewed by: jhibbits, kevans
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45082

5 weeks agoam64: Allow cpu.h to be included from assembly
Andrew Turner [Fri, 3 May 2024 16:07:29 +0000 (17:07 +0100)]
am64: Allow cpu.h to be included from assembly

Reviewed by: jhibbits, kevans
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45081

5 weeks agoAdd man page for nfslockd.
Dag-Erling Smørgrav [Fri, 10 May 2024 09:23:13 +0000 (11:23 +0200)]
Add man page for nfslockd.

PR: 130238
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45139

5 weeks agomdconfig: Print options when listing devices
Ricardo Branco [Fri, 10 May 2024 04:42:22 +0000 (22:42 -0600)]
mdconfig: Print options when listing devices

PR: 278624
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1210

5 weeks agoExplain cron.d
Paweł Krawczyk [Fri, 10 May 2024 04:21:18 +0000 (22:21 -0600)]
Explain cron.d

Add details on the format of system cron files, which are mentioned in
cron(8) which refers here but barely explained here.

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

5 weeks agoat cron file is now in /etc/cron.d
Paweł Krawczyk [Fri, 10 May 2024 04:21:18 +0000 (22:21 -0600)]
at cron file is now in /etc/cron.d

PR: 243380
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1106

5 weeks agosysexits: Tidy deprecated header and manual
Alexander Ziaee [Fri, 10 May 2024 02:43:39 +0000 (20:43 -0600)]
sysexits: Tidy deprecated header and manual

<sysexits.h> was deprecated in the base system in a1432b4 for FreeBSD
8.0 and is retained only for backwards compatibility.  Make that clear,
since sysexits(3) suggested using it since it was in style(9) prior
to this.

MFC after: 1 week
Co-authored-by: imp
Fixes: a1432b4
Reviewed by: imp, pauamma (previous version)
Pull Request https://github.com/freebsd/freebsd-src/pull/1195

5 weeks agoUpdate README.md to add pointer to release page.
Lukas R. Jackson [Fri, 10 May 2024 02:36:19 +0000 (20:36 -0600)]
Update README.md to add pointer to release page.

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

5 weeks agoahc(4): Default to memory mapped IO
HP van Braam [Fri, 10 May 2024 02:13:03 +0000 (20:13 -0600)]
ahc(4): Default to memory mapped IO

When this driver was written it made sense to make this default to off,
but these days almost all BIOSses will do the right thing. Furthermore
non-mmio communication only works on Intel architectures.

So lets default to allowing mmio, but not change the semantics of the
AHC_ALLOW_MEMIO flag to not break existing installs. Also document the
already existing hint.ahc.<unit>.allow_memio.

Signed-off-by: HP van Braam <hp@tmm.cx>
Reviewed by: imp (small style tweak)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1219

5 weeks agoipfw: correctly report table manipulation errors
Ben Wilber [Fri, 10 May 2024 02:08:15 +0000 (20:08 -0600)]
ipfw: correctly report table manipulation errors

Let ipfw(8) report the actual error instead of the error that
may have come from calling printf().

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

5 weeks agoFix memory corruption in C++ demangler
Justine Tunney [Fri, 10 May 2024 01:55:45 +0000 (19:55 -0600)]
Fix memory corruption in C++ demangler

The __cxa_demangle_gnu3() and cpp_demangle_gnu3() functions segfault on
various libcxxabi test cases due to a copy and paste error. This change
fixes that.

This is a subset of https://github.com/libcxxrt/libcxxrt/pull/34 which
fixes the immediate problem.

Reviewed by: imp, emaste (I think)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1222

5 weeks agonfscl: Do not do readahead for directories
Rick Macklem [Fri, 10 May 2024 01:33:13 +0000 (18:33 -0700)]
nfscl: Do not do readahead for directories

For a very long time, the NFS client has done readahead for
directory blocks.  Unlike data blocks, the readahead cannot
begin until the Readdir RPC reply has been received, since
the directory offset cookie in that Readdir RPC reply is needed.
As such, the readahead is serialized and does not seem to
provide any real benefit.

Recent testing/benchmarking shows that removing this
readahead code for Readdir does not have a negative impact
on performance.

Therefore, this patch deletes the readahead code for Readdir,
which simplifies the code and may make future changes simpler.

MFC after: 1 month

5 weeks agoAllow -DNO_STRICT_REGEX to restore historic regex behavior
Simon J. Gerraty [Fri, 10 May 2024 01:29:43 +0000 (18:29 -0700)]
Allow -DNO_STRICT_REGEX to restore historic regex behavior

Allow restoring the behavior of '{' as described in regex(3).
Ie. only treat it as start of bounds if followed by a digit.

If NO_STRICT_REGEX is not defined, the behavior introduced by
commit a4a801688c909ef39cbcbc3488bc4fdbabd69d66 is retained,
otherwise the previous behavior is restored.

Differential Revision: https://reviews.freebsd.org/D45134

5 weeks agoNew sysctl to disable NOMATCH until devmatch runs
Isaac Cilia Attard [Mon, 29 Apr 2024 20:44:27 +0000 (22:44 +0200)]
New sysctl to disable NOMATCH until devmatch runs

Introduce hw.bus.devctl_nomatch_enabled and use it to suppress NOMATCH
until devmatch runs

There's a lot of NOMATCH events generated at boot. We also run devmatch
once during early boot to load unmatched devices. To avoid redundant
work, don't start generating NOMATCH events until after devmatch runs.
Set hw.bus.devctl_nomatch_enabled=1 just before we run devmatch. The
kernel will suppress NOMATCH events until this is set to true.

This saves about 170ms from the boot on aarch64 running atop Apple
M-series processors and the VMWare Fusion hypervisor.

Reviewed by:    imp, cperciva
MFC after:      3 days
Sponsored by:   Google Summer of Code
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1213

5 weeks agoAddress module reproducibility issues
Dan McGregor [Thu, 9 May 2024 23:37:52 +0000 (17:37 -0600)]
Address module reproducibility issues

Use .PATH & bare filename. This prevents the real source path from
being included in the built object, which improves reproducibility.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1211

5 weeks agoarp.8: don't document a syntax that doesn't exist
Lexi Winter [Thu, 9 May 2024 23:26:41 +0000 (17:26 -0600)]
arp.8: don't document a syntax that doesn't exist

The arp.8 manpage documents 'arp -d <addr> pub', but the 'pub' flag is
not accepted by the arp command.  Remove this incorrect documentation.

Reviewed by: imp, gleb, mp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1215

5 weeks agointr/x86: replace use of vector in interface with intsrc
Elliott Mitchell [Thu, 9 May 2024 23:04:35 +0000 (17:04 -0600)]
intr/x86: replace use of vector in interface with intsrc

Several x86 interrupt core functions were already operating on intsrc
structures.  Now switch the remaining 3 to intsrc for consistency.

Swap the order of intr_add_handler()'s first two arguments.  This
matches INTRNG and is more consistent with other functions in this
interface.

Differential Revision: https://reviews.freebsd.org/D35386
Reviewed by: imp, markj (previous version)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1126

5 weeks agoarm: add missing atomic-pointer functions
Elliott Mitchell [Thu, 9 May 2024 23:04:35 +0000 (17:04 -0600)]
arm: add missing atomic-pointer functions

The pointer function types were missing for these functions, so add
them.  Valuable for places where type sizes vary by architecture.

Differential Revision: https://reviews.freebsd.org/D37778
Reviewed by: imp, andrew
Pull Request: https://github.com/freebsd/freebsd-src/pull/1126

5 weeks agosys: declare bit sets unsigned
Elliott Mitchell [Thu, 9 May 2024 23:04:35 +0000 (17:04 -0600)]
sys: declare bit sets unsigned

Substantially reduce the number of signed/unsigned issues (warnings if
enabled).  While these are presently disabled for FreeBSD, being able to
enable another warning would be good.

Differential Revision: https://reviews.freebsd.org/D32793
Reviewed by: imp, jhibbits
Pull Request: https://github.com/freebsd/freebsd-src/pull/1126

5 weeks agointrng: switch flag arguments to unsigned
Elliott Mitchell [Thu, 9 May 2024 23:04:35 +0000 (17:04 -0600)]
intrng: switch flag arguments to unsigned

The flag variables behind these are all unsigned.  As such adjust the
declarations to match reality and reduce the number of mismatches.

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

5 weeks agokern/intr: redeclare intr_setaffinity()'s third arg constant
Elliott Mitchell [Thu, 9 May 2024 23:04:35 +0000 (17:04 -0600)]
kern/intr: redeclare intr_setaffinity()'s third arg constant

This matches reality and allows removal of a __DECONST().

Fixes: 4c72d075a57 ("LinuxKPI: const argument to irq_set_affinity_hint()")
Fixes: 9b33b154b53 ("Add support to cpuset for binding hardware interrupts")
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1126

5 weeks agokern/intr: change ->ie_irq to unsigned
Elliott Mitchell [Thu, 9 May 2024 23:04:34 +0000 (17:04 -0600)]
kern/intr: change ->ie_irq to unsigned

All architecture implementations actually want this to be unsigned.
INTRNG the equivalent is overtly unsigned.  x86 and PowerPC merely avoid
the need to explicitly convert at several points.

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

5 weeks agoarm/pmu: remove passing trap frame as argument
Elliott Mitchell [Thu, 9 May 2024 23:04:34 +0000 (17:04 -0600)]
arm/pmu: remove passing trap frame as argument

While otherwise a handy potential approach, getting the trap frame via
the argument isn't documented and isn't supposed to be used.  Adjust
pmu_intr() to instead use curthread->td_intr_frame, which is the proper
way.

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

5 weeks agosound: Rename oss_audioinfo->real_device to oss_audioinfo->legacy_device
Christos Margiolis [Thu, 9 May 2024 19:08:17 +0000 (21:08 +0200)]
sound: Rename oss_audioinfo->real_device to oss_audioinfo->legacy_device

The OSS manual now documents this field as "legacy_device".

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

5 weeks agosound: Add missing oss_mixerinfo devnode and legacy_device fields
Christos Margiolis [Thu, 9 May 2024 19:08:11 +0000 (21:08 +0200)]
sound: Add missing oss_mixerinfo devnode and legacy_device fields

They are missing from soundcard.h and are in fact used by some
applications, such as OSS' ossinfo(1):
http://manuals.opensound.com/developer/ossinfo.c.html

The new size for filler is chosen according to the most recent official
version of soundcard.h, which includes those 2 fields.

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

5 weeks agosound: Fix oss_sysinfo->numcards
Christos Margiolis [Thu, 9 May 2024 19:08:01 +0000 (21:08 +0200)]
sound: Fix oss_sysinfo->numcards

According to the OSS manual, oss_sysinfo->numcards holds the number of
detected audio devices in the system, while the current ncards variable,
whose value is assigned to oss_sysinfo->numcards, holds the number of
currently registered devices only.

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

5 weeks agosound: Remove nmix variable from mixer_oss_mixerinfo()
Christos Margiolis [Thu, 9 May 2024 19:07:48 +0000 (21:07 +0200)]
sound: Remove nmix variable from mixer_oss_mixerinfo()

nmix is used to compare against oss_mixerinfo->dev, which is a
user-supplied value to select the mixer device (if not -1, in which case
we'll select the default one) we want to fetch the information of. It is
also used to set oss_mixerinfo->dev in case it is -1.

However, nmix is at best redundant, since we have the loop counter
already (i), and confusing at worst.

For example, suppose a system with 3 mixer devices. We call
SNDCTL_MIXERINFO with oss_mixerinfo->dev=1, meaning we want to get
information for /dev/mixer1. Suppose /dev/mixer0 detaches while inside
the loop, so we'll hit the loop's "continue" case, and nmix won't get
incremented (i.e will stay 0 for now). At this point nmix counts 1
device less, so when it reaches 1, we'll be fetching /dev/mixer2's
information instead of /dev/mixer1's.

This is also true in case the mixer device disappears prior to the call
to mixer_oss_mixerinfo().

Simply remove nmix and use the loop counter to both set
oss_mixerinfo->dev and check against it in case a non -1 value is
supplied.

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

5 weeks agosnd_hdsp(4): RME HDSP 9632 and HDSP 9652 sound card driver.
Florian Walpen [Thu, 9 May 2024 18:36:40 +0000 (19:36 +0100)]
snd_hdsp(4): RME HDSP 9632 and HDSP 9652 sound card driver.

Add a sound(4) bridge device driver for the RME HDSP 9632 and HDSP 9652
sound cards. These cards require a nowadays rare PCI 32bit (not PCIe)
slot, but still see use due to their value and wealth of features.
The HDSP 9632 is mostly comparable to the newer HDSPe AIO, while the
HDSP 9652 is similar to the HDSPe RayDAT. These HDSPe PCIe cards are
supported by the snd_hdspe(4) driver which was taken as a starting point
for development of snd_hdsp(4).

Implementation is kept separately due to substantial differences in
hardware configuration and to allow easy removal in case PCI 32bit
support would be phased out in the future.

The snd_hdsp(4) kernel module is not enabled by default, and can be
loaded at runtime with kldload(8) or during boot via loader.conf(5).
Basic operation was tested with both cards, not including all optional
cable connectors and expansion boards. Features should be roughly on par
with the snd_hdspe(4) supported cards.

Reviewed by: christos, br
Differential Revision: https://reviews.freebsd.org/D45112

5 weeks agoip17x: fix non-debug build
Ed Maste [Wed, 8 May 2024 13:20:44 +0000 (09:20 -0400)]
ip17x: fix non-debug build

PR: 278847
Reviewed by: jhibbits
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45133

6 weeks agofusefs: make the tests more robust to changes to maxphys
Alan Somers [Thu, 9 May 2024 14:40:21 +0000 (08:40 -0600)]
fusefs: make the tests more robust to changes to maxphys

Remove assumptions in two test cases that maxphys won't be huge.

Reported by: kib
MFC after: 2 weeks
Sponsored by: Axcient

6 weeks agosctp: minor cleanup
Michael Tuexen [Wed, 8 May 2024 22:51:09 +0000 (00:51 +0200)]
sctp: minor cleanup

No functional chnage intended.
MFC after: 3 days

6 weeks agosctp: allow stcb == NULL in sctp_shutdown()
Michael Tuexen [Wed, 8 May 2024 22:43:28 +0000 (00:43 +0200)]
sctp: allow stcb == NULL in sctp_shutdown()

Consistently handle this case.
Reported by: Coverity Scan
CID: 1533813
MFC after: 3 days

6 weeks agosctp: don't provide uninitialized memory to process_chunk_drop()
Michael Tuexen [Wed, 8 May 2024 22:17:13 +0000 (00:17 +0200)]
sctp: don't provide uninitialized memory to process_chunk_drop()

Right now, the code in process_chunk_drop() does not look the
the corresponding fields.
Therefore, no functional change intended.
Reported by: Coverity Scan
CID: 1472476
MFC after: 3 days

6 weeks agosctp: fix sctp_sendall() when an mbuf chain is provided
Michael Tuexen [Wed, 8 May 2024 21:41:17 +0000 (23:41 +0200)]
sctp: fix sctp_sendall() when an mbuf chain is provided

In this case uio is NULL, which needs to be checked and m must
be copied into the sctp_copy_all structure.
Reported by: Coverity Scan
CID: 1400449
MFC after: 3 days

6 weeks agoUpdate example from gcc6 to gcc13
Warner Losh [Thu, 9 May 2024 14:16:15 +0000 (08:16 -0600)]
Update example from gcc6 to gcc13

We only "support" gcc12 and gcc13 for cross building, for some value of
"support". Update the example from gcc6 to gcc13.

Sponsored by: Netflix

6 weeks agosctp: add missing check
Michael Tuexen [Wed, 8 May 2024 21:01:06 +0000 (23:01 +0200)]
sctp: add missing check

If memory allocation fails, m is NULL. Since this is possible,
check for it.
Reported by: Coverity Scan
CID: 1086866
MFC after: 3 days

6 weeks agolibpfctl: fix file descriptor leak
Kristof Provost [Thu, 9 May 2024 11:52:22 +0000 (13:52 +0200)]
libpfctl: fix file descriptor leak

pfctl_get_rules_info() opened a netlink socket, but failed to close it again.
Fix this by factoring out the netlink-based function into a _h variant that
takes struct pfctl_handle, and implement pfctl_get_rules_info() based on that,
remembering to close the fd.

While here migrate all in-tree consumers to the _h variant.

MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")

6 weeks agoxen/debug: remove usage of sbuf_{clear,finish}() on drained sbuf
Roger Pau Monné [Thu, 2 May 2024 13:12:16 +0000 (15:12 +0200)]
xen/debug: remove usage of sbuf_{clear,finish}() on drained sbuf

Using sbuf_clear() on a drained sbuf is explicitly prohibited, and using
sbuf_finish() after printing a trace leads to a single trace being printed, as
after calling sbuf_finish() further attempts to use the same sbuf will lead to
a panic.

While there also switch to using xen_emergency_print() instead of attempting to
write directly to the hypervisor console.  xen_emergency_print() can be
implemented per-arch to use a different mechanism than the console hypercall
(note the default implementation still uses the console hypercall).

Fixes: df62b8a25f47 ('xen: add a handler for the debug interrupt')
Sponsored by: Cloud Software Group
Reviewed by: markj
Differential review: https://reviews.freebsd.org/D45060

6 weeks agorelease: make dependencies, not recursive make
Colin Percival [Thu, 9 May 2024 07:52:25 +0000 (00:52 -0700)]
release: make dependencies, not recursive make

For historical reasons, the vm-release and cloudware-release targets
were written as recursive makes of ${VMTARGETS} and ${CLOUDTARGETS};
this worked fine until we started running `make release -jN` and
had both VM and cloud targets depending on ${QEMUTGT}, at which
point things exploded when we tried to build the port twice at the
same time.

Switch vm-release and cloudware-release to have make dependencies on
their individual components; this way a single make process runs and
is aware of the duplicate dependency (and only runs it once).

MFC after: 5 days

6 weeks agonet80211: add new ciphers and RSN flags
Adrian Chadd [Fri, 19 Apr 2024 14:05:44 +0000 (07:05 -0700)]
net80211: add new ciphers and RSN flags

These are the rest of the ciphers and RSN flags from 802.11-2016.

* add the rest of the ciphers from 802.11-2016
* add the rest of the RSN flags from 802.11-2016

Of special interest here are the extended key ID field for supporting
>1 unicast key (to support seamless rekeying w/out dropping frames)
and the MFP (management frame protection) config bits.

This is a no-op; no code is using these new fields.
(In particular, no code in net80211 uses the RSN capability bits;
but that will change when we start on MFP support.)

Differential Revision: https://reviews.freebsd.org/D44864

6 weeks agonet80211: add driver / crypto methods to set the hardware / software cipher suites
Adrian Chadd [Thu, 18 Apr 2024 01:47:07 +0000 (18:47 -0700)]
net80211: add driver / crypto methods to set the hardware / software cipher suites

Drivers currently announce hardware crypto cipher support by
setting up ic_cryptocaps.

This adds two public function calls:

* ieee80211_set_software_ciphers() - set the software cipher set;
* ieee80211_set_hardware_ciphers() - set the hardware cipher set.

For now these just call into the newly crypto routines to set the ciphers.

This then adds the two crypto routines, similarly named, to set
the hardware/software cipher suite.

This is a no-op right now - wep/tkip/ccmp are already set by default
so drivers aren't required to call these routines for software
encryption, and drivers already set ic_cryptocaps for hardware
encryption.

Differential Revision: https://reviews.freebsd.org/D44827

6 weeks agowpa: Remove the now not-needed local logic to hard-code cipher support
Adrian Chadd [Wed, 17 Apr 2024 01:55:28 +0000 (18:55 -0700)]
wpa: Remove the now not-needed local logic to hard-code cipher support

A previous commit now exposes the supported net80211 ciphers for the
given NIC, rather than the hardware cipher list.  This is going to be
especially important moving forward when we add more cipher and key
management support.

Differential Revision: https://reviews.freebsd.org/D44821

6 weeks agonet80211: add a new field specifically for announcing specific ciphers
Adrian Chadd [Wed, 17 Apr 2024 01:53:52 +0000 (18:53 -0700)]
net80211: add a new field specifically for announcing specific ciphers

This dates way, way back with the original net80211 support w/ atheros chips.

The earliest chip (AR5210) had limitations supporting software encryption.
It only had the four WEP slots, and not any keycache entries.  So when
trying to do CCMP/TKIP encryption would be enabled and the key slots
would have nothing useful in them, resulting in garbage encryption/decryption.

I changed this back in 2012 to disable supporting hardware WEP for AR5210
so if_ath(4) / net80211 crypto is all done in software and yes,
I could do CCMP/TKIP on AR5210 in software.

Fast-forward to newer-ish hardware - the Qualcomm 11ac hardware.
Those also don't support pass-through keycache slots! Well, the hardware
does at that layer, but then there's a whole offload data path encap/decap
layer that's turning the frames from raw wifi into ethernet frames (for
"dumb" AP behaviours) or "wifi direct" frames (ie, "windows".)
This hides a bunch of header frame contents required for doing the software
encryption / decryption path.

But then if you enable the raw transmit/receive frame format it ALSO
bypasses the hardware encryption/decryption engine!

So for those NICs:

* If you want to do encryption, you can only use the firmware supported
  ciphers w/ wifi direct or ethernet;
* If you want to use software encrypt/decrypt, you MUST disable all encryption
  and instead use 100% software encryption.

The wpa_supplicant bsd driver code has a specific comment about this and
flips on supporting WEP/TKIP/CCMP, which is understandable but it doesn't
fix the ACTUAL intention of all of this stuff.

So:

* create a new field, ic_sw_cryptocaps
* populate it with the default supported set of ciphers for net80211
  (right now wep, tkip, ccmp)
* Communicate the combination of both ic_sw_cryptocaps and ic_cryptocaps
  to wpa_supplicant via the relevant devcap ioctl.
* Update manpage.

I'll follow this up with a driver_bsd.c change in wpa_supplicant to
trust this again, and then start adding the other cipher support there.

Differential Revision: https://reviews.freebsd.org/D44820

6 weeks agonvme: Explicitly align struct nvme_command on an 8 byte boundary
John Baldwin [Wed, 8 May 2024 23:05:39 +0000 (16:05 -0700)]
nvme: Explicitly align struct nvme_command on an 8 byte boundary

This was already true for most architectures due to uint64_t structure
members.  However, i386 is special in that it only requires 4 byte
alignment for uint64_t.  As a result, casts from struct nvme_command
to struct nvmf_fabric_cmd were raising a "cast increases alignment"
warning on i386.  Explicitly aligning struct nvme_command pacifies
this warning on i386.

Reported by: rscheff
Sponsored by: Chelsio Communications

6 weeks agolinuxkpi: Make arch_io_*_memtype_wc amd64-only
Tijl Coosemans [Wed, 8 May 2024 18:49:56 +0000 (20:49 +0200)]
linuxkpi: Make arch_io_*_memtype_wc amd64-only

Linux only implements these functions on x86.  They return 0 on other
architectures.  The FreeBSD implementation calls PHYS_TO_DMAP but this
panics on i386 because it does not have a direct map so return 0 on i386
as well for now.  These functions are only used by graphics/drm-*-kmod
to mark the VRAM aperture write-combining but this is also accomplished
by a call to vm_phys_fictitious_reg_range so this change is sufficient
to fix drm-*-kmod on i386 for FreeBSD 14.1.

Reviewed by: kib
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45125

6 weeks agoMerge commit 73bb8d9d92f6 from llvm-project (by Jonathan Peyton):
Dimitry Andric [Wed, 8 May 2024 18:44:28 +0000 (20:44 +0200)]
Merge commit 73bb8d9d92f6 from llvm-project (by Jonathan Peyton):

  [OpenMP] Fix child processes to use affinity_none (#91391)

  When a child process is forked with OpenMP already initialized, the
  child process resets its affinity mask and sets proc-bind-var to false
  so that the entire original affinity mask is used. This patch corrects
  an issue with the affinity initialization code setting affinity to
  compact instead of none for this special case of forked children.

  The test trying to catch this only testing explicit setting of
  KMP_AFFINITY=none. Add test run for no KMP_AFFINITY setting.

Fixes: #91098
This should fix OpenMP processes sometimes getting stuck on a single CPU
core.

PR: 278845
Reported by: Cassidy B. Larson <cbl@cbl.us>
MFC after: 3 days

6 weeks agoMerge commit 5300a6731e98 from llvm-project (by Jonathan Peyton):
Dimitry Andric [Wed, 8 May 2024 16:55:08 +0000 (18:55 +0200)]
Merge commit 5300a6731e98 from llvm-project (by Jonathan Peyton):

  [OpenMP] Fix re-locking hang found in issue 86684 (#88539)

  This was initially reported here (including stacktraces):
  https://stackoverflow.com/questions/78183545/does-compiling-imagick-with-openmp-enabled-in-freebsd-13-2-cause-sched-yield

  If `__kmp_register_library_startup()` detects that another instance of
  the library is present, `__kmp_is_address_mapped()` is eventually
  called. which uses `kmpc_alloc()` to allocate memory. This function
  calls `__kmp_entry_thread()` to access the thread-local memory pool,
  which is a bad idea during initialization. This macro internally calls
  `__kmp_get_global_thread_id_reg()` which sets the bootstrap lock at the
  beginning (before calling `__kmp_register_library_startup()`).

  The fix is to use `KMP_INTERNAL_MALLOC()`/`KMP_INTERNAL_FREE()` instead
  of `kmpc_malloc()`/`kmpc_free()`. `KMP_INTERNAL_MALLOC` and
  `KMP_INTERNAL_FREE` do not use any bootstrap locks. They just translate
  to `malloc()`/`free()` and are meant to be used during library
  initialization before other library-specific allocators have been
  initialized.

Fixes: #86684
This should fix OpenMP processes sometimes getting locked with 100% CPU
usage, endlessly calling sched_yield(2).

PR: 278845
Reported by: Cassidy B. Larson <cbl@cbl.us>
MFC after: 3 days

6 weeks agosmsc(4): update to mention Microchip
Ed Maste [Tue, 7 May 2024 15:33:45 +0000 (11:33 -0400)]
smsc(4): update to mention Microchip

Microchip Technology acquired SMSC in 2012, and all current products
and datasheets refer to the devices supported by this driver as
Microchip parts.  Mention SMSC in a parenthetical comment to explain
the driver's name.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45115

6 weeks agobhyve: Do not define GDB_LOG
Mark Johnston [Wed, 8 May 2024 16:06:22 +0000 (12:06 -0400)]
bhyve: Do not define GDB_LOG

This had been added for debugging and shouldn't have been committed.

Fixes: f81cdf24ba54 ("bhyve: Add support for XML register definitions")
MFC after: 3 days

6 weeks agovmm: Start reconciling amd64 and arm64 copies of vmm_dev.c
Mark Johnston [Wed, 8 May 2024 16:02:38 +0000 (12:02 -0400)]
vmm: Start reconciling amd64 and arm64 copies of vmm_dev.c

Most of the code in vmm_dev.c and vmm.c can and should be shared between
amd64 and arm64 (and eventually riscv) rather than being duplicated.  To
the end of adding a shared implementation in sys/dev/vmm, this patch
eliminates most of the differences between the two copies of vmm_dev.c.

- Remove an unneeded cdefs.h include.
- Simplify the amd64 implementation of vcpu_unlock_one().
- Simplify the arm64 implementation of vcpu_lock_one().
- Pass buffer sizes to alloc_memseg() and get_memseg() on arm64.  On
  amd64 this is needed for compat ioctls, but these functions should be
  merged.
- Make devmem_mmap_single() stricter on arm64.

Reviewed by: corvink, jhb
Differential Revision: https://reviews.freebsd.org/D44995

6 weeks agobsdinstall: Stop loading cryptodev for ZFS installations
Mark Johnston [Wed, 8 May 2024 16:01:52 +0000 (12:01 -0400)]
bsdinstall: Stop loading cryptodev for ZFS installations

- zfs depends on the crypto module, not cryptodev, and most arm64 kernel
  configs include std.dev, which includes "device crypto" anyway.
- This config works around a problem with kldxref lacking cross-target
  support, but that has since been fixed.
- Loading cryptodev creates /dev/crypto, which gives unprivileged users
  access to the kernel's opencrypto framework.  Very few applications
  need it, so we're needlessly increasing the kernel's surface area.

Thus, stop auto-loading cryptodev.

Reviewed by: kevans, allanjude, des
Differential Revision: https://reviews.freebsd.org/D45127

6 weeks agoofed: don't expose symbols twice
Brooks Davis [Wed, 8 May 2024 14:52:00 +0000 (15:52 +0100)]
ofed: don't expose symbols twice

ibv_init_wq and ibv_cleanup_wq are made visible with the
default_symver which puts them in the IBVERBS_1.1 ABI.  Don't
try to expose them as IBVERBS_PRIVATE_14 symbols as GNU ld
complains with --no-undefined-symbol.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D45090

6 weeks agosoxstack: slience 32-bit gcc warning
Brooks Davis [Wed, 8 May 2024 14:51:17 +0000 (15:51 +0100)]
soxstack: slience 32-bit gcc warning

Modern GCC complains when casting pointers to integers of a different
size (even a larger one).  Switch from uint64_t to uintptr_t which will
always be the right size for a stack address instead of maybe being too
big.

Reviewed by: dchagin, emaste
Differential Revision: https://reviews.freebsd.org/D45087

6 weeks agolibthr: avoid varargs in fcntl and openat interposers
Brooks Davis [Wed, 8 May 2024 14:49:13 +0000 (15:49 +0100)]
libthr: avoid varargs in fcntl and openat interposers

Align these signatures with the ones in syscalls.master (and thus
libsys.h).  There's no reason to do va_args twice and in some ABIs
(e.g,, CheriABI) you can't access fixed arguments as varargs if you
weren't called with varargs signature.

Reviewed by: imp, kib, jhibbits
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D45126