Commit Graph

278135 Commits

Author SHA1 Message Date
Gordon Bergling
8f98a937ed uname.1: Clarify the -r option
It is some times hard to understand the difference between
kernel version and userland version. So clarify the -r option
of uname(1) in terms of a printed kernel version.

While here, add some cross references:

- cross reference freebsd-version(1) in uname(1)
- cross reference freebsd-version(1) and uname(1) in freebsd-update(8)

PR:		265594
Reported by:	rwatson
Reviewed by:	gbe, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36516
2022-09-16 13:27:54 +02:00
Warner Losh
c9baa97471 arch: armv4 isn't supported either on aarch64 running in aarch32 mode
FreeBSD used to support both armv4 and armv5 binaries. All of that
support has been removed from the tree. We have only ever supported
armv6 and armv7 binaries in that mode. Note armv4 here too for
completeness since it flowed better than 'armv5 and earlier' and means
the same thing (FreeBSD never ran on an armv3 or earlier CPU).

Sponsored by:		Netflix
2022-09-15 11:20:01 -06:00
Jessica Clarke
7b673a2c73 freebsd32: Make sendmsg match native ABI for unpadded final control message
The API says that CMSG_SPACE should be used for msg_controllen, but in
practice the native ABI allows you to only use CMSG_LEN for the final
(typically only) control message, and real-world software does this,
including Wayland. For freebsd32, this is in practice mostly harmless,
since control messages are generally used to carry file descriptors,
which are already 4 bytes in size and thus no padding is needed, but
they can carry other quantities that may not result in an aligned
length. This was discovered after CheriBSD's freebsd64 equivalent was
updated to match the freebsd32 implementation, as that uses 8 byte
alignment which does break the file descriptor use case, and thus
Wayland.

This used to be addressed by aligning buflen before the first iteration,
but that allowed unwanted invalid inputs and was lost in 1b1428dcc8,
with no safer equivalent put in its place.

Reviewed by:	brooks, kib, markj
Obtained from:	CheriBSD
Fixes:		1b1428dcc8 ("Fix a TOCTOU vulnerability in freebsd32_copyin_control().")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36554
2022-09-15 17:16:22 +01:00
Gleb Smirnoff
eb90a48867 ObsoleteFiles: fix some dates in my comments 2022-09-15 09:04:50 -07:00
Guido van Rooij
0f97a0d425 stand/efi: Clean the proper files
Need to clean the specific loader we build, not the generic loader.efi

Reviewed by: imp
2022-09-15 09:13:52 -06:00
Dag-Erling Smørgrav
1e8a0a3053 Add deprecation notices for OPIE.
Differential Revision: https://reviews.freebsd.org/D36593
2022-09-15 16:29:00 +02:00
Ed Maste
9054e29681 Retire ISA sound card DMA support
As all ISA sound card drivers have been removed sndbuf_dma no longer
serves any purpose.

Reviewed by:	mav
Relnotes: 	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34671
2022-09-15 10:07:23 -04:00
Mitchell Horne
c387c23098 tests/sys/fs: remove mips workaround
MIPS is gone, so we no longer require this check.

Reviewed by:	imp, asomers
Differential Revision:	https://reviews.freebsd.org/D36566
2022-09-15 10:58:42 -03:00
Mitchell Horne
80dadb9c1a pf tests: require scapy for ether:short_pkt
The pft_ether.py script requires both python and scapy to be installed.
Check for this so we properly skip the test when it is unavailable.

Reviewed by:	kp
Fixes:	07ffa50ba0 ("pf tests: test short packets")
Differential Revision:	https://reviews.freebsd.org/D36561
2022-09-15 10:58:42 -03:00
Gordon Bergling
0090d18235 Update SEE ALSO sections for resolver.{3,5} and hosts.5
The mentioned document "Name Server Operations Guide for BIND" is
outdated, so remove it from the SEE ALSO section of hosts.5
and resolver.{3,5}.

PR:		266360
Reported by:	Graham Perrin <grahamperrin at FreeBSD dot org>
Reviewed by:	karels
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36557
2022-09-15 15:24:28 +02:00
Gordon Bergling
a5c1b9e332 qlnxe(4): Fix a typo in a source code comment
- s/paramters/parameters/

MFC after:	3 days
2022-09-15 10:31:05 +02:00
Gordon Bergling
59f7c7ff51 cxgbetool(8): Fix a typo in a source code comment
- s/paramter/parameter/

MFC after:	3 days
2022-09-15 10:29:54 +02:00
Gordon Bergling
4732904942 bootptest: Fix a typo in a source code comment
- s/avaible/available/

MFC after:	3 days
2022-09-15 10:28:52 +02:00
Gordon Bergling
c86b1d9965 safexcel: Fix a typo in a source code comment
- s/paramters/parameters/

