]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 months agosockets: make shutdown(2) how argument a enum
Gleb Smirnoff [Tue, 16 Jan 2024 18:26:10 +0000 (10:26 -0800)]
sockets: make shutdown(2) how argument a enum

Reviwed by: tuexen
Differential Revision: https://reviews.freebsd.org/D43412

5 months agox86/xen: fix HVM guest hypercall page setup
Roger Pau Monné [Tue, 16 Jan 2024 15:32:56 +0000 (16:32 +0100)]
x86/xen: fix HVM guest hypercall page setup

c7368ccb6801 didn't take into account that vm_guest will also get setup by
generic identify CPU code, and hence by the time xen_hvm_init() gets called
vm_guest will always be set if running as a Xen guest, either by the PVH entry
point code, or by generic CPU identification.

xen_hvm_init() and xen_hvm_init_hypercall_stubs() were relying on xen_domain()
returning false when running as an HVM guest, and used that into order to
figure out whether hypercall page needed to be populated.

Get rid of such assumptions and simplify the code since legacy PVH is no
longer supported.

This fixes booting FreeBSD as a Xen HVM guest.

Fixes: c7368ccb6801 ('xen: remove xen_domain_type enum/variable')
Sponsored by: Cloud Software Group

5 months agopflowclt: fix gcc build error
Kristof Provost [Tue, 16 Jan 2024 16:29:12 +0000 (17:29 +0100)]
pflowclt: fix gcc build error

gcc is unhappy with the nested extern declaration of __progname, so move
it out of the usage() function.

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 months agopflowctl.8: fix copy/paste-o
Kristof Provost [Tue, 16 Jan 2024 15:27:31 +0000 (16:27 +0100)]
pflowctl.8: fix copy/paste-o

The valid values line applies to the proto field, not domain.

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 months agosubr_bus: introduce device_set_descf() and modify allocation logic
Christos Margiolis [Tue, 16 Jan 2024 16:49:15 +0000 (18:49 +0200)]
subr_bus: introduce device_set_descf() and modify allocation logic

device_set_descf() is a printf-like version of device_set_desc().

Allocation code has been transferred from device_set_desc_internal() to
device_set_desc_copy() and device_set_descf() to avoid complicating
device_set_desc_internal(). The "copy" argument in
device_set_desc_internal() has been replaced with a flag which is set
when the description string has been allocated with M_BUS.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D43370

5 months agousb: use only usb_devinfo() in device_set_usb_desc()
Christos Margiolis [Tue, 16 Jan 2024 16:49:08 +0000 (18:49 +0200)]
usb: use only usb_devinfo() in device_set_usb_desc()

device_set_usb_desc() first tries to fetch device information through
the iInterface descriptor, otherwise it falls back to usb_devinfo().
Since usb_devinfo() is both guaranteed to work, and is more verbose, get
rid of the initial iInterface attempt.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D43383

5 months agopcm.4: mention snd_uaudio auto-load
Christos Margiolis [Tue, 16 Jan 2024 16:49:02 +0000 (18:49 +0200)]
pcm.4: mention snd_uaudio auto-load

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

5 months agosound: add missing modules to snd_driver
Christos Margiolis [Tue, 16 Jan 2024 16:48:56 +0000 (18:48 +0200)]
sound: add missing modules to snd_driver

While here, remove unnecessary break.

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

5 months agosnd_uaudio: prefix module declaration with "snd_"
Christos Margiolis [Tue, 16 Jan 2024 16:48:49 +0000 (18:48 +0200)]
snd_uaudio: prefix module declaration with "snd_"

Although the module is compiled "snd_uaudio.ko", follow the rest of the
sound modules' naming convention in the declaration as well.

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

5 months agosound: remove PCM_KLDSTRING() and fix status strings
Christos Margiolis [Tue, 16 Jan 2024 16:48:14 +0000 (18:48 +0200)]
sound: remove PCM_KLDSTRING() and fix status strings

PCM_KLDSTRING() prints the kernel module associated with a given audio
device only when that module is not compiled in. Get rid of
PCM_KLDSTRING() altogether and print the driver name (even for modules
that are compiled in) instead, as it implies the module as well.

While here, convert all status strings to the following dmesg-like
format:

[<port|mem> <irq>] on <driver>

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: markj, imp
Differential Revision: https://reviews.freebsd.org/D43349

5 months agosnd_uaudio: provide information about the device name and attached driver
Christos Margiolis [Tue, 16 Jan 2024 16:46:49 +0000 (18:46 +0200)]
snd_uaudio: provide information about the device name and attached driver

Unlike the other sound drivers, snd_uaudio(4) doesn't provide
information about the device's description and the driver it's attached
to. A side-effect of this is that applications such as mixer(8), that
fetch these strings through the OSS API's SNDCTL_CARDINFO ioctl will
show a USB audio device as:

pcm0:mixer: <USB Audio> at ? kld snd_uaudio

This patch replaces the generic "USB Audio" description with the
device's actual manufacturer and product strings, and the "at ?" string
with the driver it's attached to:

pcm0:mixer: <Focusrite Scarlett Solo USB> at uaudio0 kld snd_uaudio

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

5 months agobhyve: return ENOMEM instead of EFAULT and call free() after being used
rilysh [Mon, 8 Jan 2024 06:06:55 +0000 (11:36 +0530)]
bhyve: return ENOMEM instead of EFAULT and call free() after being used

1. In basl_load() function, when allocation fails,
it returns an EFAULT instead of ENOMEM. An EFAULT
can mislead in some scenarios, whereas an ENOMEM
for an allocation function makes much more sense.

2. Call free() on addr, as it's not being used
anymore after the basl_table_append_bytes()
function.

Signed-off-by: rilysh <nightquick@proton.me>
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1016

