]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
23 months agotcp: fix stats counter for SYN_RCVD state when TCP-FO is used
Michael Tuexen [Sun, 28 Aug 2022 16:45:59 +0000 (18:45 +0200)]
tcp: fix stats counter for SYN_RCVD state when TCP-FO is used

Reviewed by: glebius
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D36384

23 months agorc.conf(5): add <service>_umask to run the service using this value
Eugene Grosbein [Sun, 28 Aug 2022 05:45:23 +0000 (12:45 +0700)]
rc.conf(5): add <service>_umask to run the service using this value

None of tools working with login classes change umask(1)
and we had no ways to specify non-default umask for a service
not touching its startup script. This change makes in possible.

Some file-sharing services that create new files may benefit from it.

Differential: https://reviews.freebsd.org/D36309
MFC-after: 3 days

23 months agorb_tree: fine-tune RB_REMOVE
Doug Moore [Sun, 28 Aug 2022 05:43:49 +0000 (00:43 -0500)]
rb_tree: fine-tune RB_REMOVE

Improve RB_REMOVE by reading the fields of the removed node only once,
and by not writing to the removed node.

Reviewed by: kib
Discussed with: markj
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36288

23 months agonfsd: Update console message for no session found
Rick Macklem [Sun, 28 Aug 2022 01:31:20 +0000 (18:31 -0700)]
nfsd: Update console message for no session found

The NFSv4.1/4.2 server generates a console message that indicates
that there is no session. I was until recently perplexed w.r.t. how
this could occur. It turns out that the common cause is multiple NFS
clients with the same /etc/hostid.

The host uuid is used by the FreeBSD NFSv4.1/4.2 client as a unique
identifier for the client. If multiple clients use the same host uuid,
this indicates to the NFSv4.1/4.2 server that they are the same client
and confusion occurs.

This trivial patch modifies the console message to suggest that the
client's /etc/hostid needs to be checked for uniqueness.

Reviewed by: asomers
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D36377

23 months agonfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION
Rick Macklem [Sat, 27 Aug 2022 23:03:18 +0000 (16:03 -0700)]
nfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION

When the NFSv4.1/4.2 client is handling a server error
of NFSERR_BADSESSION, it retries RPCs with a new session.
Without this patch, the nd_slotid was not being updated
for the new session.

This would result in a bogus console message like
"Wrong session srvslot=X slot=Y" and then it would
free the incorrect slot, often generating a
"freeing free slot!!" console message as well.

This patch fixes the problem.

Note that FreeBSD NFSv4.1/4.2 servers only
generate a NFSERR_BADSESSION error after a reboot
or after a client does a DestroySession operation.

PR: 260011
MFC after: 1 week

23 months agoRevert "nfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION"
Rick Macklem [Sat, 27 Aug 2022 22:58:23 +0000 (15:58 -0700)]
Revert "nfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION"

Revert this commit, since I now have a better fix to commit.

This reverts commit 8e59ec29e47f6ec64f54ddd88cab388ae536f0ff.

23 months agopf: do not block new Ethernet rules for in-progress transactions
Kristof Provost [Fri, 19 Aug 2022 10:05:12 +0000 (12:05 +0200)]
pf: do not block new Ethernet rules for in-progress transactions

Make Ethernet rule addition behave just like L3 rules, in that we now
allow ongoing transaction to be interrupted, rather than rejecting a new
one.

The result of that is that we can no longer end up in a state where a
transaction failed, but was not rolled back, blocking us from setting
new rules.

It's safe to assume there's no pending epoch callback for cleanup here,
because we've explicitly called it before hitting pf_begin_eth().

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

23 months agonat64: fix whitespace damage in callout calls
Mateusz Guzik [Sat, 27 Aug 2022 19:06:41 +0000 (19:06 +0000)]
nat64: fix whitespace damage in callout calls

No functional changes.

23 months agoLinuxKPI 802.11: change type of bssid in struct ieee80211_bss_conf
Bjoern A. Zeeb [Sat, 27 Aug 2022 14:48:09 +0000 (14:48 +0000)]
LinuxKPI 802.11: change type of bssid in struct ieee80211_bss_conf

Enabling other driver code found that the bssid in
struct ieee80211_bss_conf is not an array but expected to be
a const pointer (const, != NULL checks).
Adjust accordingly in the header and in the LinuxKPI compat code.
There initialization now needs to be a static array always present
as we need a value before we will have a BSS (node in scan_to_auth)
as the mac80211 driver (*handlers) are expecting the pointer to be
not NULL (copying without checks).
This is a pre-req to enable d3 (CONFIG_PM[_SLEEP]) in the future.

Tested by: Tomoaki AOKI (junchoon dec.sakura.ne.jp)
Tested by: Berislav Purgar (bpurgar gmail.com)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

23 months agobhnd(4): Correct a typo in a source code comment
Gordon Bergling [Sat, 27 Aug 2022 10:10:00 +0000 (12:10 +0200)]
bhnd(4): Correct a typo in a source code comment

- s/in he/in the/

MFC after: 3 days

23 months agousb(4): Quirk for non-compliant USB devices.
Hans Petter Selasky [Sat, 27 Aug 2022 06:50:51 +0000 (08:50 +0200)]
usb(4): Quirk for non-compliant USB devices.

Some non-compliant USB devices do not implement the
clear endpoint halt feature. Silently ignore such
failures, when they at least responded correctly
passing up a valid STALL PID packet.

Tested by: Doug Ambrisko <ambrisko@ambrisko.com>
MFC after: 1 week
Sponsored by: NVIDIA Networking

23 months agostand: Document that boot0 uses BIOS
Warner Losh [Fri, 26 Aug 2022 21:47:21 +0000 (15:47 -0600)]
stand: Document that boot0 uses BIOS

