Commit Graph

286874 Commits

Author SHA1 Message Date
Ed Maste
826d144679 newvers: remove references to svnliteversion
svnliteversion was provided by the base system copy of subversion,
which was disabled in a2bc17474b ("Disable building svnlite(1) by
default.")

Reviewed by:	zlei
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42034
2023-10-09 23:46:36 -04:00
Ed Maste
75be7e3027 sysctl: emit a newline after NULL node descriptions
Previously when printing the sysctl description (via the -d flag) we
omitted the newline if the node provided no description (i.e., NULL).
This could be observed via e.g. `sysctl -d dev`.

PR:		44034
Reviewed by:	zlei
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42112
2023-10-09 22:48:53 -04:00
Olivier Certner
892654fe9b setusercontext(): Apply personal settings only on matching effective UID
Commit 35305a8dc1 (r211393) added a check on whether 'uid' was equal
to getuid() before calling setlogincontext().  Doing so still allows
a setuid program to apply resource limits and priorities specified in
a user-controlled configuration file ('~/.login_conf') where
a non-setuid program could not.  Plug the hole by checking instead that
the process' effective UID is the target one (which is likely what was
meant in the initial commit).

PR:                     271750
Reviewed by:            kib, des
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40351
2023-10-09 21:47:10 -04:00
Konstantin Belousov
6e92fc9309 vkbd: correct ref count on cloned cdevs
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42008
2023-10-10 02:37:43 +03:00
Konstantin Belousov
27f1ec0be2 tun/tap: correct ref count on cloned cdevs
Reported and tested by:	eugen
PR:	273418
Discussed with:	jah, kevans
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42008
2023-10-10 02:36:59 +03:00
Ed Maste
792655abd6 x86: make EARLY_AP_STARTUP mandatory
When early AP startup was introduced in 2016 it was put behind a kernel
option EARLY_AP_STARTUP as a transition aid, so that it could be turned
off if necessary.  For x86 the non-EARLY_AP_STARTUP case is no longer
functional, so disallow it.

Other archs are still incompatible with EARLY_AP_STARTUP, so the option
cannot yet be removed entirely.

Reported by:	wollman
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41351
2023-10-09 16:08:22 -04:00
Bjoern A. Zeeb
ad134f8ab7 iwlwifi: re-enable "Invalid TXQ id" logging
Various reports recently hit the "Invalid TXQ id" in iwlwifi again.
Unconditionally enable logging and add a note to report to a specific
PR in the log message for now.
Along with 018d93ece1 this will hopefully help us to understand what
is going on.

Sponsored by:	The FreeBSD Foundation
PR:	274382
2023-10-09 19:50:02 +00:00
Bjoern A. Zeeb
018d93ece1 LinuxKPI: 802.11: add unconditional error reporting
Multiple reports have shown missed state transitions in net80211 without
major cause obvious (or with a txq warning in iwlwifi).
In order to better track down potential problems add unconditional
ic_printf calls to any case in the lkpi state machine compat code which
would let us return with an error in the hope that it helps us to catch
the actual problems.
Also remove the debug conditions from ieee80211_{beacon,connection}_loss
which can also cause state transitions to have the ic_printf all the time
there too.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2023-10-09 19:21:51 +00:00
Jose Luis Duran
5d371834d2 Cirrus CI: Trigger on pull requests or downstream repos
Since Cirrus Labs is limiting their free usage tier [1], limit CI runs
on pull requests only.  Otherwise, we might deplete our monthly quota
within a few days.

Adapt the task amd64-llvm16 to execute on downstream repos or on pull
requests only.

Other alternatives will be further studied.

[1]: https://cirrus-ci.org/blog/2023/07/17/limiting-free-usage-of-cirrus-ci/
2023-10-09 15:13:21 -04:00
Pierre Pronchery
6f1af0d7d2 OpenSSL: update to 3.0.11
OpenSSL 3.0.11 addresses:

    POLY1305 MAC implementation corrupts XMM registers on Windows (CVE-2023-4807)