MFC after:	3 days
2022-09-15 10:26:48 +02:00
Gordon Bergling
f2411b9257 flua: Fix a typo in a source code comment
- s/paramter/parameter/

MFC after:	3 days
2022-09-15 10:25:54 +02:00
Gordon Bergling
4771011b8f kern_jail: Fix a typo in a source code comment
- s/paramter/parameter/

MFC after:	3 days
2022-09-15 10:25:19 +02:00
Gordon Bergling
d53555d63b netpfil: Fix some typos in source code comments
- s/paramter/parameter/
- s/paramters/parameters/

MFC after:	3 days
2022-09-15 10:24:00 +02:00
Warner Losh
9baa0817ec SPDX: Not BSD-4-Clause
This license has 4 clauses, and shares some text with the BSD-4-Clause
license. However, it omits the standard disclaimer and has 2 clauses all
its own. Remove this tag, since it was made in error and this doesn't
match the SPDX copy of the BSD-4-Clause license.

Sponsored by:		Netflix
2022-09-14 21:29:31 -06:00
Gleb Smirnoff
da6715bbb1 ip_output: always increase "cantfrag" stat if ip_fragment() fails
While here, join two unlikely cases into one if clause.

Submitted by:		Ivan Rozhuk <rozhuk.im gmail.com>
PR:			265718
Reviewed by:		mjg, melifaro
Differential revision:	https://reviews.freebsd.org/D36584
2022-09-14 19:22:40 -07:00
Mateusz Guzik
145a50dcda Unbreak the build after b3ee318b79 2022-09-14 23:52:05 +00:00
Mateusz Guzik
d04c7f10d4 vfs: make delmntque return with the interlock held
saves on relocking dance -- the lock is taken immediately
afterwards anyway.
2022-09-14 23:30:19 +00:00
Mateusz Guzik
43fbd0e7a7 lockf: elide vnode interlock in the common case in lf_purgelocks
The interlock was already taken and released when dooming, thus by
API contract locking state cannot be legally installed.

At the same time the state is almost never there to begin with.
2022-09-14 23:04:22 +00:00
Mateusz Guzik
ad5e1f9c2d devfs: stop taking the interlock in devfs_delete
It buys nothing now that vhold does not require it.
2022-09-14 22:51:42 +00:00
Mateusz Guzik
a1c555f48b devfs: retire the unused DEVFS_DEL_VNLOCKED flag 2022-09-14 22:47:53 +00:00
Gleb Smirnoff
b3ee318b79 domains: rewrite documentation to describe present state
Reviewed by:		debdrup, pauamma
Differential revision:	https://reviews.freebsd.org/D36513
2022-09-14 14:12:24 -07:00
Mateusz Guzik
a755fb921e vfs: retire the V_MNTREF flag
Reviewed by:	kib, mckusick
Differential Revision:	https://reviews.freebsd.org/D36521
2022-09-14 18:16:36 +00:00
Mateusz Guzik
61a1d5dde2 vfs: stop using the V_MNTREF flag
Reviewed by:	kib, mckusick
Differential Revision:	https://reviews.freebsd.org/D36521
2022-09-14 18:16:23 +00:00
Mateusz Guzik
db5f85a4b2 ufs: stop using the V_MNTREF flag
Reviewed by:	kib, mckusick
Differential Revision:	https://reviews.freebsd.org/D36521
2022-09-14 18:16:07 +00:00
Mateusz Guzik
04f095a491 ufs: try to elide the interlock in ufs_itimes
Reviewed by:	kib, mckusick
Differential Revision:	https://reviews.freebsd.org/D36522
2022-09-14 18:12:03 +00:00
Mateusz Guzik
be931de6c9 ufs: always call ufs_itimes on close
While here dedup code with fifo.

Reviewed by:	kib, mckusick
Differential Revision:	https://reviews.freebsd.org/D36522
2022-09-14 18:11:40 +00:00
Brad Davis
2913e785f0 bsdinstall: fix a couple stragglers in whitelabeling the scripts
PR:		265797
Reviewed by:	allanjude, asiciliano
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D36235
2022-09-14 11:06:11 -06:00
Konstantin Belousov
2eddd8ebf9 i386: explain the handshake between copyout_fast.s and page fault handler
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2022-09-14 18:47:57 +03:00
Konstantin Belousov
cbbf522795 i386: lower register's pressure on copyout_fast
Do not require that %ebx contains idlePTD AKA %kcr3.  This also
simplifies KBI contract between copyout_fast and page handler.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2022-09-14 18:46:32 +03:00
Konstantin Belousov
49587b8fb4 i386 copyout/in_fast: handle page fault from KVA access
by delegating the work to the slow path.