5 months agomd5: Enter capability mode earlier
Ricardo Branco [Wed, 3 Jan 2024 18:00:47 +0000 (19:00 +0100)]
md5: Enter capability mode earlier

Reviewed by: markj
MFC after: 1 month
Pull Request: https://github.com/freebsd/freebsd-src/pull/988

5 months agopf tests: test per-rule pflow
Kristof Provost [Thu, 11 Jan 2024 13:54:09 +0000 (14:54 +0100)]
pf tests: test per-rule pflow

Test that we can enable pflow on a per-rule basis.

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 months agopf tests: test pflow NAT state information
Kristof Provost [Fri, 15 Dec 2023 16:52:56 +0000 (17:52 +0100)]
pf tests: test pflow NAT state information

pflow(4) now also exports NAT session creation/destruction information.
Test that this works as expected.

While here improve the parsing of ipfix (i.e. pflowproto 10) a bit, and
check more information for the existing state information exports.

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

5 months agopflow: Turn `pflowstats' statistics counters into per-CPU counters to make them mpsafe.
Kristof Provost [Thu, 14 Dec 2023 13:06:41 +0000 (14:06 +0100)]
pflow: Turn `pflowstats' statistics counters into per-CPU counters to make them mpsafe.

The weird interactions around `pflow_flows' and `sc_gcounter' replaced
by simple `pflow_flows' increment. Since the flow sequence is the 32
bits integer, the `sc_gcounter' type replaced by the type of uint32_t.

Obtained from: OpenBSD
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D43116

5 months agopf tests: verify pflow over IPv6
Kristof Provost [Wed, 13 Dec 2023 17:12:08 +0000 (18:12 +0100)]
pf tests: verify pflow over IPv6

Test that we can send netflow information over IPv6.

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

5 months agopflow: add RFC8158 NAT support
Kristof Provost [Wed, 13 Dec 2023 15:55:28 +0000 (16:55 +0100)]
pflow: add RFC8158 NAT support

Extend pflow(4) to send NAT44 Session Create and Delete events.
This applies only to IPFIX (i.e. proto version 10), and requires no
user configuration.

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

5 months agopflow: allow observation domain to be configured
Kristof Provost [Fri, 8 Dec 2023 10:00:30 +0000 (11:00 +0100)]
pflow: allow observation domain to be configured

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

5 months agopf: store state creation/expiration timestamps with milisecond precision
Kristof Provost [Thu, 7 Dec 2023 13:35:11 +0000 (14:35 +0100)]
pf: store state creation/expiration timestamps with milisecond precision

The primary beneficiary is pflow(4), which expects milisecond precision
in timestamps.

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

5 months agopf tests: pflow functionality test
Kristof Provost [Mon, 4 Dec 2023 15:11:35 +0000 (16:11 +0100)]
pf tests: pflow functionality test

Test that we actually send netflow messages when configured to do so.
We do not yet inspect the generated netflow messages.

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

5 months agopfctl tests: basic pflow parser test
Kristof Provost [Fri, 1 Dec 2023 17:22:39 +0000 (18:22 +0100)]
pfctl tests: basic pflow parser test

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

5 months agopf tests: initial pflow test case
Kristof Provost [Fri, 1 Dec 2023 17:04:00 +0000 (18:04 +0100)]
pf tests: initial pflow test case

Basic creation, validation and cleanup test for the new pflow interface.

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

5 months agopf: allow pflow to be activated per rule
Kristof Provost [Fri, 1 Dec 2023 13:55:50 +0000 (14:55 +0100)]
pf: allow pflow to be activated per rule

Only generate ipfix/netflow reports (through pflow) for the rules where
this is enabled. Reports can also be enabled globally through 'set
state-default pflow'.

Obtained from: OpenBSD
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D43108

5 months agopflow: netstat statistics
Kristof Provost [Wed, 6 Dec 2023 13:55:33 +0000 (14:55 +0100)]
pflow: netstat statistics

Expose pflow counters via netstat.

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

5 months agopflow: import from OpenBSD
Kristof Provost [Tue, 28 Nov 2023 13:00:16 +0000 (14:00 +0100)]
pflow: import from OpenBSD

pflow is a pseudo device to export flow accounting data over UDP.
It's compatible with netflow version 5 and IPFIX (10).

The data is extracted from the pf state table. States are exported once
they are removed.

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

5 months agomount: Add a note that userquota and groupquota aren't printed with -p
Warner Losh [Mon, 15 Jan 2024 17:55:32 +0000 (10:55 -0700)]
mount: Add a note that userquota and groupquota aren't printed with -p

The quota options are pseudo options and not passed to the mount system
call when a filesystem is mounted. They are not part of the info
returned from getmntinfo(3), so can't be printed. Add a note to this
effect.

5 months agokern: pts: do not special case closed slave side
Kyle Evans [Tue, 16 Jan 2024 02:55:59 +0000 (20:55 -0600)]
kern: pts: do not special case closed slave side

This would previously return 1 if the slave side of the pts was closed
to force an application to read() from it and observe the EOF, but it's
not clear why and this is inconsistent both with how we handle devices
with similar mechanics (like pipes) and also with other kernels, such as
OpenBSD/NetBSD and Linux.

PR:             239604
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D43457

5 months agokern: tty: recanonicalize the buffer on ICANON/VEOF/VEOL changes
Kyle Evans [Tue, 16 Jan 2024 02:55:59 +0000 (20:55 -0600)]
kern: tty: recanonicalize the buffer on ICANON/VEOF/VEOL changes

Before this change, we would canonicalize any partial input if the new
local mode is not ICANON, but that's about it.  If we were switching
from -ICANON -> ICANON, or if VEOF/VEOL changes, then our internal canon
accounting would be wrong.

The main consequence of this is that in ICANON mode, we would
potentially hang a read(2) longer if the new VEOF/VEOL appears later in
the buffer, and FIONREAD would be similarly wrong as a result.

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