Relnotes:	Yes
Pull request:	https://github.com/freebsd/freebsd-src/pull/852
Sponsored by:	The FreeBSD Foundation
2023-10-09 15:00:26 -04:00
Xin LI
8f75390c66 file: Support testing multiple magic files.
This is based on upstream b74150490be904801378b2712fe0d532e1700124
but adapted to ATF.

Reviewed by: jlduran@gmail.com, markj, vangyzen
Differential Revision: https://reviews.freebsd.org/D42129
2023-10-09 10:44:42 -07:00
Ed Maste
edf8578117 ssh: Update to OpenSSH 9.5p1
Excerpts from the release notes:

Potentially incompatible changes
--------------------------------

 * ssh-keygen(1): generate Ed25519 keys by default.
   [NOTE: This change was already merged into FreeBSD.]

 * sshd(8): the Subsystem directive now accurately preserves quoting of
   subsystem commands and arguments.

New features
------------

 * ssh(1): add keystroke timing obfuscation to the client.

 * ssh(1), sshd(8): Introduce a transport-level ping facility.

 * sshd(8): allow override of Sybsystem directives in sshd Match blocks.

Full release notes at https://www.openssh.com/txt/release-9.5

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2023-10-09 13:28:17 -04:00
Benedict Reuschling
a3b3e89ff1 bhyve(8): Fix style warnings emitted by mandoc, no content changes 2023-10-09 16:43:35 +00:00
Felix Johnson
8120190f80 bhyve(8): Expand the -p option text with additional text and an example
PR:	249981
2023-10-09 16:32:33 +00:00
Felix Johnson
3523f0677e fdc.4: document fdc sysctls
PR:		105608
MFC-after:	1 week
2023-10-09 18:48:52 +07:00
Emmanuel Vadot
fee14577d5 mtree: Fix entry
Fixes:	af5e348c61 ("mtree: Add missing sound entry for /usr/examples")
2023-10-09 12:56:19 +02:00
Richard Scheffenegger
e2c6a6d29b tcp: include RFC6675 IsLost() in pipe calculation
Add more accounting while processing SACK data, to
keep track of when a packet is deemed lost using
the RFC6675 guidance.

Together with PRR (RFC6972) this allows a sender to
retransmit presumed lost packets faster, and loss
recovery to complete earlier.

Reviewed By: cc, rrs, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D39299
2023-10-09 12:37:20 +02:00
Zhenlei Huang
35b3be81f1 proc: Add sysctl flag CTLFLAG_TUN to loader tunable
The sysctl variable 'kern.kstack_pages' is actually a loader tunable.
Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it
correctly.

No functional change intended.

Note that on arm64 the thread0 stack size can not be controlled with it,
kib@ suggested that arm64 maintainers can fix it eventually so let's
enable it also on arm64 right now.

Reviewed by:	kib, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42113
2023-10-09 18:30:22 +08:00
Zhenlei Huang
31b9406530 buf: Add sysctl flag CTLFLAG_TUN to loader tunable
The sysctl variable 'vfs.unmapped_buf_allowed' is actually a loader
tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will
report it correctly.

No functional change intended.

Reviewed by:	kib, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42113
2023-10-09 18:30:22 +08:00
Zhenlei Huang
978be1ee5d sockets: Add sysctl flag CTLFLAG_TUN to loader tunable
The sysctl variable 'kern.ipc.maxsockets' is actually a loader tunable.
Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it
correctly.

No functional change intended.

Reviewed by:	kib, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42113
2023-10-09 18:30:22 +08:00
Zhenlei Huang
6a88498e53 mbuf: Add sysctl flag CTLFLAG_TUN to loader tunables
The following sysctl variables are actually loader tunables. Add sysctl
flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly.

 1. kern.ipc.mb_use_ext_pgs
 2. kern.ipc.nmbclusters
 3. kern.ipc.nmbjumbop
 4. kern.ipc.nmbjumbo9
 5. kern.ipc.nmbjumbo16
 6. kern.ipc.nmbufs

