]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 months agodb_sym.c: restore sys/systm.h include
Mitchell Horne [Mon, 3 Oct 2022 17:51:22 +0000 (14:51 -0300)]
db_sym.c: restore sys/systm.h include

This was erroneously dropped in the previous commit.

Reported by: Jenkins
Fixes: 754cb545b68b ("ddb: de-duplicate decode_syscall()")

21 months agotcp: allow window scale and timestamps to be toggled individually
Richard Scheffenegger [Mon, 3 Oct 2022 17:18:58 +0000 (19:18 +0200)]
tcp: allow window scale and timestamps to be toggled individually

Simple change to allow for the individual toggling of
RFC7323 window scaling and timestamp option.

Reviewed By:     rrs, tuexen, glebius, guest-ccui, #transport
Sponsored by:    NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D36863

21 months agoriscv: move GEOM_PART_GPT option to DEFAULTS
Mitchell Horne [Tue, 14 Jun 2022 17:19:46 +0000 (14:19 -0300)]
riscv: move GEOM_PART_GPT option to DEFAULTS

This is consistent with other architectures.

21 months agoriscv: decode syscall in ddb backtrace
Mitchell Horne [Sun, 2 Oct 2022 22:47:24 +0000 (19:47 -0300)]
riscv: decode syscall in ddb backtrace

This presents the existing information in a slightly more readable way.

Reviewed by: jrtc27, markj, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36565

21 months agoddb: de-duplicate decode_syscall()
Mitchell Horne [Sun, 2 Oct 2022 22:46:00 +0000 (19:46 -0300)]
ddb: de-duplicate decode_syscall()

Only i386 and amd64 print the decoded syscall name in the backtrace.
This de-duplication facilitates further changes and adoption by other
platforms.

Reviewed by: jrtc27, markj, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36565

21 months agoetcupdate: Fix -N support for build command
Jessica Clarke [Mon, 3 Oct 2022 16:16:19 +0000 (17:16 +0100)]
etcupdate: Fix -N support for build command

Whilst febca0e64361 added -N for both build and extract, it only fully
worked for extract; build would perform the actual tree build with
-DNO_ROOT and construct the intended METALOG, but the subsequent tarball
creation did not take this into account and just tarred up the the
directory as-is rather than using the METALOG. This resulted in the
permissions and ownership not being correct, as well as there being a
stray METALOG file in the tarball's root.

Reported by: avg
Reviewed by: avg, jhb, imp
Tested by: avg
Fixes: febca0e64361 ("etcupdate: Add a -N flag to perform a NO_ROOT build")
Differential Revision: https://reviews.freebsd.org/D36845

21 months agobsdinstall release: Start installer on multiple consoles
Jessica Clarke [Mon, 3 Oct 2022 16:09:17 +0000 (17:09 +0100)]
bsdinstall release: Start installer on multiple consoles

Currently the installer is only started on the primary ("high level")
console. For systems where this is the video console and serial consoles
aren't of interest, and headless systems with just a serial console,
this works just fine, but for systems where both video and serial
consoles are present and meaningful this requires the user to select the
right primary console in loader, with the poor user experience of the
system appearing to hang if they leave the wrong one selected. This
notably differs from our multi-user behaviour of spawning getty on every
console, where the only issue with selecting the wrong primary console
is a quieter boot process until the login prompt appears (or the system
crashes).

Instead, use the newly-added runconsoles helper to run the installer on
every console (except for ttyv*, where only ttyv0 will be used). For
interactive installations, any of the consoles can be used, though only
one should be used at a time as no effort is made to avoid multiple
installations running at the same time clobbering each other. If the
Live CD option is selected, the other installers (which should, if the
user is well-behaved, be sitting at the welcome screen) will be killed.
If an automated install is in use, the primary console will be used to
display its output, and the others will direct the user to the primary
console.

Reviewed by: brooks, gjb
Differential Revision: https://reviews.freebsd.org/D36805

21 months agobsdinstall release: Move code to a new startbsdinstall wrapper
Jessica Clarke [Mon, 3 Oct 2022 16:09:16 +0000 (17:09 +0100)]
bsdinstall release: Move code to a new startbsdinstall wrapper

This separates out the install media-specific environment (creating
bsdinstall_etc) from actually running the installer on a given console.
This will be used by a future change to start the installer on multiple
consoles.

Reviewed by: brooks, gjb
Differential Revision: https://reviews.freebsd.org/D36803

21 months agobsdinstall: Add a new runconsoles helper binary
Jessica Clarke [Mon, 3 Oct 2022 16:09:16 +0000 (17:09 +0100)]
bsdinstall: Add a new runconsoles helper binary

This helper binary will run a given command on every on console, as
defined by /etc/ttys (except for ttyv*, where only ttyv0 will be used).
If one of the command processes exits, the rest will be killed. This
will be used by a future change to start the installer on multiple
consoles.

Reviewed by: brooks, imp, gjb
Differential Revision: https://reviews.freebsd.org/D36804

21 months agorelease: Remove remnants of pc98 support
Jessica Clarke [Mon, 3 Oct 2022 16:09:16 +0000 (17:09 +0100)]
release: Remove remnants of pc98 support