5 months agokern: tty: fix EOF handling for canonical reads
Kyle Evans [Tue, 16 Jan 2024 02:55:58 +0000 (20:55 -0600)]
kern: tty: fix EOF handling for canonical reads

If the read(2) buffer is one byte short of an EOF, then we'll end up
reading the line into the buffer, then re-entering and seeing an EOF at
the beginning of the inq, assuming it's a zero-length line.

Fix this corner-case by searching one more byte than we have available
for an EOF.  If we found it, then we'll trim it here; otherwise, we'll
limit our read to just the space we have in the out buffer and the next
read(2) will (potentially) read the remainder of the line.

Fix FIONREAD while we're here to match what an application can expect
read(2) to return -- scan for the first break character in the part of
the input that's been canonicalized, we'll never return more than that.

PR: 276220
Reviewed by: cy, imp (both previous version), kib
Differential Revision: https://reviews.freebsd.org/D43378

5 months agokern: tty: fix ttyinq_read_uio assertion
Kyle Evans [Tue, 16 Jan 2024 02:55:58 +0000 (20:55 -0600)]
kern: tty: fix ttyinq_read_uio assertion

It's clear from later context that `rlen` was always expected to include
`flen`, as we'll trim `flen` bytes from the end of the read.  Relax our
initial assertion to only require the total size less trimmed bytes to
lie within the out buffer size.

While we're here, I note that if we have to read more than one block and
we're trimming from the end then we'll do the wrong thing and omit
`flen` bytes from every block, rather than just the end.  Add an
assertion to make sure we're not doing that, but the only caller that
specifies a non-zero `flen` today will only really be doing so if rlen
is entirely within a single buffer.

Reviewed by: cy, imp
Differential Revision: https://reviews.freebsd.org/D43377

5 months agoGitHub: style: Add the synchronize activity type
Jose Luis Duran [Tue, 16 Jan 2024 00:58:29 +0000 (17:58 -0700)]
GitHub: style: Add the synchronize activity type

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

5 months agocheckstyle9.pl: Soften the single line braces requirement
Warner Losh [Mon, 15 Jan 2024 21:48:01 +0000 (14:48 -0700)]
checkstyle9.pl: Soften the single line braces requirement

We inherited the error for single line statements needing braces from
the original script. Style(9) allow that, and could be read to encourage
that, but does not require that.

Sponsored by: Netflix

5 months agomptable: improve error reporting for invalid commands
Pete Zaitcev [Mon, 15 Jan 2024 21:42:28 +0000 (14:42 -0700)]
mptable: improve error reporting for invalid commands

mptable ignores arguments with matching first letters, report errors
when it gets garbate.

PR: 38727
Reviewed by: imp

5 months agofusefs: more consistent operand ordering in io.cc
Alan Somers [Mon, 15 Jan 2024 23:16:40 +0000 (16:16 -0700)]
fusefs: more consistent operand ordering in io.cc

MFC after: 2 weeks

5 months agofusefs: fix an interaction between copy_file_range and mmap
Alan Somers [Sun, 31 Dec 2023 14:31:16 +0000 (07:31 -0700)]
fusefs: fix an interaction between copy_file_range and mmap

If a copy_file_range operation tries to read from a page that was
previously written via mmap, that page must be flushed first.

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

5 months agocrashinfo: Print stack traces for all on-CPU threads
Mark Johnston [Mon, 15 Jan 2024 20:39:26 +0000 (15:39 -0500)]
crashinfo: Print stack traces for all on-CPU threads

Add a python script which implements the bulk of this functionality.
Over time, this would ideally evolve into a library of python routines
which can be used to inspect kernel data structures and automate some
debugging tasks, similar to jhb's out-of-tree scripts, but written in a
somewhat nicer language and with better integration into the kgdb
command prompt.

Note that kgdb currently won't auto-load scripts in this directory.
This should perhaps change in the future.  It probably also makes more
sense to have a crashinfo.py which provides all the kgdb output that we
want to include in core.txt, rather than having crashinfo.sh pipe in
several commands.

Reviewed by: avg, imp
Discussed with: jhb
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33817

5 months agoroute: error on IPv4 network routes with incorrect destination
Mike Karels [Mon, 15 Jan 2024 21:14:54 +0000 (15:14 -0600)]
route: error on IPv4 network routes with incorrect destination

Route destinations like 10/8 are most likely intended as a shorthand
for 10.0.0.0/8, but instead it means 0.0.0.10/8, which includes
only bits in the host part of the mask, and hence adds a route to
0.0.0.0/8.  In 12.x, there was code to "do what I mean", which was
removed as part of a cleanup of old network class remnants.  Given
that we have gone this long without that code, do not restore that
behavior.  Instead, detect the issue and produce an error.
Specifically, if there are no dots in a numeric IPv4 address, the
mask is specified with CIDR notation (using a slash), and there are
bits set in the host part, produce an error like this for 10/8:

    route: malformed address, bits set after mask; 10 means 0.0.0.10

PR: 258874
MFC after: 1 week
Reviewed by: melifaro, emaste
Differential Revision: https://reviews.freebsd.org/D43384

5 months agofind: Allow '/' to be used with -perm for GNU compatibility
Ricardo Branco [Mon, 15 Jan 2024 18:35:27 +0000 (11:35 -0700)]
find: Allow '/' to be used with -perm for GNU compatibility

In 2005, Gnu find deprecated '+' as the leading character for the -perm
argument, instead preferring '/' with the same meaning. Implement that
behavior here, and document it in the man page.

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

5 months agoman: avoid unportable use of utilities
Mohamed Akram [Mon, 15 Jan 2024 18:27:04 +0000 (11:27 -0700)]
man: avoid unportable use of utilities