No functional change intended.

Reviewed by:	kib, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42113
2023-10-09 18:30:22 +08:00
Zhenlei Huang
2af5ce5b5e fd: Add sysctl flag CTLFLAG_TUN to loader tunables
The following sysctl variables are actually loader tunables. Add sysctl
flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly.

 1. kern.maxfiles
 2. kern.maxfilesperproc

No functional change intended.

Reviewed by:	kib, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42113
2023-10-09 18:30:21 +08:00
Zhenlei Huang
149b9c234b x86: Add sysctl flag CTLFLAG_TUN to loader tunables
The following sysctl variables are actually loader tunables. Add sysctl
flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly.

 1. machdep.idle
 2. machdep.idle_apl31

No functional change intended.

Reviewed by:	kib, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42113
2023-10-09 18:30:21 +08:00
Zhenlei Huang
95c01e9b32 nfscl: Add sysctl flag CTLFLAG_TUN to loader tunable
The sysctl variable 'vfs.nfs.iodmin' is actually a loader tunable. Add
sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it
correctly.

No functional change intended.

Reviewed by:	kib, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42113
2023-10-09 18:30:21 +08:00
Zhenlei Huang
0eb2e19789 ddb: Add sysctl flag CTLFLAG_TUN to loader tunable
The sysctl variable 'debug.ddb.capture.bufsize' is actually a loader
tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will
report it correctly.

No functional change intended.

Reviewed by:	kib, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42113
2023-10-09 18:30:21 +08:00
Zhenlei Huang
e2ad7ce37b cam/scsi: Add sysctl flag CTLFLAG_TUN to loader tunable
The sysctl variable 'kern.cam.scsi_delay' is actually a loader tunable.
Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it
correctly.

No functional change intended.