The cons25w line was added in c991a6474749 for pc98, along with reading
MACHINE in order to determine what terminal type to use for VTYs. Commit
2b375b4edd1b removed this condition, leaving it as always using xterm
for VTYs, but left behind the now-unused MACHINE variable and the
cons25w list entry. Clean these up to be how they were before pc98
support was added.

Note that anyone who really needs a cons25w terminal can still request
it, it's just not listed as a common option.

Reviewed by: imp, brooks
Differential Revision: https://reviews.freebsd.org/D36587

21 months agotime(3): Align fast clock times to avoid firing multiple timers.
Hans Petter Selasky [Mon, 3 Oct 2022 08:54:40 +0000 (10:54 +0200)]
time(3): Align fast clock times to avoid firing multiple timers.

In non-periodic mode absolute timers fire at exactly the time given.
When specifying a fast clock, align the firing time so that less
timer interrupt events are needed.

Reviewed by: rrs @
Differential Revision: https://reviews.freebsd.org/D36858
MFC after: 1 week
Sponsored by: NVIDIA Networking

21 months agobsdinstall: add hooks to allow for easier customizing the install
Brad Davis [Mon, 3 Oct 2022 15:49:31 +0000 (09:49 -0600)]
bsdinstall: add hooks to allow for easier customizing the install

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

21 months agocuse(3): Optimise small reads and writes.
Hans Petter Selasky [Tue, 20 Sep 2022 13:58:36 +0000 (15:58 +0200)]
cuse(3): Optimise small reads and writes.

When doing small reads and writes use an intermediate buffer to store the
data to save locking the remote process to access data.

Reviewed by: imp @
Differential Revision: https://reviews.freebsd.org/D36633
MFC after: 1 week
Sponsored by: NVIDIA Networking

21 months agocuse(3): Use bool type for boolean value instead of int type.
Hans Petter Selasky [Mon, 3 Oct 2022 15:26:43 +0000 (17:26 +0200)]
cuse(3): Use bool type for boolean value instead of int type.

No functional change intended.

Reviewed by: imp @
Differential Revision: https://reviews.freebsd.org/D36633
MFC after: 1 week
Sponsored by: NVIDIA Networking

21 months agoif_epair: fix build with RSS
Kristof Provost [Mon, 3 Oct 2022 15:02:55 +0000 (17:02 +0200)]
if_epair: fix build with RSS

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

21 months agosh: when loading profile, skip obvious scratch files.
Dag-Erling Smørgrav [Sun, 2 Oct 2022 12:23:28 +0000 (12:23 +0000)]
sh: when loading profile, skip obvious scratch files.

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

21 months agotcp: improve handling of SYN-ACK segments in TIMEWAIT state
Michael Tuexen [Mon, 3 Oct 2022 12:46:47 +0000 (14:46 +0200)]
tcp: improve handling of SYN-ACK segments in TIMEWAIT state

Only consider segments with the SYN bit set and the ACK bit cleared
as "new connection attempts", which result in re-using a connection
being in TIMEWAIT state. This results in consistent handling of
SYN-ACK segments.

Reviewed by: rscheff@
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D36864

