freebsd.git
2 years agoMerge llvm-project release/14.x llvmorg-14.0.0-rc2-12-g09546e1b5103
Dimitry Andric [Sat, 5 Mar 2022 14:16:17 +0000 (15:16 +0100)]
Merge llvm-project release/14.x llvmorg-14.0.0-rc2-12-g09546e1b5103

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc2-12-g09546e1b5103.

PR: 261742
MFC after: 2 weeks

2 years agoMerge llvm-project release/14.x llvmorg-14.0.0-rc1-74-g4dc3cb8e3255
Dimitry Andric [Fri, 18 Feb 2022 22:41:20 +0000 (23:41 +0100)]
Merge llvm-project release/14.x llvmorg-14.0.0-rc1-74-g4dc3cb8e3255

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc1-74-g4dc3cb8e3255.

PR: 261742
MFC after: 2 weeks

2 years agoApply fix for asm constraint error in www/php80-opcache
Dimitry Andric [Thu, 17 Feb 2022 21:49:39 +0000 (22:49 +0100)]
Apply fix for asm constraint error in www/php80-opcache

Merge commit 027c16bef4b7 from llvm git (by Nick Desaulniers):

  [X86ISelLowering] permit BlockAddressSDNode "i" constraints for PIC

  When building 32b x86 code as PIC, the existing handling of "i"
  constraints is conservative since generally we have to go through the
  GOT to find references to functions.

  But generally, BlockAddresses from C code refer to the Function in the
  current TU.  Permit BlockAddresses to be used with the "i" constraint
  for those cases.

  I regressed this in
  commit 4edb9983cb8c ("[SelectionDAG] treat X constrained labels as i for asm")

  Fixes: https://github.com/llvm/llvm-project/issues/53868

  Reviewed By: efriedma, MaskRay

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

2 years agoMerge llvm-project release/14.x llvmorg-14-init-18315-g190be5457c90
Dimitry Andric [Sat, 5 Feb 2022 22:51:07 +0000 (23:51 +0100)]
Merge llvm-project release/14.x llvmorg-14-init-18315-g190be5457c90

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-18315-g190be5457c90.

PR: 261742
MFC after: 2 weeks

2 years agoMerge llvm-project main llvmorg-14-init-18294-gdb01b123d012
Dimitry Andric [Sat, 5 Feb 2022 20:07:43 +0000 (21:07 +0100)]
Merge llvm-project main llvmorg-14-init-18294-gdb01b123d012

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-18294-gdb01b123d012, the last commit before
the upstream release/14.x branch was created.

PR: 261742
MFC after: 2 weeks

2 years agoMerge llvm-project main llvmorg-14-init-17616-g024a1fab5c35
Dimitry Andric [Thu, 27 Jan 2022 22:17:16 +0000 (23:17 +0100)]
Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-17616-g024a1fab5c35.

PR: 261742
MFC after: 2 weeks

2 years agoMerge llvm-project main llvmorg-14-init-13186-g0c553cc1af2e
Dimitry Andric [Sat, 25 Dec 2021 22:36:56 +0000 (23:36 +0100)]
Merge llvm-project main llvmorg-14-init-13186-g0c553cc1af2e

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-13186-g0c553cc1af2e.

PR: 261742
MFC after: 2 weeks

2 years agoMerge llvm-project main llvmorg-14-init-11187-g222442ec2d71
Dimitry Andric [Thu, 2 Dec 2021 21:49:08 +0000 (22:49 +0100)]
Merge llvm-project main llvmorg-14-init-11187-g222442ec2d71

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-11187-g222442ec2d71.

PR: 261742
MFC after: 2 weeks

2 years agoMerge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3
Dimitry Andric [Sat, 20 Nov 2021 17:39:12 +0000 (18:39 +0100)]
Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10223-g401b76fdf2b3.

PR: 261742
MFC after: 2 weeks

2 years agoMerge llvm-project main llvmorg-14-init-10186-gff7f2cfa959b
Dimitry Andric [Sun, 20 Mar 2022 11:40:34 +0000 (12:40 +0100)]
Merge llvm-project main llvmorg-14-init-10186-gff7f2cfa959b

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10186-gff7f2cfa959b.

PR: 261742
MFC after: 2 weeks