Reviewed by:	kib, imp (for #cam)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42113
2023-10-09 18:30:21 +08:00
Emmanuel Vadot
af5e348c61 mtree: Add missing sound entry for /usr/examples
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2023-10-09 11:22:27 +02:00
Jose Luis Duran
3347078000 (upstream) PR/386: Add newlines for consitency 2
Obtained from:	https://github.com/file/file/pull/134/
2023-10-08 21:52:53 -07:00
Jose Luis Duran
0d3a87569f file_test: Fix file test
Trimming of the line feed is no longer necessary after
d993c6b0db

Currently the tests:

  - bcachefs2
  - gpkg-1-zst
  - multiple

are failing, but a fix will be committed upstream.

This also reverts c5e957ad4 "file: fix test case for gpkg by removing the extra \n."

MFC after:	3 days
2023-10-08 21:44:14 -07:00
Zhenlei Huang
dac91eb766 sctp: Various fixes for loader tunables
The following sysctl variables are actually loader tunables. Add sysctl
flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly.

 1. net.inet.sctp.tcbhashsize
 2. net.inet.sctp.pcbhashsize
 3. net.inet.sctp.chunkscale

The loader tunable 'net.inet.sctp.tcbhashsize' and 'net.inet.sctp.chunkscale'
are only used during vnet initializing, thus it make no senses to make them
writable tunable.

Validate the values of loader tunables on vnet initialize, reset them to
theirs defaults if invalid to prevent potential kernel panics.

Reviewed by:	tuexen, #transport, #network
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42007
2023-10-09 12:36:48 +08:00
Bojan Novković
808f5ac3c6 arm64: Add a leaf PTP when pmap_enter(psind=1) creates a wired mapping
Let pmap_enter_l2() create wired mappings.  In particular, allocate a
leaf PTP for use during demotion.  This is a step towards reverting
commit 64087fd7f3.

Reviewed by:	alc, markj
Sponsored by:	Google, Inc. (GSoC 2023)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D41634
2023-10-08 20:40:44 -04:00
Bojan Novković
6c1d6d4c7f i386: Add a leaf PTP when pmap_enter(psind=1) creates a wired mapping
Let pmap_enter_pde() create wired mappings.  In particular, allocate a
leaf PTP for use during demotion.  This is a step towards reverting
commit 64087fd7f3.

Reviewed by:	alc, kib, markj
Sponsored by:	Google, Inc. (GSoC 2023)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D41635
2023-10-08 20:40:44 -04:00
Benedict Reuschling
3ddd961db1 mount_nfs(8): Indicate that the -t option is deprecated
In mount_nfs.c the -t option is deprecated and advises to use
timeout=<N> instead. However, since that refers to NFS over UDP, which
is not used nowadays, mark this option as deprecated in the man page.

PR:		260611
Suggested by:	rmacklem
2023-10-08 13:57:47 +00:00
Mateusz Guzik
4b9aa38ef0 teken: fix up unused func warnings
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-10-08 13:54:11 +00:00
Zhenlei Huang
38ecc80b2a tcp: Simplify the initialization of loader tunable 'net.inet.tcp.tcbhashsize'
No functional change intended.

Reviewed by:	cc, rscheff, #transport
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41998
2023-10-08 18:03:59 +08:00
Martin Matuska
9aa71bad21 zfs: update zfs_config.h and zfs_gitrev.h missing in b2526e8bfe 2023-10-08 09:55:29 +02:00
Martin Matuska
b2526e8bfe zfs: merge openzfs/zfs@66b81b349
Notable upstream pull request merges:
 #15290 54b1b1d89 import: require force when cachefile hostid doesn't
                  match on-disk
 #15319 342357cd9 Reduce number of metaslab preload taskq threads
 #15340 2a6c62109 ARC: Remove b_cv from struct l1arc_buf_hdr
 #15347 75a2eb7fa ARC: Drop different size headers for crypto
 #15350 96b9cf42e ARC: Remove b_bufcnt/b_ebufcnt from ARC headers
 #15353 66b81b349 ZIL: Reduce maximum size of WR_COPIED to 7.5K
 #15362 5b8688e62 zfsconcepts: add description of block cloning

Obtained from:	OpenZFS
OpenZFS commit:	66b81b3497
2023-10-08 09:43:15 +02:00
Dag-Erling Smørgrav
2821a7498f libfetch, fetch: Stop recommending the use of ca_root_nss.
MFC after:	3 days
Reviewed by:	kevans, emaste
Differential Revision:	https://reviews.freebsd.org/D42119
2023-10-08 06:35:15 +02:00
Danilo G. Baio
04c8bfc176 jexec.8: Add examples section
MFC after:	3 days
Reviewed by:	gbe, 0mp, danfe, pauamma_gundo.com
Differential Revision: https://reviews.freebsd.org/D40831
2023-10-07 19:44:44 -03:00
Christos Margiolis
6d3296f16a teken: use __bitcount() instead of bitcount()
The use of bitcount() triggered a build error because it couldn't be
located. __bitcount() on the other hand is defined in sys/types.h, which
is included in teken/teken.h.

MFC after:	2 weeks
2023-10-08 00:36:59 +03:00
Bojan Novković
9e589b0938 tty: fix improper backspace behaviour for UTF8 characters when in canonical mode
This patch adds additional logic in ttydisc_rubchar() to properly handle
backspace behaviour for UTF-8 characters.

Currently, typing in a backspace after a UTF8 character will delete only
one byte from the byte sequence, leaving garbled output in the tty's
output queue. With this change all of the character's bytes are deleted.
This change is only active when the IUTF8 flag is set (see
19054eb6053189144aa962b2ecc1bf5087758a3e "(s)tty: add support for IUTF8
input flag")

The code uses the teken_wcwidth() function to properly handle character
column widths for different code points, and adds the
teken_utf8_bytes_to_codepoint() function that converts a UTF-8 byte
sequence to a codepoint, as specified in RFC3629.

Reported by:    christos
Reviewed by:    christos, imp
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D42067
2023-10-07 21:00:11 +03:00
Bojan Novković
128f63cedc (s)tty: add support for IUTF8 input flag
This patch adds the necessary kernel and stty code to support setting
the IUTF8 flag for ttys. It is the first of two patches that fix
backspace behaviour for UTF-8 encoded characters when in canonical mode.

Reported by:	christos
Reviewed by:	christos, imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D42066
2023-10-07 20:59:57 +03:00
Alan Somers
662ec2f781 fusefs: sanitize FUSE_READLINK results for embedded NULs
If VOP_READLINK returns a path that contains a NUL, it will trigger an
assertion in vfs_lookup.  Sanitize such paths in fusefs, rejecting any
and warning the user about the misbehaving server.

PR:		274268
MFC after:	1 week
Sponsored by:	Axcient
Reviewed by:	mjg, markj
Differential Revision: https://reviews.freebsd.org/D42081
2023-10-07 08:22:03 -06:00
Michael Tuexen
abca3ae773 udp: fix sending of IPv4-mapped addresses
The inp_vflags field must be adjusted during the call of
in_pcbbind_setup(). This is consistent with the other places in the
code, but not elegant at all.

PR:			274009
Reported by:		syzbot+81ccc423a2737ed031ac@syzkaller.appspotmail.com
Reported by:		syzbot+c8e3dac881bba85bc029@syzkaller.appspotmail.com
Reviewed by:		markj, rrs, rscheff
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D42031
2023-10-07 15:56:00 +02:00
Ed Maste
f7a2eeaa75 src.conf(5): regen after 166a655fcf (bsdinstall/libdialog)
Sponsored by:	The FreeBSD Foundation
2023-10-06 21:16:18 -04:00
Mark Johnston
4640df1b0a mrsas: Fix callout locking in mrsas_complete_cmd()
callout_stop() requires the associated lock to be held.

This is a bit hacky, but I believe it's safe since the subsequent
mrsas_cmd_done() call will also acquire the SIM lock to stop a different
callout.

PR:		265484
Reviewed by:	imp
Tested by:	Jérémie Jourdin <jeremie.jourdin@advens.fr>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D39559
2023-10-06 20:31:03 -04:00
Alan Somers
8399d764c9 Fix intermittency in the sys.fs.fusefs.symlink.main test
This change is identical to 86885b1868 but for symlink instead of
mknod.  The kernel sends a FUSE_FORGET asynchronously with the final
syscall.  The lack of an expectation caused this test to occasionally
fail.

Also, remove a sleep that accidentally snuck into a different test.

MFC after:	2 weeks
MFC with:	86885b1868
Sponsored by:	Axcient
2023-10-06 15:08:03 -06:00
Ed Maste
a2b289608d mitigations.7: briefly explain RELRO
Reviewed by:	bcr (earlier), kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42107
2023-10-06 16:44:07 -04:00
Alan Somers
86885b1868 Fix intermittency in the sys.fs.fusefs.mknod.main test
In the Mknod.parent_inode test case, the kernel sends an extra
FUSE_FORGET message.  But because it gets sent asynchronously with the
failing syscall, it doesn't always get received before the test ends.
So we never setup an expectation for it.  And 90+% of the time the test
would exit successfully.

Fix the intermittency by always waiting to receive the FUSE_FORGET
message.

MFC after:	2 weeks
Sponsored by:	Axcient
2023-10-06 13:57:38 -06:00
Emmanuel Vadot
03205a8cd5 i2c: rtc: Add module for hym8563 driver
It's used in the nanopi-r5s
2023-10-06 21:29:38 +02:00