echo -e is not portable. It can be replaced by printf %b (it works
only with the /bin/sh built-in echo, not /bin/echo anyway).
head -# is not portable, but head -n # is.

Replace these two things in three places total.

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1062

5 months agocondvar: Fix a user-after-free in _cv_wait() when ktrace is enabled
Mark Johnston [Mon, 15 Jan 2024 17:29:02 +0000 (12:29 -0500)]
condvar: Fix a user-after-free in _cv_wait() when ktrace is enabled

When a thread wakes up after sleeping on a CV, it must not dereference
the CV structure, as it may already have been freed.  At least ZFS
relies on this invariant, see commit
c636f94bd2ff15be5b904939872b4bce31456c18 for example.

Thus, when logging context-switch events, copy the wmesg into a stack
buffer while it is still safe to do so, and log that after waking up.

While here, move the initial ktrcsw() call later, after assertions and
the SCHEDULER_STOPPED_TD() condition are checked.

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

5 months agocondvar: Clean up condvar.h a bit
Mark Johnston [Mon, 15 Jan 2024 17:27:11 +0000 (12:27 -0500)]
condvar: Clean up condvar.h a bit

- Remove a typedef that has been unused for a long time.
- Remove a LOCORE guard.  MI headers like condvar.h don't need such a
  guard in general.
- Move a forward declaration into the _KERNEL block.
- Add a types.h include to make the file self-contained.

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

5 months agoncl_bioread(): check for vp->v_object before accessing it
Konstantin Belousov [Mon, 15 Jan 2024 11:49:14 +0000 (13:49 +0200)]
ncl_bioread(): check for vp->v_object before accessing it

Reported by: cy
Reviewed by: rmacklem
Fixes: 70dc6b2ce314a0f32755005ad02802fca7ed186e
MFC after: 3 days

5 months agoIncrease the size of riscv GENERICSD images to 6 GB
Mike Karels [Sun, 14 Jan 2024 17:01:19 +0000 (11:01 -0600)]
Increase the size of riscv GENERICSD images to 6 GB

The stable/13 snapshot this week failed to build the riscv GENERICSD
image because it ran out of space.  Checking main and stable/14
snapshots, they are also low on space, around 100% or more of
capacity.  Increase them all from 5 GB to 6 GB.  Note, this is the
only riscv image configuration.

Discussed with: cperciva

5 months agopf tests: dummynet + nat fragmentation test
Kristof Provost [Fri, 12 Jan 2024 16:09:52 +0000 (17:09 +0100)]
pf tests: dummynet + nat fragmentation test

Ensure that we do the right thing when we reassemble fragmented packet
and send it through a dummynet pipe.

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 months agopf tests: test reassembly with dummynet
Kristof Provost [Fri, 12 Jan 2024 13:15:42 +0000 (14:15 +0100)]
pf tests: test reassembly with dummynet

Ensure that if we pass packets through a dummynet pipe we still
reassemble as expected.

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 months agopf: remove unused struct definition
Kristof Provost [Tue, 9 Jan 2024 16:02:50 +0000 (17:02 +0100)]
pf: remove unused struct definition

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 months agolinuxkpi: correct zone item size for linux_mm_zone
Konstantin Belousov [Sun, 14 Jan 2024 21:00:18 +0000 (23:00 +0200)]
linuxkpi: correct zone item size for linux_mm_zone

Reviewed by: manu, markj
Sponsored by: NVidia networking
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43455

5 months agosnd_hdspe(4): One pcm device per physical ADAT port.
Florian Walpen [Mon, 15 Jan 2024 10:21:57 +0000 (10:21 +0000)]
snd_hdspe(4): One pcm device per physical ADAT port.

ADAT connections transport 8, 4 or 2 audio channels depending on the
sample rate. Instead of splitting each physical ADAT port into 4
(potentially unmapped) stereo pcm devices, create just one pcm
device of variable channel width for every ADAT port.
Depending on the sample rate and channel width selected, the pcm
channels may be only partially mapped to ADAT channels and vice versa.

Added flexibility of the new channel mapping is also prerequisite to
introduce more pcm device layouts in follow-up commits.

Reviewed by: br
Differential Revision: https://reviews.freebsd.org/D43393

5 months agogit-arc: Add -c flag to patch to commit the change
Warner Losh [Mon, 15 Jan 2024 02:23:02 +0000 (19:23 -0700)]
git-arc: Add -c flag to patch to commit the change

git arc patch -c D1234 will download differential D1234, try to apply it
to the tree, and if successful will ask phab for the title and
summary. It will construct a commit message with that, the reviewers,
and the differential revision. It also tries its best to deduce the
proper 'author' to use for the commit, and warn if it thinks it has made
a bad choice.

Sponsored by: Netflix
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D39992

5 months agogit-arc: Cope with extra output
Warner Losh [Mon, 15 Jan 2024 02:22:49 +0000 (19:22 -0700)]
git-arc: Cope with extra output

On my machine, for reasons beyond my understanding, I get this warning
two times when running arc:

Warning: Module "openssl" is already loaded in Unknown on line 0

so grep -v ^Warning: on all the arc call-conduit calls to filter them
out so we can properly parse the JSON with jq.

Sponsored by: Netflix
Reviewed by: markj, jhb
Differential Revision: https://reviews.freebsd.org/D36583

5 months agogit-arc: Just strip escape sequences form arc log
Warner Losh [Mon, 15 Jan 2024 02:22:04 +0000 (19:22 -0700)]
git-arc: Just strip escape sequences form arc log

Just strip escape sequences and Warning: lines from 'arc list' output. I
upgraded and they changed and git arc list broke. This restores its
functionality.

Note: jhb didn't like this, so if others object, I'll fix...

Sponsored by: Netflix
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D36553