21 months agoUpdates to UFS/FFS superblock integrity checks when reading a superblock.
Kirk McKusick [Mon, 3 Oct 2022 12:52:17 +0000 (05:52 -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

21 months agopowerpc: cpuset: add local functions for copyin/copyout
Alfredo Dal'Ava Junior [Mon, 3 Oct 2022 14:51:05 +0000 (11:51 -0300)]
powerpc: cpuset: add local functions for copyin/copyout

Add local functions to workaround an instruction segment trap (panic)
when the indirect functions copyin and copyout are called by an external
loadable kernel module (i.e. pfsync, zfs and linuxulator). The crash
was triggered by change 47a57144af25a7bd768b29272d50a36fdf2874ba, but
kernel binary linked with LLD 9 works fine. LLVM bisect points that LLD
behavior chaged after dc06b0bc9ad055d06535462d91bfc2a744b2f589.

This is know to affect powerpc targets only and the final fix is still
being discussed with the LLVM community.

PR: 266730
Reviewed by: luporl, jhibbits (on IRC, previous version)
MFC after: 2 days
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D36234

21 months agotcp: honor drop_synfin sysctl variable in TIME-WAIT
Michael Tuexen [Mon, 3 Oct 2022 10:48:30 +0000 (12:48 +0200)]
tcp: honor drop_synfin sysctl variable in TIME-WAIT

Reviewed by: rrs@
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D36862

21 months agoFix LINT build after 368ee2f86a0f4f6
Doug Moore [Mon, 3 Oct 2022 05:15:21 +0000 (00:15 -0500)]
Fix LINT build after 368ee2f86a0f4f6
Reported by: jenkins
Fixes: 368ee2f86a0f4f6

21 months agorb_tree: let insert search start from next node
Doug Moore [Mon, 3 Oct 2022 03:27:21 +0000 (22:27 -0500)]
rb_tree: let insert search start from next node

When the node to insert in the rb_tree is known to precede or follow a
particular node, new methods RB_INSERT_PREV and RB_INSERT_NEXT,
defined here, allow the search for where to insert the new node begin
with that particular node, rather than at the root, to save a bit of
time.

Using those methods, instead of RB_INSERT, in managing a tree in
iommu_gas.c, saves a little time.

Reviewed by: kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D35516

21 months agostty(1): provide details about interaction with job control
Konstantin Belousov [Mon, 26 Sep 2022 21:34:22 +0000 (00:34 +0300)]
stty(1): provide details about interaction with job control

Describe a shell trick to do non-blocking modification of the terminal
settings, by ignoring job control signals with trap built-in.

PR: 266627
With input from: jilles
Reviewed by: pauamma
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36745

21 months agolibusb(3): Implement libusb_interrupt_event_handler() by exposing existing function.
Hans Petter Selasky [Sun, 2 Oct 2022 15:30:40 +0000 (17:30 +0200)]
libusb(3): Implement libusb_interrupt_event_handler() by exposing existing function.

MFC after: 1 week
Sponsored by: NVIDIA Networking

21 months agonetlink: fix non-default builds (no INET, INET6, ROUTE_MPATH).
Alexander V. Chernikov [Sun, 2 Oct 2022 13:02:24 +0000 (13:02 +0000)]
netlink: fix non-default builds (no INET, INET6, ROUTE_MPATH).

21 months agonetlink: Fix build without VIMAGE
Jung-uk Kim [Sun, 2 Oct 2022 01:38:55 +0000 (21:38 -0400)]
netlink: Fix build without VIMAGE

21 months agoPut OPIE to rest.
Dag-Erling Smørgrav [Sun, 2 Oct 2022 01:37:29 +0000 (03:37 +0200)]
Put OPIE to rest.

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

21 months agonfs_clvnops.c: Fix access to v_mount when vnode unlocked
Rick Macklem [Sat, 1 Oct 2022 23:30:07 +0000 (16:30 -0700)]
nfs_clvnops.c: Fix access to v_mount when vnode unlocked

Commit ab17854f974b fixed access to v_mount when the
vnode is unlocked for nfs_copy_file_range().

This patch does the same for nfs_advlockasync().

MFC after: 1 week

21 months agosh: read more profile files.
Dag-Erling Smørgrav [Fri, 9 Sep 2022 13:08:43 +0000 (13:08 +0000)]
sh: read more profile files.

Differential Revision: https://reviews.freebsd.org/D36505
MFC after: 1 month

21 months agonetlink: fix build without INVARIANTS
Alexander V. Chernikov [Sat, 1 Oct 2022 21:20:50 +0000 (21:20 +0000)]
netlink: fix build without INVARIANTS

Reported by: cy

21 months agonetlink: fix format strings on 32-bit platforms
Alexander V. Chernikov [Sat, 1 Oct 2022 21:16:31 +0000 (21:16 +0000)]
netlink: fix format strings on 32-bit platforms

21 months agonetlink: fix debugging on 32-bit platforms
Alexander V. Chernikov [Sat, 1 Oct 2022 19:03:28 +0000 (19:03 +0000)]
netlink: fix debugging on 32-bit platforms

21 months agoshow_sysctl_all: reduce copying, please coverity
Doug Moore [Sat, 1 Oct 2022 17:20:04 +0000 (12:20 -0500)]
show_sysctl_all: reduce copying, please coverity

Modify db_show_sysctl_all so that it does not copy more than once the
data of the input oid, and so that what it passes to db_show_oid does
not alarm coverity.

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

21 months agonetlink: make test-includes happy by hiding most of the header
Alexander V. Chernikov [Sat, 1 Oct 2022 17:01:53 +0000 (17:01 +0000)]
netlink: make test-includes happy by hiding most of the header
 contents under _KERNEL.

21 months agonetlink: add headers installation
Alexander V. Chernikov [Sat, 1 Oct 2022 16:31:58 +0000 (16:31 +0000)]
netlink: add headers installation

21 months agoorganization.dot: add pizzamig to portmgr
Rene Ladan [Sat, 1 Oct 2022 16:18:31 +0000 (18:18 +0200)]
organization.dot: add pizzamig to portmgr

21 months agonfs_clvnops.c: Fix access to v_mount when vnode unlocked
Rick Macklem [Sat, 1 Oct 2022 14:43:53 +0000 (07:43 -0700)]
nfs_clvnops.c: Fix access to v_mount when vnode unlocked

Commit ab17854f974b fixed access to v_mount when the
vnode is unlocked for nfs_copy_file_range().

This patch does the same for nfs_ioctl().

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

21 months agolinuxolator: add netlink support
Alexander V. Chernikov [Fri, 26 Aug 2022 14:34:15 +0000 (14:34 +0000)]
linuxolator: add netlink support

Add the glue code to support netlink in Linuxolator.
linux_common(4) now depends on netlink(4).

All netlink protocol constants are consistent with the Linux version.
However, certain OS-specific constants such as AF_INET6, interface
flags or default routing table id, are different between FreeBSD and
Linux. Thus, it may be needed to rewrite some message parts or even
rewrite the whole message, adding or removing some TLVs. The core
netlink implementation code provides efficient rewriting callbacks
 which Linuxolator now uses.

Reviewed by: dchagin
Differential Revision: https://reviews.freebsd.org/D36361
MFC after: 2 months

21 months agonetlink: add netlink support
Alexander V. Chernikov [Thu, 20 Jan 2022 21:39:21 +0000 (21:39 +0000)]
netlink: add netlink support

Netlinks is a communication protocol currently used in Linux kernel to modify,
 read and subscribe for nearly all networking state. Interfaces, addresses, routes,
 firewall, fibs, vnets, etc are controlled via netlink.
It is async, TLV-based protocol, providing 1-1 and 1-many communications.

The current implementation supports the subset of NETLINK_ROUTE
family. To be more specific, the following is supported:
* Dumps:
 - routes
 - nexthops / nexthop groups
 - interfaces
 - interface addresses
 - neighbors (arp/ndp)
* Notifications:
 - interface arrival/departure
 - interface address arrival/departure
 - route addition/deletion
* Modifications:
 - adding/deleting routes
 - adding/deleting nexthops/nexthops groups
 - adding/deleting neghbors
 - adding/deleting interfaces (basic support only)
* Rtsock interaction
 - route events are bridged both ways

The implementation also supports the NETLINK_GENERIC family framework.

Implementation notes:
Netlink is implemented via loadable/unloadable kernel module,
 not touching many kernel parts.
Each netlink socket uses dedicated taskqueue to support async operations
 that can sleep, such as interface creation. All message processing is
 performed within these taskqueues.

Compatibility:
Most of the Netlink data models specified above maps to FreeBSD concepts
 nicely. Unmodified ip(8) binary correctly works with
interfaces, addresses, routes, nexthops and nexthop groups. Some
software such as net/bird require header-only modifications to compile
and work with FreeBSD netlink.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D36002
MFC after: 2 months

21 months agounbound: Adjust version string
Cy Schubert [Sat, 1 Oct 2022 13:48:37 +0000 (06:48 -0700)]
unbound: Adjust version string

Sync version string with contrib.

Reported by: "Herbert J. Skuhra" <herbert@gojira.at>
Fixes: 4f5c8956cff4
MFC after: 3 days

21 months agoseq: fix style nits
Mariusz Zaborski [Fri, 30 Sep 2022 17:38:34 +0000 (19:38 +0200)]
seq: fix style nits

MFC after: 2 weeks

21 months agoseq: fix potential NULL ptr reference
Mariusz Zaborski [Fri, 30 Sep 2022 17:36:04 +0000 (19:36 +0200)]
seq: fix potential NULL ptr reference

asprintf(3) allocates memory, and there isn't any guarantee of success.

MFC after: 2 weeks
Obtained from:  OpenBSD

21 months agofile: fix test case for gpkg by removing the extra \n.
Xin LI [Sat, 1 Oct 2022 05:45:32 +0000 (22:45 -0700)]
file: fix test case for gpkg by removing the extra \n.

MFC after: 3 days

21 months agoSet denominator to 1 if it is 0 in the init phase.
Ganbold Tsagaankhuu [Sat, 1 Oct 2022 02:01:59 +0000 (02:01 +0000)]
Set denominator to 1 if it is 0 in the init phase.
This prevents panic and also helps when the clocks
become available later.
This is based on comment from manu@ on
https://reviews.freebsd.org/D31299

21 months agouart: Remove sbbc reference
Warner Losh [Sat, 1 Oct 2022 00:26:45 +0000 (18:26 -0600)]
uart: Remove sbbc reference

sbbc support is for sparc64 only, which was removed in 58aa35d42975.

Sponsored by: Netflix

21 months agoarm: Catch up with Samsung S3C2xx0 code removal
Warner Losh [Sat, 1 Oct 2022 00:10:42 +0000 (18:10 -0600)]
arm: Catch up with Samsung S3C2xx0 code removal

The code backing these uart_class was removed 7 years ago in
4648ee952520.

Sponsored by: Netflix

21 months agoBump __FreeBSD_version for qsort_r prototype change.
Xin LI [Fri, 30 Sep 2022 22:31:13 +0000 (15:31 -0700)]
Bump __FreeBSD_version for qsort_r prototype change.

21 months agoAlter the prototype of qsort_r(3) to match POSIX, which adopted the
Ed Schouten [Fri, 30 Sep 2022 22:26:30 +0000 (15:26 -0700)]
Alter the prototype of qsort_r(3) to match POSIX, which adopted the
glibc-based interface.

Unfortunately, the glibc maintainers, despite knowing the existence
of the FreeBSD qsort_r(3) interface in 2004 and refused to add the
same interface to glibc based on grounds of the lack of standardization
and portability concerns, has decided it was a good idea to introduce
their own qsort_r(3) interface in 2007 as a GNU extension with a
slightly different and incompatible interface.

With the adoption of their interface as POSIX standard, let's switch
to the same prototype, there is no need to remain incompatible.

C++ and C applications written for the historical FreeBSD interface
get source level compatibility when building in C++ mode, or when
building with a C compiler with C11 generics support, provided that
the caller passes a fifth parameter of qsort_r() that exactly matches
the historical FreeBSD comparator function pointer type and does not
redefine the historical qsort_r(3) prototype in their source code.

Symbol versioning is used to keep old binaries working.

MFC: never
Relnotes: yes
Reviewed by: cem, imp, hps, pauamma
Differential revision: https://reviews.freebsd.org/D17083

21 months agotests/unix_passfd: add test case against 636420bde36
Gleb Smirnoff [Fri, 30 Sep 2022 20:41:41 +0000 (13:41 -0700)]
tests/unix_passfd: add test case against 636420bde36

21 months agotests/unix_passfd: factor out sysctl(3) read into separate function
Gleb Smirnoff [Fri, 30 Sep 2022 20:29:23 +0000 (13:29 -0700)]
tests/unix_passfd: factor out sysctl(3) read into separate function

21 months agounix/dgram: don't leak file descriptors when socket write failed
Gleb Smirnoff [Fri, 30 Sep 2022 20:26:14 +0000 (13:26 -0700)]
unix/dgram: don't leak file descriptors when socket write failed

21 months agopmap: optimize MADV_WILLNEED on existing superpages
Alan Cox [Fri, 30 Sep 2022 06:54:02 +0000 (01:54 -0500)]
pmap: optimize MADV_WILLNEED on existing superpages

Specifically, avoid pointless calls to pmap_enter_quick_locked() when
madvise(MADV_WILLNEED) is applied to an existing superpage mapping.

Reported by: mhorne
Reviewed by: kib, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36801

21 months agoif_vxlan(4): Check the size of data available in mbuf before using them
Zhenlei Huang [Fri, 30 Sep 2022 07:55:29 +0000 (09:55 +0200)]
if_vxlan(4): Check the size of data available in mbuf before using them

PR: 261711
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D36794

21 months agovmstat: remove processor counting from getcpuinfo()
Elliott Mitchell [Thu, 29 Sep 2022 16:27:24 +0000 (09:27 -0700)]
vmstat: remove processor counting from getcpuinfo()

As `ncpus` was otherwise unused, keeping track was pointless.  Gets rid
of a warning from an unused variable.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36628

21 months agorenice: Prevent running regression tests in parallel
Olivier Cochard [Thu, 29 Sep 2022 22:21:22 +0000 (00:21 +0200)]
renice: Prevent running regression tests in parallel

renice_abs_user and renice_rel_user tests modify global state, so they
are not compatible with parallel execution.

Reviewed by: asomers
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D36720

21 months agoqat: Fix build with GCC.
John Baldwin [Thu, 29 Sep 2022 22:07:02 +0000 (15:07 -0700)]
qat: Fix build with GCC.

Use the correct option to suppress warnings due to discarding const
from pointers on GCC vs clang.

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

21 months agoqat: Remove non-existent path from -I.
John Baldwin [Thu, 29 Sep 2022 22:06:31 +0000 (15:06 -0700)]
qat: Remove non-existent path from -I.

Reviewed by: markj
Reported by: GCC -Wmissing-include-dirs
Differential Revision: https://reviews.freebsd.org/D36779

21 months agolinux32: binutils as requires %eflags instead of %flags for CFI.
John Baldwin [Thu, 29 Sep 2022 22:06:01 +0000 (15:06 -0700)]
linux32: binutils as requires %eflags instead of %flags for CFI.

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

21 months agorb_tree: Use void casts for RB_AUGMENT_CHECK with unused return value.
John Baldwin [Thu, 29 Sep 2022 22:05:22 +0000 (15:05 -0700)]
rb_tree: Use void casts for RB_AUGMENT_CHECK with unused return value.

Reviewed by: dougm
Reported by: GCC -Wunused-value
Differential Revision: https://reviews.freebsd.org/D36778

21 months agotcp_sso: add support for TCP_MAXUNACKTIME
Michael Tuexen [Thu, 29 Sep 2022 00:02:11 +0000 (02:02 +0200)]
tcp_sso: add support for TCP_MAXUNACKTIME

Reported by: rscheff@
Reviewed by: rscheff@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D36802

21 months agoarm64: fix build without FDT
Kyle Evans [Thu, 29 Sep 2022 19:33:33 +0000 (14:33 -0500)]
arm64: fix build without FDT

static_kenv is only used under `FDT`, and `try_load_dtb` is only defined
with `FDT`.

Reviewed by: andrew, imp, manu
Differential Revision: https://reviews.freebsd.org/D36791

21 months agoextres: regulator: fix the build without FDT
Kyle Evans [Thu, 29 Sep 2022 19:33:33 +0000 (14:33 -0500)]
extres: regulator: fix the build without FDT

The regnode interface is currently only built for FDT, thus not
applicable to ACPI-only kernels.  Move the "regnode_if.h" include
underneath a previously existing FDT cpp segment.

Reviewed by: andrew, imp, manu
Differential Revision: https://reviews.freebsd.org/D36790

21 months agoarm64: coresight: fix the build without FDT
Kyle Evans [Thu, 29 Sep 2022 19:33:33 +0000 (14:33 -0500)]
arm64: coresight: fix the build without FDT

coresight_cpu_debug only has an FDT attachment, so let's not build it
for kernels without FDT.

coresight.h includes sys/malloc.h via header pollution
dev/ofw/openfirm.h; include it directly in case we're building without
FDT.

Reviewed by: andrew, manu
Differential Revision: https://reviews.freebsd.org/D36789

21 months agouart: uart_cpu_arm64: fix the build without FDT
Kyle Evans [Thu, 29 Sep 2022 19:33:32 +0000 (14:33 -0500)]
uart: uart_cpu_arm64: fix the build without FDT

clang 14 doesn't properly determine that we're unconditionally returning
if we have ACPI but not FDT.  Push FDT setup entirely into a new
function, much like we currently do with ACPI, and just return ENXIO if
that doesn't succeed.

Reviewed by: andrew, manu (earlier version)
Differential Revision: https://reviews.freebsd.org/D36788

21 months agoextres: syscon: pull in sys/malloc.h (fix !FDT)
Kyle Evans [Thu, 29 Sep 2022 19:33:32 +0000 (14:33 -0500)]
extres: syscon: pull in sys/malloc.h (fix !FDT)

syscon currently includes sys/malloc.h via header pollution from
dev/ofw/ofw_bus.h -> dev/ofw/openfirm.h.  Fix the build without FDT
defined by including sys/malloc.h directly.

Reviewed by: andrew, imp, manu
Differential Revision: https://reviews.freebsd.org/D36787

21 months agocap_netdb: Fix description style
Mariusz Zaborski [Thu, 29 Sep 2022 17:47:41 +0000 (19:47 +0200)]
cap_netdb: Fix description style

MFC after: 1 week

21 months agolibcapser: Add reference to cap_netdb
Mariusz Zaborski [Thu, 29 Sep 2022 17:45:16 +0000 (19:45 +0200)]
libcapser: Add reference to cap_netdb

MFC after: 1 week

21 months agocam: Provide compatibility for CAMGETPASSTHRU for periph drivers
Mark Johnston [Thu, 29 Sep 2022 17:07:52 +0000 (13:07 -0400)]
cam: Provide compatibility for CAMGETPASSTHRU for periph drivers

The CAM version bump 0x19 -> 0x1a changed the CAMGETPASSTHRU definition,
so applications using the old ioctl are broken.  However, that version
change did not affect anything relating to the ioctl implementation for
periphs.

Fixes: 8f9be1eed11c ("cam(4): Improve XPT_DEV_MATCH")
PR: 264709
Tested by: andreas.mahling@googlemail.com
Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D36389

21 months agoriscv: Handle invalid L2 entries in pmap_extract()
Mark Johnston [Thu, 29 Sep 2022 17:07:26 +0000 (13:07 -0400)]
riscv: Handle invalid L2 entries in pmap_extract()

While here, eliminate a single-use local variable.

PR: 266103
Reviewed by: mhorne
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D36395

21 months agotargets: libexec/telnetd no longer exists
Brooks Davis [Thu, 29 Sep 2022 16:55:24 +0000 (17:55 +0100)]
targets: libexec/telnetd no longer exists

21 months agomanpages: Remove telnetd references
Brooks Davis [Thu, 29 Sep 2022 16:55:17 +0000 (17:55 +0100)]
manpages: Remove telnetd references

Mostly remove from the SEE ALSO section, adding a mention of the port
where not removed. Elsewhere, remove as appropriate and change from .Xr
to .Nm where a mention of telnetd continues to make sense (or removing
it would require significant reworking of the surrounding text).

Reviewed by: imp, delphij, emaste
Differential Revision: https://reviews.freebsd.org/D36785

21 months agorelease: the telnet package contains the client
Brooks Davis [Thu, 29 Sep 2022 16:55:08 +0000 (17:55 +0100)]
release: the telnet package contains the client

Reviewed by: imp, delphij, emaste
Differential Revision: https://reviews.freebsd.org/D36784

21 months agoinetd.conf: update telnetd paths
Brooks Davis [Thu, 29 Sep 2022 16:54:58 +0000 (17:54 +0100)]
inetd.conf: update telnetd paths

Follow the example of rsh and point to /usr/local.

Reviewed by: imp, delphij, emaste
Differential Revision: https://reviews.freebsd.org/D36783

21 months agobsdbox: remove previously broken telnet(d) support
Brooks Davis [Thu, 29 Sep 2022 16:54:32 +0000 (17:54 +0100)]
bsdbox: remove previously broken telnet(d) support

Support for telnet(d) was commented out some time ago.  Remove now that
telnetd is gone.

Reviewed by: imp, delphij, emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D36782

21 months agobhyve: Address some warnings in bhyverun.c
Mark Johnston [Thu, 8 Sep 2022 23:08:10 +0000 (19:08 -0400)]
bhyve: Address some warnings in bhyverun.c

- Add const and __unused qualifiers where appropriate.
- Localize some global variables.
- Consistently spell vmexit state as "vme" in vmexit handlers, to avoid
  shadowing the global vm_exit state array.
- Similarly, avoid shadowing "optarg".

MFC after: 2 weeks

21 months agobhyve: Use designated initializers for virtio_consts tables
Mark Johnston [Thu, 29 Sep 2022 15:53:04 +0000 (11:53 -0400)]
bhyve: Use designated initializers for virtio_consts tables

This is easier to read and addresses some compiler warnings.

One might expect these tables to be read-only but it seems that the
snapshot/restore code may modify them.

MFC after: 2 weeks

21 months agobhyve: Address compiler warnings in audio.c
Mark Johnston [Thu, 8 Sep 2022 22:48:53 +0000 (18:48 -0400)]
bhyve: Address compiler warnings in audio.c

- Avoid arithmetic on void pointers.
- Avoid a signed/unsigned comparison in loops which write or fill audio
  data buffers.

Convert while loops to for loops while here.

MFC after: 2 weeks

21 months agobhyve: Address -Wno-unused warnings in atkbd.c
Mark Johnston [Thu, 8 Sep 2022 22:48:03 +0000 (18:48 -0400)]
bhyve: Address -Wno-unused warnings in atkbd.c

MFC after: 2 weeks

21 months agobhyve: Make smbios tables local to smbiostbl.c
Mark Johnston [Fri, 9 Sep 2022 03:26:47 +0000 (23:26 -0400)]
bhyve: Make smbios tables local to smbiostbl.c

Also flag them as const.

MFC after: 2 weeks

21 months agoRemove obsolete SystemV dir from BSD.usr.dist
Ed Maste [Thu, 29 Sep 2022 15:56:25 +0000 (11:56 -0400)]
Remove obsolete SystemV dir from BSD.usr.dist

/usr/share/zoneinfo/SystemV is removed via ObsoleteFiles as of commits
da038df8c92b and 57338837aef5, so do not create it in the first place.

PR: 266666
Fixes: da038df8c92b ("share/zoneinfo: don't build obsolete...")
MFC after: 3 days

21 months agoAdd a LINT-FDT arm64 config
Andrew Turner [Thu, 29 Sep 2022 15:35:03 +0000 (16:35 +0100)]
Add a LINT-FDT arm64 config

To ensure a kernel with only FDT builds add a LINT file with ACPI
disabled.

Sponsored by: The FreeBSD Foundation

21 months agoThe cmn600 and cmn620 drivers are ACPI
Andrew Turner [Thu, 29 Sep 2022 15:32:57 +0000 (16:32 +0100)]
The cmn600 and cmn620 drivers are ACPI

These drivers only have attachments for ACPI. Mark as such in
files.arm64.

Sponsored by: The FreeBSD Foundation

21 months agounbound: Vendor import 1.16.3
Cy Schubert [Thu, 29 Sep 2022 14:21:04 +0000 (07:21 -0700)]
unbound: Vendor import 1.16.3

Fixes CVE-2022-3204 'Non-Responsive Delegation Attack'.

MFC after: 3 days
Security: CVE-2022-3204
Security: https://nlnetlabs.nl/downloads/unbound/CVE-2022-3204.txt
Changelog: https://nlnetlabs.nl/news/2022/Sep/21/unbound-1.16.3-released/

Merge commit '0dde6f4f8e604df8c6fbdab8b4aadb5ddf80c76f' into unbound/main

21 months agounbound: Vendor import 1.16.3
Cy Schubert [Thu, 29 Sep 2022 14:14:11 +0000 (07:14 -0700)]
unbound: Vendor import 1.16.3

Fixes CVE-2022-3204 'Non-Responsive Delegation Attack'.

MFC after: 3 days
Security: CVE-2022-3204
Security: https://nlnetlabs.nl/downloads/unbound/CVE-2022-3204.txt
Changelog: https://nlnetlabs.nl/news/2022/Sep/21/unbound-1.16.3-released/

21 months agonet80211: move IEEE80211_F_WME check to vap for consistency
Bjoern A. Zeeb [Mon, 26 Sep 2022 20:57:41 +0000 (20:57 +0000)]
net80211: move IEEE80211_F_WME check to vap for consistency

The IEEE80211_F_WME checks done on the ic were changed to be per-vap
back in the time when multi-bss was introduced or earlier in 2008.
This one was left out but given it is a (re-)accos-req case I see
no reason not to use the vap value here for consistency too.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D36733

21 months agoopensolaris: Delete unused sources
Mark Johnston [Thu, 29 Sep 2022 12:33:38 +0000 (08:33 -0400)]
opensolaris: Delete unused sources

The SDT implementation in the opensolaris compat module just defines the
sdt:::set-error probe for ZFS.  But OpenZFS provides its own
implementation, and this one was not connected to the build.

No functional change intended.

MFC after: 1 week

21 months agolibsa/netif.c: Replace #if with #ifdef
Michał Grzelak [Wed, 28 Sep 2022 10:31:25 +0000 (12:31 +0200)]
libsa/netif.c: Replace #if with #ifdef

Follow the convention with *_DEBUG macros in stand/libsa/* and replace
"#if" with "#ifdef".

Reviewed by: kd
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D36740

21 months agolibsa/arp.c: Change printf format string
Michał Grzelak [Thu, 29 Sep 2022 05:22:47 +0000 (07:22 +0200)]
libsa/arp.c: Change printf format string

Change printf format string to avoid compilation failure when
ARP_DEBUG macro is defined.

Reviewed by: imp
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D36735

21 months agolibsa/rarp.c: Change casted type and printf format
Michał Grzelak [Wed, 28 Sep 2022 10:36:53 +0000 (12:36 +0200)]
libsa/rarp.c: Change casted type and printf format

Change the casted type and printf format string to avoid compilation
failure when RARP_DEBUG macro is defined.

Reviewed by: imp
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D36738

21 months agolibsa/rarp.c: Change printf format string
Michał Grzelak [Wed, 28 Sep 2022 10:34:55 +0000 (12:34 +0200)]
libsa/rarp.c: Change printf format string

Change printf format string to avoid compilation failure when
RARP_DEBUG macro is defined.

Reviewed by: imp
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D36739

21 months agocorrected RFC numbers in comments to proper ones
Hajimu UMEMOTO [Thu, 29 Sep 2022 10:57:59 +0000 (19:57 +0900)]
corrected RFC numbers in comments to proper ones

21 months agoarm64: enablement for ARM64 in Hyper-V (Part 1)
Souradeep Chakrabarti [Thu, 29 Sep 2022 09:57:46 +0000 (09:57 +0000)]
arm64: enablement for ARM64 in Hyper-V (Part 1)

The changes are to refactor the code of vmbus.c and hyperv.c to keep minimal
arch specific codes there and have them in separate files in x86/ arm64/ .
x86 is a new directory, which contains codes for x86 / x86_64. Instead of
repeating the same codes in existing amd64/ and i386/, this approach reduced
the repetition. This is first of three patches for Hyper-V enablement.

Reviewed by: whu
Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D36466

21 months agoFix an incorrectly placed parenthesis.
Kirk McKusick [Thu, 29 Sep 2022 08:44:34 +0000 (01:44 -0700)]
Fix an incorrectly placed parenthesis.

While syntactically correct and even looking correct, it was definitely
not providing the desired result. And it has been this way for nearly
twenty years.

MFC after:    2 weeks
Sponsored by: The FreeBSD Foundation

21 months agocxgbe/tom: Fix assertions in the code that maintains TCB history.
Navdeep Parhar [Thu, 29 Sep 2022 02:56:14 +0000 (19:56 -0700)]
cxgbe/tom: Fix assertions in the code that maintains TCB history.

The tids used for TOE connections start from tid_base, not 0.

MFC after: 1 week
Sponsored by: Chelsio Communications

21 months agonewkey: Fix mismatch in array bounds in for adjust().
John Baldwin [Wed, 28 Sep 2022 21:06:16 +0000 (14:06 -0700)]
newkey: Fix mismatch in array bounds in for adjust().

Reviewed by: emaste
Reported by: GCC -Warray-parameter
Differential Revision: https://reviews.freebsd.org/D36762

21 months agomail: Fix mismatch in array bounds for isign().
John Baldwin [Wed, 28 Sep 2022 21:05:42 +0000 (14:05 -0700)]
mail: Fix mismatch in array bounds for isign().

Reviewed by: imp, emaste
Reported by: GCC -Warray-parameter
Differential Revision: https://reviews.freebsd.org/D36761

21 months agosh: Fix mismatch in array bounds for vforkexecshell().
John Baldwin [Wed, 28 Sep 2022 21:04:08 +0000 (14:04 -0700)]
sh: Fix mismatch in array bounds for vforkexecshell().

Reviewed by: imp, jilles, emaste
Reported by: GCC -Warray-parameter
Differential Revision: https://reviews.freebsd.org/D36760

21 months agopam_unix: Fix mismatch in array bounds for make_salt().
John Baldwin [Wed, 28 Sep 2022 21:02:59 +0000 (14:02 -0700)]
pam_unix: Fix mismatch in array bounds for make_salt().

Reviewed by: imp, emaste
Reported by: GCC -Warray-parameter
Differential Revision: https://reviews.freebsd.org/D36759

21 months agoldns: Disable -Warray-parameter warnings from GCC 12 on sha2.c.
John Baldwin [Wed, 28 Sep 2022 21:02:30 +0000 (14:02 -0700)]
ldns: Disable -Warray-parameter warnings from GCC 12 on sha2.c.

Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D36758

21 months agolibc rpc: Fix mismatches in prototypes for array bounds.
John Baldwin [Wed, 28 Sep 2022 21:01:36 +0000 (14:01 -0700)]
libc rpc: Fix mismatches in prototypes for array bounds.

Various RPC functions used a bare pointer in function prototypes to
describe fixed-length buffer arguments but used a fixed-length array
in the function definition.  The manual page for these functions
describes the parameters as being fixed-length buffers, so update
the prototypes to match the definitions.

Reviewed by: imp, emaste
Reported by: GCC -Warray-parameter
Differential Revision: https://reviews.freebsd.org/D36757