And thus has a limited range of supported baud rates. Also add that
setting BOOT_BOOT0_COMCONSOLE_SPEED=0 will leave it unchanged which
sometimes can give you 115200 if the BIOS initialized things outside of
the normal BIOS baud rates (which many x86 enbedded-targetted boards
do).

Sponsored by: Netflix
Reviewed by: emaste, manu (earlier versions)
Suggestions by: jhb
Differential Revision: https://reviews.freebsd.org/D36300

23 months agostand: More sensible defaults when ConOut is missing
Warner Losh [Fri, 26 Aug 2022 21:46:33 +0000 (15:46 -0600)]
stand: More sensible defaults when ConOut is missing

When ConOut is missing, we used to default to serial. Except we did it
in the worst way possible by just setting the howto bits and not
updating the console setting, which lead to weird behavior where we'd
get some things on the video port, others on serial.

Instead, set console to "efi,comconsole" for this case. Also set
RB_MULTIPLE always (so we get dual consoles from the kernel) and or in
RB_SERIAL when we can't find GOPs that suggest the precense of a video
console. This will put output in the most places and have a sensible
default for 'primary' console.

Sponsored by: Netflix
Reviewed by: emaste, manu
Differential Revision: https://reviews.freebsd.org/D36299

23 months agolibprocstat: forward declare struct kinfo_proc
Brooks Davis [Fri, 26 Aug 2022 22:20:32 +0000 (23:20 +0100)]
libprocstat: forward declare struct kinfo_proc

This allows libprocstat.h to be included without sys/user.h as
documented in the manpage.

23 months agou3g(4): Add more USB IDs.
Hans Petter Selasky [Fri, 26 Aug 2022 20:01:41 +0000 (22:01 +0200)]
u3g(4): Add more USB IDs.

Submitted by: malavon <benny.goemans@gmail.com>
MFC after: 1 week
PR: 263700
Sponsored by: NVIDIA Networking

23 months agosoo_stat: Ensure error is always initialized.
John Baldwin [Fri, 26 Aug 2022 18:17:55 +0000 (11:17 -0700)]
soo_stat: Ensure error is always initialized.

In kernels without MAC, error is not set for sockets whose protocol
layer does not implement the pr_sense hook.

Reported by: Jenkins (powerpc kernel builds)
Fixes: 7c04ca1fad67 sockets: for stat(2) on a socket don't report hiwat as block size

23 months agoefi: Create a define for memory descriptor version
Warner Losh [Fri, 26 Aug 2022 17:39:37 +0000 (11:39 -0600)]
efi: Create a define for memory descriptor version

For true EFI platforms, the EFI BIOS will return version 1 (since no
other version is defined as of this commit). However, for environments
that wish to create an EFI memory mapping table that aren't actually
EFI, we need to know this. Add EFI_MEMORY_DESCRIPTOR_VERSION for this
constant.

Sponsored by: Netflix

23 months agodomains: use struct domain as argument
Gleb Smirnoff [Fri, 26 Aug 2022 17:35:35 +0000 (10:35 -0700)]
domains: use struct domain as argument

23 months agoFix compat10 semaphore interface race
firk [Fri, 26 Aug 2022 08:05:56 +0000 (11:05 +0300)]
Fix compat10 semaphore interface race

Wrong has-waiters and missing unconditional _count==0 check may cause
infinite waiting with already non-zero count.
1) properly clear _has_waiters flag when waiting failed to start
2) always check _count before start waiting

PR: 265997
Reviewed by: kib
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36272

23 months agosocket(2): bring documentation up tp date
Gleb Smirnoff [Fri, 26 Aug 2022 15:16:15 +0000 (08:16 -0700)]
socket(2): bring documentation up tp date

o Undocument sockets that are no longer supported, or never were.
o Add AF_HYPERV. Note: PF_HYPERV isn't defined, no typo here.
o Point at ip(4) and ip6(4) instead of unwelcoming "not described here".

Reviewed by: gbe, markj
Differential revision: https://reviews.freebsd.org/D36284

23 months agosockets: for stat(2) on a socket don't report hiwat as block size
Gleb Smirnoff [Fri, 26 Aug 2022 15:16:15 +0000 (08:16 -0700)]
sockets: for stat(2) on a socket don't report hiwat as block size

The code appeared in d8392c6c39eb with not good explanation.  It is
very unlikely any software in the world needs that.

Differential revision: https://reviews.freebsd.org/D36283

23 months agotzsetup: remove left overs from libbsddialog conversion
Baptiste Daroussin [Fri, 26 Aug 2022 09:48:03 +0000 (11:48 +0200)]
tzsetup: remove left overs from libbsddialog conversion

PR: 265954

23 months agoCorrect diagnostic messages for bad cylinder groups.
Kirk McKusick [Fri, 26 Aug 2022 07:31:44 +0000 (00:31 -0700)]
Correct diagnostic messages for bad cylinder groups.

Fix for 495b1ba.

Reported by:  Mike Karels
Sponsored by: The FreeBSD Foundation

23 months agoUpdates to UFS/FFS superblock integrity checks when reading a superblock.
Kirk McKusick [Fri, 26 Aug 2022 07:09:01 +0000 (00:09 -0700)]
Updates to UFS/FFS superblock integrity checks when reading a superblock.

Further updates based on ways Peter Holm found to corrupt UFS
superblocks in ways that could cause kernel hangs or crashes.

No legitimate superblocks should fail as a result of these changes.

Reported by:  Peter Holm
Tested by:    Peter Holm
Sponsored by: The FreeBSD Foundation

23 months agoProvide better diagnostic messages for bad cylinder groups.
Kirk McKusick [Fri, 26 Aug 2022 06:56:31 +0000 (23:56 -0700)]
Provide better diagnostic messages for bad cylinder groups.