5 months agobuild: Use ls -i | cut rather than stat -f %i to extract inode
Warner Losh [Tue, 2 May 2023 20:51:09 +0000 (14:51 -0600)]
build: Use ls -i | cut rather than stat -f %i to extract inode

ls -i dates back to 5th edition Unix and is more portable than the stat
command, though %% is a newer shellism, it works on any shell that
FreeBSD builds with.

Sponsored by: Netflix

5 months agogeom_redboot(4): Garbage collect disconnected driver
Marius Strobl [Sun, 14 Jan 2024 08:39:56 +0000 (09:39 +0100)]
geom_redboot(4): Garbage collect disconnected driver

The last MIPS user has been removed in c09981f1 2 years ago, the last
ARM one in ff945277 even 5.5 years ago.

5 months agogeom_map(4): Garbage collect disconnected driver
Marius Strobl [Sun, 14 Jan 2024 08:31:26 +0000 (09:31 +0100)]
geom_map(4): Garbage collect disconnected driver

The last MIPS user has been removed in c09981f1 2 years ago, the last
ARM one in 58d5c511 even 5.5 years ago.

5 months agosc: Use current console rather than first console for mouse input
Vadim Ushakov [Sun, 14 Jan 2024 16:22:17 +0000 (09:22 -0700)]
sc: Use current console rather than first console for mouse input