2 years agosysvsem: Fix a typo
Dmitry Chagin [Sat, 14 May 2022 11:07:20 +0000 (14:07 +0300)]
sysvsem: Fix a typo

Per jamie@ rpr can be NULL if the jail is created with sysvsem=disable.
But at least it doesn't appear to be fatal, since rpr is never dereferenced
but is only compared to other prison pointers.

Reviewed by: jamie
Differential revision: https://reviews.freebsd.org/D35198
MFC after: 2 weeks

2 years agosysvsem: Style(9)
Dmitry Chagin [Sat, 14 May 2022 11:06:58 +0000 (14:06 +0300)]
sysvsem: Style(9)

MFC after: 2 weeks

2 years agosysvsem: Trim traiing whitespace
Dmitry Chagin [Sat, 14 May 2022 11:06:40 +0000 (14:06 +0300)]
sysvsem: Trim traiing whitespace

MFC after: 2 weeks

2 years agolibm: Add feenableexcept and fedisableexcept to library on powerpc
Justin Hibbits [Fri, 13 May 2022 22:18:25 +0000 (17:18 -0500)]
libm: Add feenableexcept and fedisableexcept to library on powerpc

Summary:
These functions are missing from the library itself, and exist solely in
the header.  This breaks a few ports that expect libm to have the
symbols in the library itself.

Questions on MFC-ability: Can this be MFC'd to 13.2, and how?

Reviewers: imp, emaste, kib

Reviewed By: kib

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

2 years agosysv test: properly wait for children
Eric van Gyzen [Thu, 12 May 2022 14:50:02 +0000 (09:50 -0500)]
sysv test: properly wait for children

In the msg and shm tests, if the child exited before the parent
entered sigsuspend(), the test would hang and time out.  This was
also a problem in the sem test, but the misuse of atf_tc_pass()
masked it.  Adding a short sleep before the sigsuspend() calls made
the hang 100% reliable.  With the same sleep in the new version,
the test passes reliably.

Remove calls to atf_tc_pass().  The call in the sem test broke the test
by exiting prematurely, after only one child out of five had finished.
The other two were harmless but unhelpful.

Reduce a one-second sleep to a more reasonable duration so I can quickly
run many iterations of the test.

Where feasible, assert that wait() returns the child PID.  While I'm here,
use the more succinct ATF_REQUIRE* instead of if/atf_tc_fail/else.

Flush stdout before forking to avoid double-flush.

Use errx() when errno is irrelevant.

Don't use ATF_REQUIRE* in children.  Apparently, the output doesn't
get saved.  The exit status works, so it fails correctly, but silently.

Re-enable the test in CI.

PR: 233649
Reviewed by: markj (previous version)
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D35187

2 years agoipfw.8: spell "layer2" consistently throughout the manual page
Eugene Grosbein [Fri, 13 May 2022 21:30:29 +0000 (04:30 +0700)]
ipfw.8: spell "layer2" consistently throughout the manual page

MFC after: 1 week

2 years agombuf: remove PH_vt alias for mbuf packet header persistent shared data
Gleb Smirnoff [Fri, 13 May 2022 20:32:43 +0000 (13:32 -0700)]
mbuf: remove PH_vt alias for mbuf packet header persistent shared data

Mechanical sed change s/PH_vt\.vt_nrecs/vt_nrecs/g

2 years agortsock: fix a stack overflow
Kurosawa Takahiro [Fri, 13 May 2022 17:58:11 +0000 (19:58 +0200)]
rtsock: fix a stack overflow

struct sockaddr is not sufficient for buffer that can hold any
sockaddr_* structure. struct sockaddr_storage should be used.

Test:
ifconfig epair create
ifconfig epair0a inet6 add 2001:db8::1 up
ndp -s 2001:db8::2 02:86:98:2e:96:0b proxy # this triggers kernel stack overflow

Reviewed by: markj, kp
Differential Revision: https://reviews.freebsd.org/D35188

2 years agofusefs tests: Remove an unused variable.
Dmitry Chagin [Fri, 13 May 2022 17:52:14 +0000 (20:52 +0300)]
fusefs tests: Remove an unused variable.

Reviewed by: asomers
Differential revision: https://reviews.freebsd.org/D35185
MFC after: 2 weeks