Like the detailed diagnostics produced when a bad superblock
is read, provide similar detailed diagnostics when bad
cylinder groups are read.

Reported by:  Peter Holm
Tested by:    Peter Holm
Sponsored by: The FreeBSD Foundation

2 years agonfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION
Rick Macklem [Fri, 26 Aug 2022 03:48:04 +0000 (20:48 -0700)]
nfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION

When the NFSv4.1/4.2 client is handling a server error
of NFSERR_BADSESSION, it retries RPCs with a new session.
Without this patch, the nd_slotid was not being updated
for the new session.

This would result in a bogus console message like
"Wrong session srvslot=X slot=Y" and then it would
free the incorrect slot, often generating a
"freeing free slot!!" console message as well.

This patch fixes the problem.

Note that FreeBSD NFSv4.1/4.2 servers only
generate a NFSERR_BADSESSION error after a reboot
or after a client does a DestroySession operation.

PR: 260011
MFC after: 1 week

2 years agonfscl: Fix handling of a bad session slot (NFSv4.1/4.2)
Rick Macklem [Fri, 26 Aug 2022 03:33:31 +0000 (20:33 -0700)]
nfscl: Fix handling of a bad session slot (NFSv4.1/4.2)

When a session has been marked defunct by the server
sending a NFSERR_BADSESSION reply to the NFSv4.1/4.2
client, nfsv4_sequencelookup() returns NFSERR_BADSESSION
without actually assigning a session slot.
Without this patch, newnfs_request() would erroneously
free slot 0.

This could result in the slot being reused prematurely,
but most likely just generated a "freeing free slot!!"
console message.

This patch fixes the code to not do the erroneous
freeing of the slot for this case.

PR: 260011
MFC after: 1 week

2 years agoamd64: update comment for casueword/casueword32, mentioning return value 1
Konstantin Belousov [Thu, 25 Aug 2022 23:41:48 +0000 (02:41 +0300)]
amd64: update comment for casueword/casueword32, mentioning return value 1

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agozfs: merge openzfs/zfs@a582d5299
Martin Matuska [Thu, 25 Aug 2022 22:57:16 +0000 (00:57 +0200)]
zfs: merge openzfs/zfs@a582d5299

Notable upstream pull request merges:
  #13717 Fix zpool status in case of unloaded keys
  #13753 Prevent zevent list from consuming all of kernel memory
  #13767 arcstat: fix -p option
  #13785 Updates for snapshots_changed property

Obtained from: OpenZFS
OpenZFS commit: a582d52993134905f2e96cebe7aff410f29b1ad8

2 years agorenice: add unit tests.
Dag-Erling Smørgrav [Thu, 25 Aug 2022 19:49:43 +0000 (19:49 +0000)]
renice: add unit tests.

Sponsored by: Klara, Inc.

2 years agorenice: fix argument order.
Dag-Erling Smørgrav [Thu, 25 Aug 2022 17:22:37 +0000 (17:22 +0000)]
renice: fix argument order.

The target modifiers (-g, -p, -u) may occur in any position except
between -n and its argument; furthermore, we support both the old
absolute form (without -n) and the modern relative form (with -n).

Sponsored by: Klara, Inc.

2 years agoamd64: dump standard registers when crashing
Mateusz Guzik [Thu, 25 Aug 2022 17:30:31 +0000 (17:30 +0000)]
amd64: dump standard registers when crashing

Sample output:

Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address   = 0x2
fault code              = supervisor write data, page not present
instruction pointer     = 0x20:0xffffffff80556853
stack pointer           = 0x28:0xffffffff8141bf50
frame pointer           = 0x28:0xffffffff8141bfa0
code segment            = base 0x0, limit 0xfffff, type 0x1b
        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 0 (swapper)
rdi: fffff80002c9c400 rsi: ffffffff80b89183 rdx:                0
rcx:                2  r8:               fe  r9:                1
rax: fffff80002c9c400 rbx:                1 rbp: ffffffff8141bfa0
r10:                0 r11: ffffffff80b97f8c r12:                0
r13:                0 r14:                0 r15:                0
trap number             = 12
panic: page fault
cpuid = 1
time = 1

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

2 years agoproc: read the pid prior to unlocking in report_alive_proc1
Mateusz Guzik [Thu, 25 Aug 2022 17:26:49 +0000 (17:26 +0000)]
proc: read the pid prior to unlocking in report_alive_proc1

In principle another thread could have reaped the process by that time.

2 years agoFix the arm generic timer on 32 bit
Andrew Turner [Thu, 25 Aug 2022 12:17:11 +0000 (13:17 +0100)]
Fix the arm generic timer on 32 bit

Hide a variable when we don't use it.

Sponsored by: The FreeBSD Foundation

2 years agoMerge the common parts of the SMCCC handlers
Andrew Turner [Mon, 22 Aug 2022 17:09:28 +0000 (18:09 +0100)]
Merge the common parts of the SMCCC handlers

To simplify adding new handlers merge the common parts of the functions
used to call into the arm SMCCC firmware.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36297

2 years agoAdd an IDC only arm64 icache sync function
Andrew Turner [Mon, 22 Aug 2022 17:02:13 +0000 (18:02 +0100)]
Add an IDC only arm64 icache sync function

When the IDC flag is set in the cache type register we don't need to
clean the data cache to the point of unification. Previously we
supported this flag being set only when the DIC flags was also set.
Add a new handler for when this is not the case.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation, Ampere (hardware)
Differential Revision: https://reviews.freebsd.org/D36296

2 years agoAllow the kernel to emulate the physical counter on arm64
Andrew Turner [Mon, 27 Jun 2022 12:37:40 +0000 (12:37 +0000)]
Allow the kernel to emulate the physical counter on arm64

When running under a VM we don't have access to the physical counter.
Add support to emulate this instruction by handling the trap in the
kernel. As it is slow only enable when the hw.emulate_phys_counter
tunable is set on boot.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35613