Some kernel memory, like pipe buffers, is pageable.  We must not enable
interrupts, and consequently, preemption, while in critical section in
the fast copyout path, because we use pcpu buffers.  If page fault
occurs while copying from the pcpu copyout_buf to kernel memory, abort
fast path and delegate work to the slow implementation.

In collaboration with:	pho, tijl
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2022-09-14 18:46:32 +03:00
Konstantin Belousov
fd25c62278 i386: check that trap() and syscall() run on the thread kstack
and not on the trampoline stack.  This is a useful way to ensure that
we did not enabled interrupts while on user %cr3 or trampoline stack.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2022-09-14 18:46:32 +03:00
Konstantin Belousov
5313350374 i386 copyout_fast: do not use trampstk for temporal data, reduce ucr3 region
This simplifies code a lot.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2022-09-14 18:46:31 +03:00
Konstantin Belousov
7078e0e2c2 i386 double fault: %ebx printout was missed
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2022-09-14 18:46:31 +03:00
Gleb Smirnoff
15b73a2a14 ip_reass: use correct comparison in ipreass_callout()
Reported-by:	syzbot+55415dc73f9b89b87fce@syzkaller.appspotmail.com
2022-09-14 08:32:07 -07:00
Tetsuya Uemura
e2386f18ec nxprtc: Fix timing issue with register access.
My Adafruit PCF8523 RTC on either RPi2B or RPi3B+ failed to work around
80 ~ 90 % of boot-ups, by printing the following log lines.

nxprtc0: <NXP PCF8523 RTC> at addr 0xd0 on iicbus0
nxprtc0: cannot set up timer
Warning: no time-of-day clock registered, system time will not be set accurately

This is due to pcf8523_start_timer(sc) returned non-zero in
nxprtc_start() due to a register read failure of PCF8523_R_TMR_A_FREQ or
PCF8523_R_TMR_CLKOUT or a failure to program a new value.

The pause_sbt("nxpbat") sleep was too short and caused the register
access failures.

PR: 266093
2022-09-14 07:34:15 -06:00
Jens Schweikhardt
b94e192660 Capitalize title like in all other titles. 2022-09-14 13:42:43 +02:00
Jens Schweikhardt
e3d5f18e56 Correct typos: s/mit Aksenten/mit Akzenten 2022-09-14 11:53:44 +02:00
Maxim Konovalov
acc3f0689a getaddrinfo(3): A typo fixed
PR:	266403
2022-09-14 05:08:45 +00:00
Mateusz Guzik
f7dc4a71da vfs: plug spurious error checks in namei
error is guaranteed 0 at that point
2022-09-13 23:18:30 +00:00
Maxim Sobolev
3078531de1 Fix mergemaster(8) breakage in the 6ad780caa.
Split out termcap.small generation into its own Makefile under
etc/termcap, so it's properly executed by the underlying command:

  make 'SUBDIR_OVERRIDE=etc' everything

Reported by:	gbe
MFC after:	1 month
2022-09-13 13:36:22 -07:00
Ed Maste
4ee9db7a1d Update capsicum-test to eab7a83b05becf64439b4b256b3d756b353fbbbb 2022-09-13 13:42:46 -04:00
Jessica Clarke
100f79569d riscv: Add da9063_pmic and da9063_rtc to GENERIC and NOTES
This is the PMIC on SiFive's HiFive Unmatched; add it and the RTC child
device driver so we have a working RTC.

Reviewed by:	mhorne, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36201
2022-09-13 17:46:28 +01:00
Jessica Clarke
129028c79c da9063_rtc: Add new driver for the Dialog Semiconductor DA9063 RTC
This is a simple RTC present in the PMIC, supporting 1s precision.

This is the PMIC on SiFive's HiFive Unmatched.

Reviewed by:	mhorne, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36200
2022-09-13 17:46:21 +01:00
Jessica Clarke
80466455ad da9063_iic: Add new driver for the Dialog Semiconductor DA9063 PMIC
This is an MFD with regulators, an RTC and a watchdog, among other
things. This adds the necessary infrastructure for specific children to
be added.

Note that the PMIC can also be attached via SPI, not just I2C, and so
the interface is abstracted. No SPI implementation is added, however.

This is the PMIC on SiFive's HiFive Unmatched.

Reviewed by:	manu, mhorne
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36199
2022-09-13 17:46:09 +01:00
Pavel Timofeev
d88dc1b0b9 hda: add patch for Framework laptop v2 headphone jack
Fix headphone (12th gen Intel laptops) and mic jack (both 11th and
12th gen) switching.

PR:		262579
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36354
2022-09-13 12:16:26 -04:00
Dag-Erling Smørgrav
a8e8a91445 pax: name all supported formats.
Sponsored by:	Klara, Inc.
2022-09-13 18:13:19 +02:00