2 years agobsdinstall: allow whitelabeling the installer
Brad Davis [Fri, 13 May 2022 16:35:43 +0000 (10:35 -0600)]
bsdinstall: allow whitelabeling the installer

Override OSNAME to change the name of the OS in the installer.

This is a first step, the shell changes will be separate.

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

2 years agobsdinstall: add missing init of fd variable
Brad Davis [Fri, 13 May 2022 15:06:02 +0000 (09:06 -0600)]
bsdinstall: add missing init of fd variable

Missed breaking this commit into smaller pieces

Approved by: kp

2 years agobsdinstall: Filter out devices that cannot be opened
Brad Davis [Fri, 13 May 2022 14:33:21 +0000 (08:33 -0600)]
bsdinstall: Filter out devices that cannot be opened

Devices that cannot be opened are most likely the install media and
should not be listed as destinations.

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

2 years agokerneldump: remove physical from dump routines
Mitchell Horne [Fri, 13 May 2022 13:40:05 +0000 (10:40 -0300)]
kerneldump: remove physical from dump routines

It is unused, especially now that the underlying d_dumper methods do not
accept the argument.

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

2 years agokerneldump: remove physical argument from d_dumper
Mitchell Horne [Fri, 13 May 2022 13:39:29 +0000 (10:39 -0300)]
kerneldump: remove physical argument from d_dumper

The physical address argument is essentially ignored by every dumper
method. In addition, the dump routines don't actually pass a real
address; every call to dump_append() passes a value of zero for
physical.

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

2 years agoDrop d_dump from struct cdevsw
Mitchell Horne [Fri, 13 May 2022 13:38:54 +0000 (10:38 -0300)]
Drop d_dump from struct cdevsw

It appears to be unused. These days struct disk has a d_dump member,
which is what gets passed to the kernel dump framework.

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

2 years agoarm64: disable the EL2 MMU before dropping to EL1
Kyle Evans [Fri, 13 May 2022 03:03:32 +0000 (22:03 -0500)]
arm64: disable the EL2 MMU before dropping to EL1

An earlier stage may have set HCR_EL2.E2H, the clearing of which may
break address translation.  We don't need the EL2 MMU at this point, so
we can avoid re-enabling it for now and just drop to EL1 as usual.

Suggested by: andrew
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D34644

2 years agosockets: fix build, convert missed sbreserve_locked() calls
Gleb Smirnoff [Thu, 12 May 2022 21:27:45 +0000 (14:27 -0700)]
sockets: fix build, convert missed sbreserve_locked() calls

Fixes: 4328318445ae

2 years agofusefs: handle evil servers that return illegal inode numbers
Alan Somers [Wed, 4 May 2022 23:36:17 +0000 (17:36 -0600)]
fusefs: handle evil servers that return illegal inode numbers

* If during FUSE_CREATE, FUSE_MKDIR, etc the server returns the same
  inode number for the new file as for its parent directory, reject it.
  Previously this would triggers a recurse-on-non-recursive lock panic.

* If during FUSE_LINK the server returns a different inode number for
  the new name as for the old one, reject it.  Obviously, that can't be
  a hard link.

* If during FUSE_LOOKUP the server returns the same inode number for the
  new file as for its parent directory, reject it.  Nothing good can
  come of this.

PR: 263662
Reported by: Robert Morris <rtm@lcs.mit.edu>
MFC after: 2 weeks
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D35128

2 years agofusefs: make the mknod.cc tests a bit more general.
Alan Somers [Tue, 3 May 2022 22:53:20 +0000 (16:53 -0600)]
fusefs: make the mknod.cc tests a bit more general.

MFC after:      2 weeks
Reviewed by:    pfg

2 years agounix: microoptimize unp_connectat() - one less lock on success
Gleb Smirnoff [Thu, 12 May 2022 20:22:39 +0000 (13:22 -0700)]
unix: microoptimize unp_connectat() - one less lock on success

This change is also a preparation for further optimization to
allow locked return on success.

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

2 years agounix: make unp_connect2() void
Gleb Smirnoff [Thu, 12 May 2022 20:22:39 +0000 (13:22 -0700)]
unix: make unp_connect2() void

Assert that sockets are of the same type.  unp_connectat() already did
this check.  Add the check to uipc_connect2().

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