2 years agostress2: Added a regression test
Peter Holm [Thu, 25 Aug 2022 07:47:58 +0000 (09:47 +0200)]
stress2: Added a regression test

2 years agobintrans: replace the quoted printable encoder/decoder
Baptiste Daroussin [Tue, 23 Aug 2022 15:45:11 +0000 (17:45 +0200)]
bintrans: replace the quoted printable encoder/decoder

Replace the quoted printable code with one that respects RFC2045
Add tests about this parsers and encoders, using examples from the
wikipedia page.

Reviewed by: pstef
Differential Revision: https://reviews.freebsd.org/D36314

2 years agorb_tree: optimize rb_insert
Doug Moore [Thu, 25 Aug 2022 07:26:04 +0000 (02:26 -0500)]
rb_tree: optimize rb_insert

In searching for where to insert a new node, RB_INSERT discards the
address of the pointer that will have to be modified, so that it must
find it again from the values of 'parent' and 'comp'. Stop discarding
that address, and so avoid having to recompute it.

Reviewed by: alc
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36317

2 years agoReenable basic_signal:trap_signal_test on i386
Li-Wen Hsu [Thu, 25 Aug 2022 04:09:00 +0000 (12:09 +0800)]
Reenable basic_signal:trap_signal_test on i386

This is fixed in dc4a2d1d0e838579f21d9d1fef8655f902f06ab2

PR: 265889
Sponsored by: The FreeBSD Foundation
MFC with: dc4a2d1d0e838579f21d9d1fef8655f902f06ab2

2 years agoObsoleteFiles: Follow awk test files move
Li-Wen Hsu [Thu, 25 Aug 2022 03:28:57 +0000 (11:28 +0800)]
ObsoleteFiles: Follow awk test files move

Fixes: 517e52b6c21ccff22c46df0dcd15c19baee3d86c
Sponsored by: The FreeBSD Foundation

2 years agolibc: Add strverscmp(3) and versionsort(3)
Aymeric Wibo [Wed, 24 Aug 2022 23:20:13 +0000 (02:20 +0300)]
libc: Add strverscmp(3) and versionsort(3)