When mouse reporting feature is turned on (control sequence ^[[?1000h),
syscons sends valid mouse coordinates only for ttyv0. Applications
running on other ttys always (erroneously) get mouse coordinates from
the first tty, not from tty they actually run.

Steps to reproduce:
1. On ttyv0, run any application that uses mouse reporting feature. Make
   some clicks. The feature works properly.
2. Switch to another ttyv, run the application. The application receives
   mouse click events, but mouse position reported by syscons to the
   application does not match with the actual mouse position on the screen.

Expected result:
Reported mouse position should match with visible mouse position.

PR: 193339
Reviewed by: imp

5 months agotcpsso: fix TIME_WAIT description in man-page
Michael Tuexen [Sun, 14 Jan 2024 13:45:43 +0000 (14:45 +0100)]
tcpsso: fix TIME_WAIT description in man-page

Reviewed by: manpages(pauamma_gundo.com)
Fixes: e179d9739b14 ("tcpsso: support TIME_WAIT state")
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D43424

5 months agoFix issue with Linux guest XHCI tablet probing.
Peter Grehan [Sun, 14 Jan 2024 11:27:12 +0000 (21:27 +1000)]
Fix issue with Linux guest XHCI tablet probing.

The USB3 spec mandates that the device-descriptor max packet size
be 512 bytes, which requires a field size of 9 since it is a
power-of-2.

Linux kernels recently started validating this field, resulting in
the table not being probed and the cursor not working in bhyve VNC.

Reviewed by: corvink
PR: 275760
MFC after: 1 week

5 months agouart(4): Honor hardware state of NS8250-class for tsw_busy
Marius Strobl [Fri, 12 Jan 2024 22:27:07 +0000 (23:27 +0100)]
uart(4): Honor hardware state of NS8250-class for tsw_busy

In 9750d9e5, I brought the equivalent of the TS_BUSY flag back in a
mostly hardware-agnostic way in order to fix tty_drain() and, thus,
TIOCDRAIN for UARTs with TX FIFOs. This proved to be sufficient for
fixing the regression reported. So in light of the release cycle of
FreeBSD 10.3, I decided that this change was be good enough for the
time being and opted to go with the smallest possible yet generic
(for all UARTs driven by uart(4)) solution addressing the problem at
hand.

However, at least for the NS8250-class the above isn't a complete
fix as these UARTs only trigger an interrupt when the TX FIFO became
empty. At this point, there still can be an outstanding character
left in the transmit shift register as indicated via the LSR. Thus,
this change adds the 3rd (besides the tty(4) and generic uart(4) bits)
part I had in my tree ever since, adding a uart_txbusy method to be
queried in addition for tsw_busy and hooking it up as appropriate
for the NS8250-class.

As it turns out, the exact equivalent of this 3rd part later on was
implemented for uftdi(4) in 9ad221a5.

While at it, explain the rational behind the deliberately missing
locking in uart_tty_busy() (also applying to the generic sc_txbusy
testing already present).

5 months agoUpdate to bmake-20240108
Simon J. Gerraty [Sun, 14 Jan 2024 01:31:01 +0000 (17:31 -0800)]
Update to bmake-20240108

5 months agoImport bmake-20240108
Simon J. Gerraty [Sun, 14 Jan 2024 01:16:25 +0000 (17:16 -0800)]
Import bmake-20240108

Interesting/relevant changes since bmake-20230909

* VERSION (_MAKE_VERSION): 20240106
Merge with NetBSD make, pick up
o fix duplicate progname when reporting an unknown target
o unit tests for Cmd_Exec using temp file

* VERSION (_MAKE_VERSION): 20240105
Merge with NetBSD make, pick up
o main.c: Cmd_Exec write cmd to a file if too big
avoid blowing commandline/env limits

* VERSION (_MAKE_VERSION): 20240101
o util.c: flesh out more of strftime
* configure.in: add --with-bmake-strftime
it is not a full implementation but enough to pass all
the unit-tests.
* parse.c: LoadFile do not append \n to empty buffer.

* VERSION (_MAKE_VERSION): 20231230
Merge with NetBSD make, pick up
o simplify memory allocation for string buffers
o fix declared types of list nodes
o suff.c: clean up freeing of suffixes
o var.c: simplify debug message for the ':@var@...@' modifier
clean up variable handling

* VERSION (_MAKE_VERSION): 20231226
Merge with NetBSD make, pick up
o compat.c: ensure make's output is correctly ordered with that of
the target when not going to a tty
o main.c: check for shellPath whether to call Shell_Init()

* VERSION (_MAKE_VERSION): 20231224
Merge with NetBSD make, pick up
o compat.c: check for shellPath whether to call Shell_Init()
tweak the unit test to detect the bug thus fixed.
o make.1: do not claim .SHELL is only used by jobs mode.

* VERSION (_MAKE_VERSION): 20231220
Merge with NetBSD make, pick up
o str.c: speed up pattern matching in the ':M' modifier
o var.c: fix confusing debug logging when deleting a variable
use consistent debug messages style when ignoring variables

* VERSION (_MAKE_VERSION): 20231210
Merge with NetBSD make, pick up
o var.c: avoid segfault on empty :C match expression
explain in debug log why variable assignment is ignored.

* VERSION (_MAKE_VERSION): 20231208
Merge with NetBSD make, pick up
o var.c: ensure fromCmd is set correctly for variables set on
command line.

* VERSION (_MAKE_VERSION): 20231124
Merge with NetBSD make, pick up
o main.c: cleanup processing of -j
fix lint warning about strchr
o var.c: more accurate error message for invalid ':mtime' argument
cleanup :[...] modifier
avoid reading beyond substring when comparing
o unit-tests cover all cases of :mtime, test and explain exporting
of variables
o cleanup comments

* bsd.after-import.mk (ECHO_TAG): FreeBSD no longer uses
$FreeBSD$ tag, so avoid adding it.

mk/ChangeLog since bmake-20230909

* dirdeps.mk: for MAKE_VERSION 20240105 we do not have the same
limits on command line length, so skip export of lists to env.

* jobs.mk: avoid C suffix in JOB_MAX_C if factor is floating
point.  This keeps JOB_MAX numeric incase another makefile does
comparisons.

* gendirdeps.mk: if META_XTRAS is passed to us, add to META_FILES

5 months agoAdd a regression test for PR 276191.
Alan Somers [Mon, 8 Jan 2024 01:03:40 +0000 (18:03 -0700)]
Add a regression test for PR 276191.

The bug isn't fusefs-specific, but this is the easiest way to reproduce
it.

PR: 276191
MFC after: 1 week
MFC with: bdb46c21a3e68d4395d6e0b6a205187e655532b0
Differential Revision:  https://reviews.freebsd.org/D43446
Reviewed by:  kib

5 months agovm/vm_object.c: minor cleanup
Konstantin Belousov [Sat, 13 Jan 2024 01:44:39 +0000 (03:44 +0200)]
vm/vm_object.c: minor cleanup

Remove sys/cdefs.h and sys/socket.h includes.
Order sys/ includes alphabetically.
Do not check for NULL before free().

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
DIfferential revision: https://reviews.freebsd.org/D43444

5 months agoman(1): support spaces in filenames
Wolfram Schneider [Sat, 13 Jan 2024 16:16:55 +0000 (16:16 +0000)]
man(1): support spaces in filenames

The globbing function in exists() needs to handle white spaces.

PR:          275978
Reviewed by: kevans, bapt, emaste
MFC after:   1 week

5 months agopmap_init(9): drop MLINKS reference
Robert Wing [Fri, 12 Jan 2024 17:29:15 +0000 (17:29 +0000)]
pmap_init(9): drop MLINKS reference

fix the build

5 months agolibc: stop exposing __fcntl_compat
Brooks Davis [Sat, 13 Jan 2024 00:00:24 +0000 (00:00 +0000)]
libc: stop exposing __fcntl_compat

It was exposed (under FBSDprivate_1.0) for forward compatability in
threading libraries in 2008 by commit cd7d66a21f1a.  The last consumer
was removed in 2015 by commit 8495e8b1e9e1.  I missed this among the _
and __sys_ symbols in commit e2417a21a025.

Reviewed by: imp, kib
Differential Revision: https://reviews.freebsd.org/D43408

5 months agoStop using expressions in _Alignof()
Minsoo Choo [Fri, 12 Jan 2024 23:37:53 +0000 (15:37 -0800)]
Stop using expressions in _Alignof()

_Alignof(expression) is a non-standard extension.  This is not allowed
in gnu11 and gnu17 which follow the C11 standard _Alignof(type).

Reviewed by: arichardson, imp, jhb
Fixes: 4a9cd9fc22d7 amd64 db_trace: Reject unaligned frame pointers
Fixes: 7ccaf76a27f1 riscv db_trace: Ensure trapframe pointer is suitably aligned.
Fixes: 638c68897fbd arm64 db_trace: Ensure trapframe pointer is suitably aligned.
Differential Revision: https://reviews.freebsd.org/D43409

5 months agomixer.8: Add terse example for increasing volume
Alexander Ziaee [Fri, 12 Jan 2024 17:12:19 +0000 (12:12 -0500)]
mixer.8: Add terse example for increasing volume

Reviewed by: jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1044

5 months agocd9660: Add support for mask,dirmask,uid,gid options
Ricardo Branco [Mon, 8 Jan 2024 20:24:53 +0000 (21:24 +0100)]
cd9660: Add support for mask,dirmask,uid,gid options

Reviewed by: jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/982

5 months agopmap_init(9): sweep references to pmap_init2()
Robert Wing [Tue, 9 Jan 2024 04:50:47 +0000 (19:50 -0900)]
pmap_init(9): sweep references to pmap_init2()

gone since 2005

5 months agopmap_pinit(9): sweep references to pmap_pinit2()
Robert Wing [Tue, 9 Jan 2024 04:07:59 +0000 (19:07 -0900)]
pmap_pinit(9): sweep references to pmap_pinit2()

gone since 2004

5 months agosanitizers: Avoid building genassym.c and genoffset.c with sanitizers
Mark Johnston [Tue, 10 Oct 2023 18:14:46 +0000 (14:14 -0400)]
sanitizers: Avoid building genassym.c and genoffset.c with sanitizers

Some, particularly KASAN, may insert redzones around global symbols,
resulting in incorrect offset definitions because genassym.sh (ab)uses
symbol sizes to assign semantic meaning.

(Ideally I would be able to define this pattern in one place, but I
haven't found a way to define a GENSYM_CFLAGS that actually works for
all of the consumers (kern.post.mk, kmod.mk, sys/conf/files*).)

MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.

5 months agosystm: Relax __result_use_check annotations
Mark Johnston [Fri, 12 Jan 2024 15:07:28 +0000 (10:07 -0500)]
systm: Relax __result_use_check annotations

When compiling with gcc, functions annotated this way can not have their
return values cast away, e.g., with `(void)copyout(...)`.  clang permits
it but gcc does not.  Since we have a number of such casts for calls
which copy data out of the kernel, and since failing to check for errors
when copying *in* is a much more severe bug, remove some of the
annotations in order to make the gcc build happy.

Reviewed by: kib
Reported by: Jenkins
Fixes: 8e36732e6eb5 ("systm: Annotate copyin() and related functions with __result_use_check")
Differential Revision: https://reviews.freebsd.org/D43418

5 months agofb: Check for errors from copyin()
Mark Johnston [Fri, 12 Jan 2024 15:09:22 +0000 (10:09 -0500)]
fb: Check for errors from copyin()

When compiling with gcc, a function annotated with __result_use_check
cannot have its return value ignored with a void cast.  So, try to
handle it.

MFC after: 1 week

5 months agobhyveload(8): document some SECURITY CONSIDERATIONS
Kyle Evans [Fri, 12 Jan 2024 19:57:53 +0000 (13:57 -0600)]
bhyveload(8): document some SECURITY CONSIDERATIONS

The situation is improved now that we're running in a sandbox, but there
is still some host machine access that could be concerning depending on
the context.  These concerns may be somewhat mitigated by the fact that
the host machine usually provides the loader binary, even when the guest
image is providing the loader scripts -- they only bring the lua
scripts, and they have to be able to execute arbitrary syscalls rather
than the interfaces provided by libsa(3).

Reviewed by: jhb, markj
Differential Revision: https://reviews.freebsd.org/D43299

5 months agoMAINTAINERS: Add myself for nvme entries, remove jimharris
Warner Losh [Fri, 12 Jan 2024 19:07:28 +0000 (12:07 -0700)]
MAINTAINERS: Add myself for nvme entries, remove jimharris

Jim Harris no longer has a commit bit and has moved on from being the
FreeBSD nvme driver maintainer at Intel. I've been reviewing things
so I'll take that up.

Sponsored by: Netflix

5 months agoMAINTAINERS, etc: Remove hselasky entries
Warner Losh [Fri, 12 Jan 2024 19:02:28 +0000 (12:02 -0700)]
MAINTAINERS, etc: Remove hselasky entries

Sadly, Hans-Peter has passed away. Remove his entries out of respect for
his many years of service to the project.

5 months agosystem(3): fix typo santized -> sanitized
Steve Kargl [Fri, 12 Jan 2024 18:26:40 +0000 (11:26 -0700)]
system(3): fix typo santized -> sanitized

PR: 276262
Reviewed by: imp

5 months agologin: Missed an instance of getpwnam().
Dag-Erling Smørgrav [Fri, 12 Jan 2024 16:40:55 +0000 (17:40 +0100)]
login: Missed an instance of getpwnam().

Fixes: a3d80dd8aa6ac15877e00102ab174b417ac81d79
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D43423

5 months agouniq: Error out if writing to the output failed.
Dag-Erling Smørgrav [Fri, 12 Jan 2024 15:40:48 +0000 (16:40 +0100)]
uniq: Error out if writing to the output failed.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D43407

5 months agouniq: Clean up and test obsolete options.
Dag-Erling Smørgrav [Fri, 12 Jan 2024 15:40:40 +0000 (16:40 +0100)]
uniq: Clean up and test obsolete options.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D43402

5 months agouniq: Fix interactive use.
Dag-Erling Smørgrav [Fri, 12 Jan 2024 15:40:33 +0000 (16:40 +0100)]
uniq: Fix interactive use.

Output a line as soon as it is possible to determine that it will have
to be output.  For the basic case, this means output each line as it is
read unless it is identical to the previous one.  For the -d case, it
means output the first instance as soon as the second is read, unless
the -c option was also given.  The -D and -u cases were already fine.

Add test cases for interactive use with no options and with -d.

Explicitly ignore -d when -D is also specified.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: rew, kevans
Differential Revision: https://reviews.freebsd.org/D43382

5 months agouniq: Replace NetBSD's unit tests with our own.
Dag-Erling Smørgrav [Fri, 12 Jan 2024 15:40:26 +0000 (16:40 +0100)]
uniq: Replace NetBSD's unit tests with our own.

These new tests cover more functionality and are easier to extend.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D43381

5 months agologin: Use getpwnam_r() instead of getpwnam().
Dag-Erling Smørgrav [Fri, 12 Jan 2024 15:40:22 +0000 (16:40 +0100)]
login: Use getpwnam_r() instead of getpwnam().

Since we expect the entry to still be valid after calling into PAM,
which may call getpwnam() itself, we need to use getpwnam_r().

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans, imp, allanjude, markj
Differential Revision: https://reviews.freebsd.org/D43376

5 months agotests: add a test for shutdown(2) on a datagram socket
Gleb Smirnoff [Fri, 12 Jan 2024 10:04:04 +0000 (02:04 -0800)]
tests: add a test for shutdown(2) on a datagram socket

5 months agodivert: just return EOPNOTSUPP on shutdown(2)
Gleb Smirnoff [Fri, 12 Jan 2024 10:04:04 +0000 (02:04 -0800)]
divert: just return EOPNOTSUPP on shutdown(2)

Before this change we would always return ENOTCONN.  There is no
legitimate use of shutdown(2) on divert(4).

5 months agoprotosw: remove unneeded include
Gleb Smirnoff [Fri, 12 Jan 2024 10:04:04 +0000 (02:04 -0800)]
protosw: remove unneeded include

5 months agoxen: improve man (4) page
Roger Pau Monné [Tue, 9 Jan 2024 09:26:06 +0000 (10:26 +0100)]
xen: improve man (4) page

Update the xen(4) man page to reflect the current support status.

Reported by: kevans
Reviewed by: bcr kevans imp
Differential revision: https://reviews.freebsd.org/D43373

5 months agoRevert "kerberos: Fix numerous segfaults when using weak crypto"
Cy Schubert [Fri, 12 Jan 2024 07:39:02 +0000 (23:39 -0800)]
Revert "kerberos: Fix numerous segfaults when using weak crypto"

This revision breaks Linux and MacOS cross builds because
TARGET_ENDIANNESS is not define during bootstrapping on these
platforms.

I think the correct approach would be to separate the new
fbsd_ossl_provider_load() and unload functions into their own
library (instead of libroken). This avoids the less desirable
option of including bsd.cpu.mk in secure/lib/Makefile.common,
which does build but could complicate future work.

Reported by: jrtc27

This reverts commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb.

5 months agofind: fix build on 32bits
Baptiste Daroussin [Fri, 12 Jan 2024 06:34:28 +0000 (07:34 +0100)]
find: fix build on 32bits

5 months agoreleng-gce: Advertise the availability of gVNIC support in GCE images.
Xin LI [Fri, 12 Jan 2024 05:38:04 +0000 (21:38 -0800)]
releng-gce: Advertise the availability of gVNIC support in GCE images.

This marks FreeBSD GCE images as gVNIC capable by adding the
--guest-os-features=GVNIC flag at creation time as suggested in GCE
documentation[1].  This allows Generation 3 and newer GCE instances
to leverage advanced networking capabilities and performance
enhancements provided by gVNIC.  Users will benefit from these
improvements without needing to create custom images.

[1] https://cloud.google.com/compute/docs/networking/using-gvnic#create_a_vm_with_gvnic_support

Reviewed by: cperciva
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D43411

5 months agoUPDATING: Add an entry for the __FreeBSD_version bump to 1500010
Rick Macklem [Fri, 12 Jan 2024 00:53:46 +0000 (16:53 -0800)]
UPDATING: Add an entry for the __FreeBSD_version bump to 1500010

5 months agoparam.h: Bump __FreeBSD_version to 1500010
Rick Macklem [Fri, 12 Jan 2024 00:48:23 +0000 (16:48 -0800)]
param.h: Bump __FreeBSD_version to 1500010

Commit cc760de2183f changed the internal interface between
the nfscommon and nfscl modules.  As such, both need to be
rebuilt from sources.  Therefore, bump __FreeBSD_version.

5 months agonfscl: Only update atime for Copy when noatime is not specified
Rick Macklem [Fri, 12 Jan 2024 00:38:33 +0000 (16:38 -0800)]
nfscl: Only update atime for Copy when noatime is not specified

Commit 57ce37f9dcd0 modified the NFSv4.2 Copy operation so that
it will update atime on the infd file whenever possible.
This is done by adding a Setattr of TimeAccess for the
input file.

This patch disables this change for the case of an NFSv4.2
mount with the "noatime" mount option, which avoids the
additional Setattr of TimeAccess operation.

MFC after: 1 week

5 months agofind: add SIGINFO handler
Goran Mekić [Thu, 11 Jan 2024 22:35:25 +0000 (15:35 -0700)]
find: add SIGINFO handler

Print number of files processed and path currently being processed on
SIGINFO.

Reviewed by: des, asomers
Sponsored by: Axcient
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D43380

5 months agoktls: fix vnet-related panic in ktls_reset_receive_tag()
Martin Matuska [Thu, 11 Jan 2024 20:31:15 +0000 (21:31 +0100)]
ktls: fix vnet-related panic in ktls_reset_receive_tag()

Reviewed by: gallatin, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43400

5 months agoconf: Do not set -fno-sanitize-memory-param-retval for old compilers
Mark Johnston [Thu, 11 Jan 2024 16:42:47 +0000 (11:42 -0500)]
conf: Do not set -fno-sanitize-memory-param-retval for old compilers

The option was introduced in LLVM 16.

Fixes: b6c653c97463 ("kmsan: Set -fno-sanitize-memory-param-retval for now")
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.

5 months agolibc: separate syscall and non-syscall symbols
Brooks Davis [Thu, 11 Jan 2024 18:27:20 +0000 (18:27 +0000)]
libc: separate syscall and non-syscall symbols

Put declerations of _ and __sys_ prefixed stubs at the top and
everything else at the bottom.  Sort the bottom list with sort(1).
This paves the way to generate the syscall symbol list.

Reviewed by: kib
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D43386

5 months agopowerpc/SYS.h: implement _SYSCALL_BODY() macro
Brooks Davis [Thu, 11 Jan 2024 18:27:20 +0000 (18:27 +0000)]
powerpc/SYS.h: implement _SYSCALL_BODY() macro

Add _SYSCALL_BODY() macro which invokes the syscall via _SYCALL() and
calls cerror as required.  Use to implement PSEUDO() and RSYSCALL().

Reviewed by: jhibbits
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D43323

5 months agoAdd vnode_pager_clean_{a,}sync(9)
Konstantin Belousov [Mon, 8 Jan 2024 05:18:40 +0000 (07:18 +0200)]
Add vnode_pager_clean_{a,}sync(9)

Bump __FreeBSD_version for ZFS use.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43356