2 years agosockets: use socket buffer mutexes in struct socket directly
Gleb Smirnoff [Thu, 12 May 2022 20:22:12 +0000 (13:22 -0700)]
sockets: use socket buffer mutexes in struct socket directly

Since c67f3b8b78e the sockbuf mutexes belong to the containing socket,
and socket buffers just point to it.  In 74a68313b50 macros that access
this mutex directly were added.  Go over the core socket code and
eliminate code that reaches the mutex by dereferencing the sockbuf
compatibility pointer.

This change requires a KPI change, as some functions were given the
sockbuf pointer only without any hint if it is a receive or send buffer.

This change doesn't cover the whole kernel, many protocols still use
compatibility pointers internally.  However, it allows operation of a
protocol that doesn't use them.

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

2 years agopf: fix pf_rule_to_actions()
Kristof Provost [Wed, 11 May 2022 16:51:21 +0000 (18:51 +0200)]
pf: fix pf_rule_to_actions()

If we already had a pipe set in the actions struct we need to take care
to clear the flag if we're overwriting it with a queue.

This can happen if we've got Ethernet rules setting a dummynet pipe.
It does this indirectly, by adding the dummynet information to a pf_mtag
associated with the mbuf.

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

2 years agopf tests: test dummynet on route-to'd packets
Kristof Provost [Mon, 9 May 2022 10:36:53 +0000 (12:36 +0200)]
pf tests: test dummynet on route-to'd packets

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

2 years agopf tests: factor out common dummynet check
Kristof Provost [Mon, 9 May 2022 10:14:00 +0000 (12:14 +0200)]
pf tests: factor out common dummynet check

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

2 years agopf: tag dummynet'd route-to packets with their real destination
Kristof Provost [Tue, 10 May 2022 07:23:36 +0000 (09:23 +0200)]
pf: tag dummynet'd route-to packets with their real destination

If we delay route-to/dup-to/reply-to through dummynet we are eventually
returned to pf_test(). At that point we no longer have the context for
the route-to destination. We'd just skip the pf_test() and continue
processing. This means that route-to did not work as expected.

Extend pf_mtag to carry the route-to destination so we can apply it when
we re-enter pf_test().

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

2 years agopf: also apply dummynet to route-to/dup-to packets
Kristof Provost [Mon, 9 May 2022 09:11:42 +0000 (11:11 +0200)]
pf: also apply dummynet to route-to/dup-to packets

If packets are processed by a route-to/dup-to/reply-to rule (i.e. they
pass through pf_route(6)) dummynet was not applied to them.
This is because pf_route(6) passes packets directly to ifp->if_output(),
so the dummynet functions were never called.

Factor out the dummynet code and call dummynet prior to
ifp->if_output(). This has a secondary benefit of reducing some code
duplication between the IPv4 and IPv6 paths.

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

2 years agosqlite3: Vendor import of sqlite3 3.38.5
Cy Schubert [Thu, 12 May 2022 19:25:36 +0000 (12:25 -0700)]
sqlite3: Vendor import of sqlite3 3.38.5

Changes at https://www.sqlite.org/releaselog/3_38_5.html.

Obtained from https://www.sqlite.org/2022/sqlite-autoconf-3380500.tar.gz.

Merge commit 'b562e59e27efbea397bdc8782dfceaa3c0e23542'

2 years agotests: Get rid of invalid since 3e11d3f6 testcase
Dmitry Chagin [Thu, 12 May 2022 19:14:41 +0000 (22:14 +0300)]
tests: Get rid of invalid since 3e11d3f6 testcase

MFC after: 2 weeks

2 years agounix/dgram: uipc_listen() is specific for SOCK_STREAM and SOCK_SEQPACKET
Gleb Smirnoff [Thu, 12 May 2022 18:04:40 +0000 (11:04 -0700)]
unix/dgram: uipc_listen() is specific for SOCK_STREAM and SOCK_SEQPACKET

Rely on pr_usrreqs_init() to init SOCK_DGRAM to pru_listen_notsupp().

2 years agounix/dgram: pru_rcvd never called since PR_WANTRCVD not set
Gleb Smirnoff [Thu, 12 May 2022 18:04:40 +0000 (11:04 -0700)]
unix/dgram: pru_rcvd never called since PR_WANTRCVD not set