Add a strverscmp(3) function to libc, a GNU extension I implemented by
reading its glibc manual page. It orders strings following a much more
natural ordering (e.g. "ent1 < ent2 < ent10" as opposed to
"ent1 < ent10 < ent2" with strcmp(3)'s lexicographic ordering).

Also add versionsort(3) for use as scandir(3)'s compar argument.

Update manual page for scandir(3) and add one for strverscmp(3).

Reviewed by: pstef, gbe, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D35807

2 years agoNOTES: Update the comment for MCLSHIFT
Mark Johnston [Wed, 24 Aug 2022 23:59:32 +0000 (19:59 -0400)]
NOTES: Update the comment for MCLSHIFT

MFC after: 1 week

2 years agoNOTES: Update the default MSIZE and MCLSHIFT values
Mark Johnston [Wed, 24 Aug 2022 23:55:20 +0000 (19:55 -0400)]
NOTES: Update the default MSIZE and MCLSHIFT values

After commit 840327e5ddf3 ("mbuf: Don't support PAGE_SIZE < 4K"), these
defaults were causing LINT kernel builds to fail.

Reported by: Jenkins
MFC after: 1 week

2 years agoUpdates for snapshots_changed property
Umer Saleem [Wed, 24 Aug 2022 21:20:43 +0000 (02:20 +0500)]
Updates for snapshots_changed property

Currently, snapshots_changed property is stored in dd_props_zapobj, due
to which the property is assumed to be local. This causes a difference
in behavior with respect to other readonly properties.

This commit stores the snapshots_changed property in dd_object. Source
is not set to local in this case, which makes it consistent with other
readonly properties.

This commit also updates the date string format to include seconds.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #13785

2 years agogit-arc: Respect GIT_EDITOR and GIT_PAGER
Mark Johnston [Wed, 24 Aug 2022 19:59:47 +0000 (15:59 -0400)]
git-arc: Respect GIT_EDITOR and GIT_PAGER

2 years agogit-arc: Fix whitespace
Mark Johnston [Wed, 24 Aug 2022 19:59:40 +0000 (15:59 -0400)]
git-arc: Fix whitespace

2 years agoDocument scandirat(3)
Konstantin Belousov [Tue, 23 Aug 2022 03:40:06 +0000 (06:40 +0300)]
Document scandirat(3)

Reviewed by: emaste, gbe (man pages), imp, kevans, markj, Aymeric Wibo <obiwac@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36301

2 years agolibc: add scandirat(3)
Konstantin Belousov [Tue, 23 Aug 2022 03:30:06 +0000 (06:30 +0300)]
libc: add scandirat(3)

Reviewed by: emaste, imp, kevans, markj, Aymeric Wibo <obiwac@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36301

2 years agolibc: split scandir() into scandir_dirp() and proper scandir()
Konstantin Belousov [Tue, 23 Aug 2022 04:30:40 +0000 (07:30 +0300)]
libc: split scandir() into scandir_dirp() and proper scandir()

The new helper scandir_dirp() takes DIR *, i.e. a pre-opened directory,
instead of the directory name.

Reviewed by: emaste, imp, kevans, markj, Aymeric Wibo <obiwac@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36301

2 years agoLink scandir_b(3) to scandir(3)
Konstantin Belousov [Tue, 23 Aug 2022 03:42:33 +0000 (06:42 +0300)]
Link scandir_b(3) to scandir(3)

Reviewed by: emaste, gbe (man pages), imp, kevans, markj, Aymeric Wibo <obiwac@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36301

2 years agoscandir.3: Use .Fo instead of .Fn for long args
Konstantin Belousov [Tue, 23 Aug 2022 03:33:39 +0000 (06:33 +0300)]
scandir.3: Use .Fo instead of .Fn for long args

Reviewed by: emaste, gbe (man pages), imp, kevans, markj, Aymeric Wibo <obiwac@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36301

2 years agofork_exit(): style comment
Konstantin Belousov [Sun, 21 Aug 2022 23:14:02 +0000 (02:14 +0300)]
fork_exit(): style comment

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

2 years agox86: improve machdep.uprintf_signal
Konstantin Belousov [Sun, 21 Aug 2022 01:47:11 +0000 (04:47 +0300)]
x86: improve machdep.uprintf_signal

Print %eax/%rax.
Use better format strings, like %#x.

Reviewed by: jhb
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36302

2 years agox86: print trap name in addition of trap number
Konstantin Belousov [Sun, 21 Aug 2022 01:46:13 +0000 (04:46 +0300)]
x86: print trap name in addition of trap number

for the "trap with interrupts disabled" warning.

Reviewed by: jhb
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36302

2 years agoi386: print all GPRs, PSL, and CR3 on double fault
Konstantin Belousov [Thu, 18 Aug 2022 04:16:09 +0000 (07:16 +0300)]
i386: print all GPRs, PSL, and CR3 on double fault

Also compactify the printfs, and remove comment about 'two prints'.
Their arguments are on same page, so one fault implies another.

Reviewed by: jhb
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36302

2 years agoi386: simplify flow control in irettraps
Konstantin Belousov [Mon, 22 Aug 2022 05:56:45 +0000 (08:56 +0300)]
i386: simplify flow control in irettraps

It is enough to have only one 'call calltrap' locally.

Reviewed by: jhb
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36302

2 years agoi386 doreti: stop saving/restoring %ecx around calls into C
Konstantin Belousov [Thu, 18 Aug 2022 04:07:29 +0000 (07:07 +0300)]
i386 doreti: stop saving/restoring %ecx around calls into C

There is no reason to do this.  Instead just calculate it later.

Reviewed by: jhb
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36302

2 years agoi386: do not allow userspace to set tf_trapno on sigreturn(2)
Konstantin Belousov [Fri, 19 Aug 2022 01:26:37 +0000 (04:26 +0300)]
i386: do not allow userspace to set tf_trapno on sigreturn(2)

tf_trapno is checked on return from interrupt/exception to determine if
special handling is needed for switching address space.  This is due to
the possibility of NMI/MCHK/DBG to occur at arbitrary place in kernel,
where both address space and stack used could be transient.  Kernel
saves current %cr3 in tf_err for such events, to restore on return.

If user is able to set tf_trapno, it can trigger that special handling,
and since tf_err is also user-controlled by sigreturn(2), the result is
undefined.

PR: 265889
Reported by: lwhsu
Reviewed by: jhb
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36302

2 years agoirettraps: i386 does not push %ss/%esp when exception does not switch rings
Konstantin Belousov [Mon, 22 Aug 2022 01:20:28 +0000 (04:20 +0300)]
irettraps: i386 does not push %ss/%esp when exception does not switch rings

Which means that we must not copy top 8 bytes from the trampoline stack
for the exception frame to the regular thread kstack.  As consequence,
this stops corruption of the pcb.  The visible effect was often a broken
fork(2) on the CPU where corruption occured.

Account for the detail by substracting 8 from the copy byte count when
moving exception frames from trampoline to the regular stack.

[irettraps handles segmentation/stack/protection faults which could
occur on the doreti path, where we might already switched stack and
address space]

Reported and tested by: pho
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36302

2 years agoi386 copyout_fast: improve detection of a fault on accessing userspace
Konstantin Belousov [Tue, 9 Aug 2022 00:56:54 +0000 (03:56 +0300)]
i386 copyout_fast: improve detection of a fault on accessing userspace

Do not blindly account a page fault occuring on the trampoline area,
as the userspace access fault.  Check that it occured exactly in the
instruction that does that.

This avoids unneeded switches of address space on faults not needing the
switch, effectively converting machine resets due to tripple faults,
into regular panics.

Reviewed by: jhb
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36302

2 years agochown: see also chmod.
Dag-Erling Smørgrav [Wed, 24 Aug 2022 18:20:58 +0000 (20:20 +0200)]
chown: see also chmod.

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

2 years agoshared_shadow_inval_test: fix copy-pasto in error message
Eric van Gyzen [Wed, 24 Aug 2022 17:59:48 +0000 (12:59 -0500)]
shared_shadow_inval_test: fix copy-pasto in error message

MFC after: 1 week
Sponsored by: Dell EMC Isilon

2 years agofreebsd32_sendmsg: fix control message ABI
Brooks Davis [Wed, 24 Aug 2022 17:34:39 +0000 (18:34 +0100)]
freebsd32_sendmsg: fix control message ABI

When a freebsd32 caller uses all or most allowed space for control
messages (MCLBYTES == 2K) then the message may no longer fit when
the messages are padded for 64-bit alignment.  Historically we've just
shrugged and said there is no ABI guarantee.  We ran into this on
CheriBSD where a capsicumized 64-bit nm would fail when called with more
than 64 files.

Fix this by not gratutiously capping size of mbuf data we'll allocate
to MCLBYTES and let m_get2 allocate up to MJUMPAGESIZE (4K or larger).
Instead of hard-coding a length check, let m_get2 do it and check for a
NULL return.

Reviewed by: markj, jhb, emaste
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D36322

2 years agocxgbe: don't support MJUMPAGESIZE != MCLBYTES
Brooks Davis [Wed, 24 Aug 2022 17:34:25 +0000 (18:34 +0100)]
cxgbe: don't support MJUMPAGESIZE != MCLBYTES

This could only happen on systems with PAGE_SIZE < 4K and FreeBSD
doesn't support such systems.

Reviewed by: np, imp, jhb
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D36321

2 years agombuf: Don't support PAGE_SIZE < 4K
Brooks Davis [Wed, 24 Aug 2022 17:34:07 +0000 (18:34 +0100)]
mbuf: Don't support PAGE_SIZE < 4K

The Vax supported such things, but FreeBSD does not.  This further
implies that MJUMPAGESIZE > MCLBYTES so assert this and remove code
handling them being equal.

Reviewed by: kp, imp, jhb
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D36320

2 years agopkg: Add limited --debug/-d support
Brooks Davis [Wed, 24 Aug 2022 17:32:09 +0000 (18:32 +0100)]
pkg: Add limited --debug/-d support

Add an internal debug level global:
 - Level 1 (-d) currently does nothing.

 - Level 2 (-d -d) enables libfetch debugging (quite verbose) so it's
   possible to see what pkg is attempting to download without having
   to sniff traffic.

Reviewed by: debdrup, bapt
Differential Revision: https://reviews.freebsd.org/D35756

2 years agonetinet6: fix SIOCSPFXFLUSH_IN6 by skipping manually-configured prefixes
Alexander V. Chernikov [Tue, 23 Aug 2022 16:19:50 +0000 (16:19 +0000)]
netinet6: fix SIOCSPFXFLUSH_IN6 by skipping manually-configured prefixes

Summary:
Currently netinet6/ code allocates IPv6 prefixes (nd_prefix) for
 both manually-assigned addresses and advertised prefixes. As a result,
 prefixes from manually-assigned prefixes can be seen in `ndp -p` list
 and be cleared via `ndp -P`. The latter relies on the SIOCSPFXFLUSH_IN6
 ioctl to clear to prefix list.
The original intent of the SIOCSPFXFLUSH_IN6 was to clear prefixes
 originated from the advertising routers:

```
1998-09-02  JINMEI, Tatuya  <jinmei@isl.rdc.toshiba.co.jp>
* nd6.c (nd6_ioctl): added 2 new ioctls; SIOCSRTRFLUSH_IN6 and
SIOCSPFXFLUSH_IN6. The former is to flush all default routers
in the default router list, and the latter is to flush all the
prefixes and the addresses derived from them in the prefix list.
```

Restore the intent by marking prefixes derived from the RA messages
with newly-added ndpr_flags.ra_derived flag and skip prefixes not marked
 with such flag during deletion and listing.

Differential Revision: https://reviews.freebsd.org/D36312
MFC after: 2 weeks

2 years agolinuxkpi: unbreak linux_i2cbb
Emmanuel Vadot [Thu, 18 Aug 2022 15:34:35 +0000 (17:34 +0200)]
linuxkpi: unbreak linux_i2cbb

This is a joint work with manu.

- fixed conditions in do_i2c_transfer and i2c_transfer as linux_i2cbb
  does not set adapter->algo->master_xfer but does set
  adapter->algo_data;
- fixed parent bus specification for linux_i2cbb driver module;
- actually implemented iicbb_transfer method;
- added iicbb_pre_xfer and iicbb_post_xfer methods;
- removed unnecessary and harmful delays (and other extra logic) from
  iicbb methods as iicbb driver already has them;
- added setting of iicbb speed based on algo_data->udelay, so that iicbb
  uses correct delays;

PR: 265920
Fixes: 1961a14a4743 linuxkpi: Add i2c support
MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG (manu's work)

2 years agoarm64: Remove unused typedef
Warner Losh [Wed, 24 Aug 2022 12:27:01 +0000 (06:27 -0600)]
arm64: Remove unused typedef

We don't use EFI_MEMORY_DESCRIPTOR that's typedef'd here. We use the one
from sys/efi.h instead. Remove the clutter here as these two are subtly
different (though wind up with the same layout due to alignment rules).

Sponsored by: Netflix

2 years agostress2: Added another sigreturn(2) fuzzer test
Peter Holm [Wed, 24 Aug 2022 11:21:55 +0000 (13:21 +0200)]
stress2: Added another sigreturn(2) fuzzer test

2 years agopkt-gen: flip IPv4 address in ping-pong mode
Vincenzo Maffione [Wed, 24 Aug 2022 08:20:57 +0000 (08:20 +0000)]
pkt-gen: flip IPv4 address in ping-pong mode

MFC after: 7 days

2 years agoProvide cache coherency between getnextinode() and ginode()
Kirk McKusick [Wed, 24 Aug 2022 06:48:40 +0000 (23:48 -0700)]
Provide cache coherency between getnextinode() and ginode()

The fsck_ffs(8) utility has two subsystems for reading and writing
inodes. The getnextinode() interface is used in Pass 1 (and Pass
1b if needed) to sequentially walk through all the inodes in the
filesystem. The ginode() interface is used to read and write
individual inodes. Pass 1 uses a mix of both interfaces. This
change ensures that ginode() returns a pointer to the inode in the
cache maintained by getnextinode() when that interface holds the
requested inode so that all modifications to the inode are made in
a single place and are all written to the disk together.

Reported by:  Peter Holm
Tested by:    Peter Holm
Sponsored by: The FreeBSD Foundation

2 years agoUpdate standard superblock when successful using an alternate superblock.
Kirk McKusick [Wed, 24 Aug 2022 06:28:30 +0000 (23:28 -0700)]
Update standard superblock when successful using an alternate superblock.

Historically fsck_ffs(8) would only use alternate superblocks when
running in manual mode. When the standard superblock fails, it now
tries to find and use a backup superblocks even when running in `preen'
mode. If an alternate superblock is found and the filesystem is
successfully cleaned up using it, write the alternate superblock
back to the standard superblock so that the filesystem can be
subsequently mounted and used.

Reported by:  Peter Holm
Tested by:    Peter Holm
Sponsored by: The FreeBSD Foundation

2 years agotests: Handle platforms with MAXPAGESIZES < 2
Mark Johnston [Tue, 23 Aug 2022 23:48:06 +0000 (19:48 -0400)]
tests: Handle platforms with MAXPAGESIZES < 2

Reported by: Jenkins
Fixes: 1dfa8b73f6a6 ("tests: Add more shared shadow regression tests")

2 years agom_get3: add an MLINK for the manpage
Brooks Davis [Tue, 23 Aug 2022 21:34:07 +0000 (22:34 +0100)]
m_get3: add an MLINK for the manpage

Reviewed by: kp
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D36319

2 years agovfs: fix vaccess prototype in the manpage
Mateusz Guzik [Tue, 23 Aug 2022 20:59:20 +0000 (20:59 +0000)]
vfs: fix vaccess prototype in the manpage

Reported by: des

2 years agovfs: fix VOP_UNLOCK prototype in the manpage
Mateusz Guzik [Tue, 23 Aug 2022 20:55:20 +0000 (20:55 +0000)]
vfs: fix VOP_UNLOCK prototype in the manpage

Note the manpage is woefully outdated, taking about "simple lock".

Reported by: des

2 years agoDefine _NPCM and the last PC_FREEn constant in terms of _NPCPV.
John Baldwin [Tue, 23 Aug 2022 20:31:02 +0000 (13:31 -0700)]
Define _NPCM and the last PC_FREEn constant in terms of _NPCPV.

This applies one of the changes from
5567d6b4419b02a2099527228b1a51cc55a5b47d to other architectures
besides arm64.

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

2 years agorms: add rms_assert_rlock_ok
Mateusz Guzik [Tue, 16 Aug 2022 12:22:31 +0000 (12:22 +0000)]
rms: add rms_assert_rlock_ok

So that callers which opportunistically elide the lock can still
assert that they can take it.

Reviewed by:
Differential Revision:

2 years ago*DRIVER_MODULE*: Remove the compat shims to accept the devclass argument.
John Baldwin [Tue, 23 Aug 2022 16:36:41 +0000 (09:36 -0700)]
*DRIVER_MODULE*: Remove the compat shims to accept the devclass argument.

PR: 264969 (exp-run)
Differential Revision: https://reviews.freebsd.org/D35168

2 years agopmu_dmc620: Remove unused devclass from DRIVER_MODULE.
John Baldwin [Tue, 23 Aug 2022 16:36:12 +0000 (09:36 -0700)]
pmu_dmc620: Remove unused devclass from DRIVER_MODULE.

2 years agocmn600: Remove unused devclass from DRIVER_MODULE.
John Baldwin [Tue, 23 Aug 2022 16:36:11 +0000 (09:36 -0700)]
cmn600: Remove unused devclass from DRIVER_MODULE.

2 years agomv88e151x: Remove unused devclass argument from DRIVER_MODULE.
John Baldwin [Tue, 23 Aug 2022 16:36:11 +0000 (09:36 -0700)]
mv88e151x: Remove unused devclass argument from DRIVER_MODULE.

2 years agoarcanist: use FreeBSD/git project repository instead of FreeBSD/svn
Alexander V. Chernikov [Tue, 23 Aug 2022 14:14:50 +0000 (14:14 +0000)]
arcanist: use FreeBSD/git project repository instead of FreeBSD/svn

Current `.arcconfig` specifies explicit mapping to the FreeBSD/SVN
 project in Phabricator, which is inactive. This mapping only gets
 updated to the current "production" (FreeBSD/git) project when the
 underlying change is committed.
Update arcanist configuration to create all new diffs in the
 FreeBSD/git project.

Reviewed By: dim, emaste
Differential Revision: https://reviews.freebsd.org/D36204

2 years agoFix shared_shadow_inval_test when superpages are disabled
Eric van Gyzen [Fri, 19 Aug 2022 20:05:19 +0000 (15:05 -0500)]
Fix shared_shadow_inval_test when superpages are disabled

In that case, there is only one page size.

Reviewed by: kib
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D36265

2 years agotcp: Rack rwnd collapse.
Randall Stewart [Tue, 23 Aug 2022 13:17:05 +0000 (09:17 -0400)]
tcp: Rack rwnd collapse.

Currently when the peer collapses its rwnd, we mark packets to be retransmitted
and use the must_retran flags like we do when a PMTU collapses to retransmit the
collapsed packets. However this causes a problem with some middle boxes that
play with the rwnd to control flow. As soon as the rwnd increases we start resending
which may be not even a rtt.. and in fact the peer may have gotten the packets. Which
means we gratuitously retransmit packets we should not.

The fix here is to make sure that a rack time has passed before retransmitting the packets.
This makes sure that the rwnd collapse was real and the packets do need retransmission.

Reviewed by: tuexen
Sponsored by: Netflix Inc
Differential Revision: https://reviews.freebsd.org/D35166

2 years agoTCP Lro has a loss of timestamp precision and reorders packets.
Randall Stewart [Tue, 23 Aug 2022 13:12:31 +0000 (09:12 -0400)]
TCP Lro has a loss of timestamp precision and reorders packets.

A while back Hans optimized the LRO code. This is great but one
optimization he did degrades the timestamp precision so that
all flushed LRO entries end up with the same LRO timestamp
if there is not a hardware timestamp. The intent of the LRO timestamp
is to get as close to the time that the packet arrived as possible. Without
the LRO queuing this works out fine since a binuptime is taken and then
the rx_common code is called. But when you go through the queue path
you end up *not* updating the M_LRO_TSTMP fields.

Another issue in the LRO code is several places that cause packet reordering. In
general TCP can handle reordering but it can cause extra un-needed retransmission
as well as other oddities. We will fix all of the reordering problems.

Lets fix this so that we restore the precision to the timestamp.

Reviewed by: tuexen, gallatin
Sponsored by: Netflix Inc
Differential Revision: https://reviews.freebsd.org/D36043

2 years agoFix zpool status in case of unloaded keys
George Amanakis [Tue, 23 Aug 2022 00:42:01 +0000 (02:42 +0200)]
Fix zpool status in case of unloaded keys

When scrubbing an encrypted filesystem with unloaded key still report an
error in zpool status.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alek Pinchuk <apinchuk@axcient.com>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #13675
Closes #13717

2 years agopfsync: replace struct pfsync_pkt with int flags
Luiz Amaral [Mon, 22 Aug 2022 18:54:36 +0000 (20:54 +0200)]
pfsync: replace struct pfsync_pkt with int flags

Get rid of struct pfsync_pkt. It was used to store data on the stack to
pass to all the submessage handlers, but only the flags part of it was
ever used. Just pass the flags directly instead.

Reviewed by: kp
Obtained from: OpenBSD
Sponsored by: InnoGames GmbH
Differential Revision: https://reviews.freebsd.org/D36294

2 years agotools/build: Unbreak bmake bootstrap on Linux
Jessica Clarke [Mon, 22 Aug 2022 21:02:53 +0000 (22:02 +0100)]
tools/build: Unbreak bmake bootstrap on Linux

Currently make.py has a hack to add the cross-build headers to the
include search path when bootstrapping bmake on Linux (but not macOS).
This is a bit of an abuse of these headers, and e9ba1fd5eda2 was not
prepared for this, since sys/bitcount.h won't exist in that instance (it
gets copied into WORLDTMP during the legacy build). Work around this
until we can wean the bmake bootstrap off using these headers by not
including sys/bitcount.h when it doesn't exist.

Fixes: e9ba1fd5eda2 ("tools/build: Provide FreeBSD's bitstring API when cross-building")

2 years agonfsd: Allow multiple instances of rpc.tlsservd
Rick Macklem [Mon, 22 Aug 2022 20:54:24 +0000 (13:54 -0700)]
nfsd: Allow multiple instances of rpc.tlsservd

During a discussion with someone working on NFS-over-TLS
for a non-FreeBSD platform, we agreed that a single server
daemon for TLS handshakes could become a bottleneck when
an NFS server first boots, if many concurrent NFS-over-TLS
connections are attempted.

This patch modifies the kernel RPC code so that it can
handle multiple rpc.tlsservd daemons.  A separate commit
currently under review as D35886 for the rpc.tlsservd
daemon.

2 years agoPrevent zevent list from consuming all of kernel memory
Paul Dagnelie [Mon, 22 Aug 2022 19:36:22 +0000 (12:36 -0700)]
Prevent zevent list from consuming all of kernel memory

There are a couple changes included here. The first is to introduce
a cap on the size the ZED will grow the zevent list to. One million
entries is more than enough for most use cases, and if you are
overflowing that value, the problem needs to be addressed another
way. The value is also tunable, for those who want the limit to be
higher or lower.

The other change is to add a kernel module parameter that allows
snapshot creation/deletion to be exempted from the history logging;
for most workloads, having these things logged is valuable, but for
some workloads it produces large quantities of log spam and isn't
especially helpful.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Issue #13374
Closes #13753

2 years agoAdd dsl to the src committers and bz as my mentor
Dmitry Salychev [Sun, 21 Aug 2022 18:02:59 +0000 (20:02 +0200)]
Add dsl to the src committers and bz as my mentor

Approved by: bz (mentor)
Differential Revision: https://reviews.freebsd.org/D36276

2 years agoarm/gic: fix a KASSERT in arm_gic_reserve_msi_range()
Bjoern A. Zeeb [Mon, 22 Aug 2022 11:51:37 +0000 (11:51 +0000)]
arm/gic: fix a KASSERT in arm_gic_reserve_msi_range()

Fix the off-by-one in the KASSERT in arm_gic_reserve_msi_range()
allowing the MSIs being allocated at the end of the IRQ range.

Reported by: bz
Submitted by: andrew
Reviewed by: andrew
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D36291

2 years agoibcore: Add support for RDMA/RoCE using VLAN(4) devices.
Hans Petter Selasky [Mon, 22 Aug 2022 08:03:24 +0000 (10:03 +0200)]
ibcore: Add support for RDMA/RoCE using VLAN(4) devices.

Classify VLAN devices as ethernet in rdma_copy_addr().
This fixes the following error message:

rdma_bind_addr: No such file or directory

Submitted by: bartosz.sobczak@intel.com (Bartosz Sobczak)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36120
Sponsored by: NVIDIA Networking

2 years agosound(4): Fix order of parameters for custom equalizer band pass filter.
Hans Petter Selasky [Mon, 22 Aug 2022 07:41:05 +0000 (09:41 +0200)]
sound(4): Fix order of parameters for custom equalizer band pass filter.

When specifying a custom band-pass filter for the sound(4) equalizer,
use the same format as used by the resulting C-code define to avoid
confusion.

PR: 195760
Sponsored by: NVIDIA Networking

2 years agouart: Add ACPI entry for LS1046A UART
Mateusz Kozyra [Mon, 22 Aug 2022 07:07:15 +0000 (09:07 +0200)]
uart: Add ACPI entry for LS1046A UART

NXP defines unique name for LS1046A UART - "NXP0018".
It is ns8250 compatible, adding a new uart compat data entry is enough
to make it work.
Tested on LS1046ARDB.

Approved by: mw(mentor)
Reviewed by: mw, kd
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D36260

2 years agostand: Use bool for stage_offset_set
Warner Losh [Sun, 21 Aug 2022 15:45:44 +0000 (09:45 -0600)]
stand: Use bool for stage_offset_set

stage_offset_set is a boolean, convert it to a bool.

Sponsored by: Netflix