2 years agosockets: delete stale comment from sofree()
Gleb Smirnoff [Thu, 12 May 2022 18:02:50 +0000 (11:02 -0700)]
sockets: delete stale comment from sofree()

First  paragraph refers to old past "we used to" and is no longer
important today.  Second paragraph has just a wrong statement that
socket buffer is destroyed before pru_detach.

2 years agounix: don't call sbrelease() in uipc_detach()
Gleb Smirnoff [Thu, 12 May 2022 18:02:50 +0000 (11:02 -0700)]
unix: don't call sbrelease() in uipc_detach()

Since a982ce04428e the socket buffer is already cleared and released in
unp_dispose() that is called just before uipc_detach().

2 years agotests/kern: add tests for PF_UNIX/SOCK_DGRAM
Gleb Smirnoff [Thu, 12 May 2022 18:02:41 +0000 (11:02 -0700)]
tests/kern: add tests for PF_UNIX/SOCK_DGRAM

2 years agoFixed the value returned by sched_getaffinity().
Dmitry Chagin [Thu, 12 May 2022 17:06:13 +0000 (20:06 +0300)]
Fixed the value returned by sched_getaffinity().

On success gnu libc sched_getaffinity() should return 0, unlike underlying
Linux syscall which returns the size of CPU mask copied to user.

PR: 263939
MFC after: 2 weeks

2 years agoe1000: Increase rx_buffer_size to 32b
Kevin Bowling [Thu, 12 May 2022 15:38:09 +0000 (08:38 -0700)]
e1000: Increase rx_buffer_size to 32b

Extend the size of the local rx_buffer_size variable to account for
larger buffer sizes possible on 82580, i350 chips.

From i350 datasheet, 6.2.10 Initialization Control 4 (LAN Base Address
+ Offset 0x13):
When 4 ports are enabled maximum buffer size is 36 KB. When 2 ports are
enabled maximum buffer size is 72 KB. When only a single port is
enabled maximum buffer size is 144 KB.

and 8.3:
The overall available internal buffer size in the I350 for all ports is
144 KB for receive buffers and 80 KB for transmit Buffers. Disabled
ports memory can be shared between active ports and sharing can be
asymmetric. The default buffer size for each port is loaded from the
EEPROM on initialization.

From the reporter:
But for I350 when only 2 ports are used PBA size can be set as 72KB
(see datasheet RXPbsize or e1000_rxpbs_adjust_82580 function in
e1000_82575.c). In this case calculating the rx_buffer_size overflows
as 0x0048 << 10 = 73728 or 0x12000 pushed into u16. It is then set as
0x2000 or 8192.

PR: 263896
Reported by: hannula@gmail.com
Tested by: hannula@gmail.com
Approved by: markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D35167

2 years agossh: update sshd_config for prohibit-password option
Ed Maste [Tue, 10 May 2022 14:08:21 +0000 (10:08 -0400)]
ssh: update sshd_config for prohibit-password option

The PermitRootLogin option "prohibit-password" was added as a synonym
for "without-password" in 2015.  Then in 2017 these were swapped:
"prohibit-password" became the canonical option and "without-password"
became a deprecated synonym (in OpenSSH commit 071325f458).

The UsePAM description in sshd_config still mentioned
"without-password."  Update it to match the new canonical option.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

2 years agoHide -fuse-ld= not supported message for non-build targets
Ed Maste [Thu, 12 May 2022 14:49:30 +0000 (10:49 -0400)]
Hide -fuse-ld= not supported message for non-build targets

In some build configurations a warning about (an absolute path for)
-fuse-ld= not being supported by GCC was emitted during cleandir or
other non-build make targets.

For these non-build targets COMPILER_TYPE is set to "none" but we
treated the .else case for COMPILER_TYPE==clang as implying gcc.
Check instead for COMPILER_TYPE==gcc.

PR: 263913
Reported by: pstef
Reviewed by: pstef
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

2 years agoLinuxKPI: Implement linux/hashtable.h for FreeBSD.
Hans Petter Selasky [Tue, 10 May 2022 12:16:20 +0000 (14:16 +0200)]
LinuxKPI: Implement linux/hashtable.h for FreeBSD.

This implementation uses the concurrency kit, CK, API directly which is
suitable for use with EPOCH(9) and RCU under FreeBSD.

No functional change intended.

The initial "linux/hash.h" code was obtained from DragonFlyBSD via
FreeBSD's drm-kmod in ports.

Differential Revision: https://reviews.freebsd.org/D35162
Reviewed by: bz@ and markj@
MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agosqlite3: Vendor import of sqlite3 3.38.5
Cy Schubert [Thu, 12 May 2022 13:07:15 +0000 (06:07 -0700)]
sqlite3: Vendor import of sqlite3 3.38.5

Changes at https://www.sqlite.org/releaselog/3_38_5.html.

Obtained from https://www.sqlite.org/2022/sqlite-autoconf-3380500.tar.gz.

2 years agolinux(4): Revert c7ef7c3 as it's wrong at all.
Dmitry Chagin [Wed, 11 May 2022 18:00:54 +0000 (21:00 +0300)]
linux(4): Revert c7ef7c3 as it's wrong at all.

Reported by: trasz

2 years agokdump: Decode cpuset_t.
Dmitry Chagin [Wed, 11 May 2022 07:40:39 +0000 (10:40 +0300)]
kdump: Decode cpuset_t.

Reviewed by: jhb
Differential revision: https://reviews.freebsd.org/D34982
MFC after: 2 weeks

2 years agoAdd tests for affinity syscalls.
Dmitry Chagin [Wed, 11 May 2022 07:39:18 +0000 (10:39 +0300)]
Add tests for affinity syscalls.

MFC after: 2 weeks

2 years agoUse Linux semantics for the thread affinity syscalls.
Dmitry Chagin [Wed, 11 May 2022 07:36:01 +0000 (10:36 +0300)]
Use Linux semantics for the thread affinity syscalls.

Linux has more tolerant checks of the user supplied cpuset_t's.

Minimum cpuset_t size that the Linux kernel permits in case of
getaffinity() is the maximum CPU id, present in the system / NBBY,
the maximum size is not limited.
For setaffinity(), Linux does not limit the size of the user-provided
cpuset_t, internally using only the meaningful part of the set, where
the upper bound is the maximum CPU id, present in the system, no larger
than the size of the kernel cpuset_t.
Unlike FreeBSD, Linux ignores high bits if set in the setaffinity(),
so clear it in the sched_setaffinity() and Linuxulator itself.

Reviewed by: Pau Amma (man pages)
In collaboration with: jhb
Differential revision: https://reviews.freebsd.org/D34849
MFC after: 2 weeks

2 years agoupdate command to one that will actually give results
John-Mark Gurney [Wed, 11 May 2022 03:14:20 +0000 (20:14 -0700)]
update command to one that will actually give results

Thanks-to: kevans@

2 years agopf: add missing unlock on error in DIOCCHANGERULE
Mateusz Guzik [Wed, 11 May 2022 00:00:17 +0000 (00:00 +0000)]
pf: add missing unlock on error in DIOCCHANGERULE

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

2 years agoClean up comments in fsck.h.
Kirk McKusick [Tue, 10 May 2022 23:05:05 +0000 (16:05 -0700)]
Clean up comments in fsck.h.

No functional change.

2 years agomakefs: Fix warnings and reset WARNS to the default
Mark Johnston [Fri, 29 Apr 2022 13:18:02 +0000 (09:18 -0400)]
makefs: Fix warnings and reset WARNS to the default

Leave -Wcast-align disabled, at least for now, since there are numerous
instances of that warning in places where buffer pointers are cast to
pointers to various filesystem structures.  Fixing this properly would
be too much work for too little gain.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

2 years agonewfs_msdos: Fix warnings that arise when compiled for makefs
Mark Johnston [Fri, 29 Apr 2022 13:16:54 +0000 (09:16 -0400)]
newfs_msdos: Fix warnings that arise when compiled for makefs

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

2 years agopf: fix DIOCCHANGERULE after pf config and rb tree of rules
Mateusz Guzik [Wed, 4 May 2022 19:53:12 +0000 (19:53 +0000)]
pf: fix DIOCCHANGERULE after pf config and rb tree of rules

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

2 years agovchiq: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
vchiq: Remove unused devclass argument to DRIVER_MODULE.

2 years agotsec: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
tsec: Remove unused devclass argument to DRIVER_MODULE.

2 years agosec: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
sec: Remove unused devclass argument to DRIVER_MODULE.

2 years agoRemove unused sdiob_devclass.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
Remove unused sdiob_devclass.

2 years agort: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
rt: Remove unused devclass arguments to DRIVER_MODULE.

2 years agoquicc: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
quicc: Remove unused devclass argument to DRIVER_MODULE.

2 years agoqcom_*: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
qcom_*: Remove unused devclass arguments to DRIVER_MODULE.

2 years agonvram2env: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
nvram2env: Remove unused devclass arguments to DRIVER_MODULE.

2 years agonetmap: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
netmap: Remove unused devclass arguments to DRIVER_MODULE.

2 years agomge: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
mge: Remove unused devclass argument to DRIVER_MODULE.

2 years agodwc_hdmi: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
dwc_hdmi: Remove unused devclass argument to DRIVER_MODULE.

2 years agogxemul: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
gxemul: Remove unused devclass arguments to DRIVER_MODULE.

2 years agodrm2: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
drm2: Remove unused devclass argument to DRIVER_MODULE.

2 years agodrm2: Remove unused drm_devclass.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
drm2: Remove unused drm_devclass.

2 years agodpaa: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
dpaa: Remove unused devclass arguments to DRIVER_MODULE.

2 years agodpaa bman: Remove unused bman_devclass.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
dpaa bman: Remove unused bman_devclass.

2 years agodme: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
dme: Remove unused devclass argument to DRIVER_MODULE.

2 years agoRemove unused cfi_diskclass.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
Remove unused cfi_diskclass.

2 years agocesa: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
cesa: Remove unused devclass argument to DRIVER_MODULE.

2 years agoberi: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:39 +0000 (10:21 -0700)]
beri: Remove unused devclass arguments to DRIVER_MODULE.

2 years agoadlink: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
adlink: Remove unused devclass argument to DRIVER_MODULE.

2 years agopowerpc nexus: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
powerpc nexus: Remove unused devclass argument to DRIVER_MODULE.

2 years agopowerpc psim: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
powerpc psim: Remove unused devclass arguments to DRIVER_MODULE.

2 years agopowerpc pseries: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
powerpc pseries: Remove unused devclass arguments to DRIVER_MODULE.

2 years agopowerpc ps3: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
powerpc ps3: Remove unused devclass arguments to DRIVER_MODULE.

2 years agopowerpc powernv: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
powerpc powernv: Remove unused devclass arguments to DRIVER_MODULE.

2 years agopowerpc powermac: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
powerpc powermac: Remove unused devclass arguments to DRIVER_MODULE.

2 years agopowerpc mpc85xx: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
powerpc mpc85xx: Remove unused devclass arguments to DRIVER_MODULE.

2 years agorbled: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
rbled: Remove unused devclass argument to DRIVER_MODULE.

2 years agopowerpc mambo: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
powerpc mambo: Remove unused devclass arguments to DRIVER_MODULE.

2 years agopowerpc amigaone: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
powerpc amigaone: Remove unused devclass arguments to DRIVER_MODULE.

2 years agoRemove unused openpic_devclass.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
Remove unused openpic_devclass.

2 years agoscc: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
scc: Remove unused devclass arguments to DRIVER_MODULE.

2 years agopowermac_nvram: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
powermac_nvram: Remove unused devclass argument to DRIVER_MODULE.

2 years agoadb: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
adb: Remove unused devclass arguments to DRIVER_MODULE.

2 years agoRemove unused adb_devclass.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
Remove unused adb_devclass.

2 years agoriscv sifive: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:38 +0000 (10:21 -0700)]
riscv sifive: Remove unused devclass arguments to DRIVER_MODULE.

2 years agoriscv: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:37 +0000 (10:21 -0700)]
riscv: Remove unused devclass arguments to DRIVER_MODULE.

2 years agoxilinx: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:37 +0000 (10:21 -0700)]
xilinx: Remove unused devclass arguments to DRIVER_MODULE.

2 years agogoldfish_rtc: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Tue, 10 May 2022 17:21:37 +0000 (10:21 -0700)]
goldfish_rtc: Remove unused devclass argument to DRIVER_MODULE.