Commit graph

287760 commits

Author SHA1 Message Date
John Baldwin a19ed3495d gpiobus: Use bus_generic_rl_* methods
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42715
2023-11-22 09:06:22 -08:00
Kristof Provost b01cad6d3a ip_mroute: handle V_mfchashtbl allocation failure
We allocate V_mfchashtbl with HASH_NOWAIT (which maps to M_NOWAIT), so
this allocation may fail. As we didn't handle that failure we could end
up dereferencing a NULL pointer later (e.g. during X_ip_mrouter_done()).

Do the obvious thing and fail out if we cannot allocate the table.

See also:	https://redmine.pfsense.org/issues/14917
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-11-22 14:47:14 +01:00
Mateusz Piotrowski 8ec79e8ae0 loader.efi.8: Fix a typo
MFC after:	3 days
Sponsored by:	Klara, Inc.
2023-11-22 13:25:34 +01:00
Warner Losh 7a1bc422d1 stand/efi: Consolidate integer types
We have no need for 5 different copies of these.

Sponsored by:		Netflix
Reviewed by:		rcm, kevans, andrew
Differential Revision:	https://reviews.freebsd.org/D42699
2023-11-21 19:58:20 -07:00
Brooks Davis 9fc0ff9d85 libc: remove some obsolete VCS data
These wide char support files were copied from the previous versions
with expanded $FreeBSD$ strings in #if 0 blocks.  Remove them and the
scssid definitions in the same #if 0 blocks.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42688
2023-11-21 22:46:43 +00:00
Brooks Davis 1818f3fda9 ps: s/kern.max_pid/kern.pid_max/ in a comment
Sponsored by:	DARPA
2023-11-21 22:46:01 +00:00
Warner Losh e4789047ff stand/efi: Define ACPI_USE_SYSTEM_INTTYPES to be 1 instead of blank
To avoid a redefinition warning... This needs to be redone correctly,
but this gets amd64 building again...  My amd64 environment is polluted
with something that caues earlier failures which I ignored...

Fixes:		488bc7e9a7
Sponsored by:	Netflix
2023-11-21 11:38:46 -07:00
Olivier Certner 9d882de2da Remove sysctl 'kern.smp.forward_signal_enabled'
It seems this was an "emergency" knob to revert a newly introduced
behavior.  Overall, we want better system-wide signal receive latency,
and it doesn't seem that some contrary policy was ever needed (and if
that comes up, it should rather be implemented, e.g., per-process).

Suggested by:           kib
Reviewed by:            kib, jhb
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D42315
2023-11-21 13:25:34 -05:00
Olivier Certner 2f68ae6150 makesyscall: Simplify a bit emitting syscall declarations
Reviewed by:            kevans, imp
MFC after:              2 weeks
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D42168
2023-11-21 13:25:34 -05:00
Alex Xu (Hello71) 96f193b290 Compile RACK when options TCP_RACK, not TCP_BBR
Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Fixes: 3a338c5341 ("Add the BBR and RACK stacks to the LINT kernel.")
Pull Request:	https://github.com/freebsd/freebsd-src/pull/907
2023-11-21 13:51:10 -04:00
Gleb Smirnoff f903065018 hpts: install kernel module
It is important to instantly load tcp_rack.ko and tcp_bbr.ko

Reviewed by:		tuexen, imp
Differential Revision:	https://reviews.freebsd.org/D42697
2023-11-21 09:22:46 -08:00
Gleb Smirnoff 219a6ca919 tcp: uninline tcp_account_for_send()
This allows to clear inclusion of "opt_kern_tls.h" from a system header.

Reviewed by:		rscheff, tuexen
Differential Revision:	https://reviews.freebsd.org/D42696
2023-11-21 09:21:41 -08:00
Alan Somers 04cfe6c12c aio_read.2: correct the description of aio_buf
Looks like a copypasta from aio_write.2.

[skip ci]

Reported by:	Paul Floyd <pjfloyd@wanadoo.fr>
MFC after:	1 week
Sponsored by:	Axcient
Reviewed by:	jilles (manpages)
Differential Revision: https://reviews.freebsd.org/D42621
2023-11-21 09:52:02 -07:00
Warner Losh 488bc7e9a7 stand/efi: Request ACPI use the system inttypes
With the system inttypes, we build on all platforms again.

Suggested by:	andrew
Fixes:		0b01d45783
Sponsored by:	Netflix
2023-11-21 08:59:05 -07:00
Konstantin Belousov bddc7a8a94 Tweak compat_freebsd32_bit feature name
Mark the current name 'compat_freebsd_32bit' as legacy, and add the
new name 'compat_freebsd32'.  This seems to help with some make and
shell uses.

Requested by:	jrtc27
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42641
2023-11-21 13:56:15 +02:00
Konstantin Belousov 26b36a64be sysctl kern.supported_archs: return correct value
in case COMPAT_FREEBSD32 was enabled in config but hardware does not
support executing 32bit binaries.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42641
2023-11-21 13:56:06 +02:00
Konstantin Belousov 5a2bbacea5 FEATURE compat_freebsd_32bit: only report on arm64 when support is present
depending on hardware support for aarch32.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42641
2023-11-21 13:55:59 +02:00
Konstantin Belousov 46f3a29ee1 sys/sysctl.h: FEATURE_ADD()
A macro to dynamically register report of the kernel feature.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42641
2023-11-21 13:55:52 +02:00
Andrew Turner 25d0310ed8 arm64: Mark the armv8 crc32c as supporting BTI
This is built into a test so needs the BTI elf note for the rest of the
test to be built with BTI support enabled.

As the assembly uses the ENTRY macro it already supports BTI, so mark
it as such.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42595
2023-11-21 11:25:43 +00:00
Andrew Turner 1b9096cd1d arm64: Set the Guarded Page flag in the kernel
Now the kernel and modules are built with branch protection we can
enablethe Guarded Page flag in the page tables. This causes indirect
branches to a location without a correct landing pad instruction to
raise an exception.

This should help mitigate some attacks where a function pointer is
changed to point somewhere other than the start of the function,
however it doesn't stop an attacker pointing it to an unintended
function.

Reviewed by:	alc, scottph (both earlier version), markj
Sponsored by:	Arm Ltd
Sponsored by:	The FreeBSD Foundation (earlier version)
Differential Revision:	https://reviews.freebsd.org/D42080
2023-11-21 10:02:58 +00:00
Andrew Turner fd5aaf2ea0 libc: Teach libc about the BTI elf note
Add the Branch Target Identification (BTI) note to libc assembly
sources. As all obect files need the note for the library to have it
we need to insert it in all asm files.

Reviewed by:	emaste, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42228
2023-11-21 10:02:51 +00:00
Andrew Turner f3a83b3a62 arm64: Remove an old comment
This was missed when removing kern_delta

Sponsored by:	Arm Ltd
2023-11-21 09:30:45 +00:00
Warner Losh 0abe05aeac stand: bandaide for acpi
Old binaries do not set acpi.rsdp early enough. So when we boot with an
older loader.efi from an ESP that's not been updated, we assume there's
no ACPI on this system. This is unwise. Put a band-aide on this until we
can implement a proper 'feature' variable that the binary reports so we
can do conditionals for things like this in the future.

This is at best a rapid-response stop-gap.

Glanced at by: kevans
Sponsored by:		Netflix
2023-11-20 20:30:16 -07:00
Warner Losh f213da893c Makefile.inc1: Remove beri straggler
Beri's boot loader needed md5 to build. It was the only thing that
needed that, so remove it (confirmed with univers and grep).

Sponsored by:		Netflix
2023-11-20 20:30:02 -07:00
Robert Wing fb51ddb20d bhyve: increase fbuf display resolution limit
This enables connecting to the VNC server at a higher resolution.

Reviewed by:	corvink, markj
Differential Revision:	https://reviews.freebsd.org/D42620
2023-11-20 16:17:53 -09:00
Martin Matuska a2b560cc69 zfs: merge openzfs/zfs@a94860a6d
Notable upstream pull request merges:
 #15511 92dc4ad83 Consider `dnode_t` allocations in dbuf cache size accounting
 #15514 22c8c33a5 Use abd_zero_off() where applicable
 #15515 5a3bffab1 ZIO: Optimize zio_flush()
 #15527 cd67bc0ae freebsd: remove __FBSDID macro use

Obtained from:	OpenZFS
OpenZFS commit: a94860a6de
2023-11-21 01:46:00 +01:00
Brooks Davis bbde5c0725 pf: Remove __FBSDID() macro use
These are local additions that no longer make sense with the transition
to git.

This partially reverts a10f530f93.

Reviewed by:	kp, imp
Differential Revision:	https://reviews.freebsd.org/D42687
2023-11-21 00:21:11 +00:00
Brooks Davis ea2be8ed28 Remove __FBSDID from netbsd libc sources
I added them per then-current practice when I imported them, but now
they are just gratuious local diffs.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42686
2023-11-21 00:21:11 +00:00
Brooks Davis db94e7c3f9 vis: relocate _DIAGASSERT() define
Other similar files from NetBSD define it unconditionally as a local
diff.

Reviewed by:	imp (as part of D42686)
2023-11-21 00:21:11 +00:00
Tony Hutter a94860a6de
ZTS: Fix 'could not unmount datasets' on Alma 9 (#15542)
Many tests are failing on AlmaLinux 9 because ZTS could not destroy the
pool in cleanup.  This was due to $PWD being set to '.' instead of the
expected full path.  This patch sets $PWD to the full path.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Don Brady <don.brady@delphix.com>
2023-11-20 16:07:32 -08:00
Gleb Smirnoff bbbd7aab1b inpcb: garbage collect in_pcbnotifyall() 2023-11-20 14:38:31 -08:00
Gleb Smirnoff 367e8adb4b tests/netgraph: start ng_socket test suite
Just one check now, check node name.
2023-11-20 14:36:58 -08:00
Simon J. Gerraty 0a45a7e99f Fix share/zoneinfo for DIRDEPS_BUILD
The tranditional build makes multiple passes through the tree.
The DIRDEPS_BUILD visits each directory only once per architecture,
thus makefiles should be able to everything they need in a single pass.

The use of TZS!= when doing make(*install*)
only works if the directory has previously been visited to do zoneinfo
since before the zoneinfo target is run TZS will be empty.

To fix this, have the zoneinfo target capture the list of files to
zoneinfo, and install-zoneinfo use that list.
Rename that target to zonefiles - since that is now what it does.

This is more efficient - we only gather the list of zones when it is
likely to have changed, and allows the makefile to do everything in a
single pass.

Reviewed by:	stevek
Differential Revision:	https://reviews.freebsd.org/D42624
2023-11-20 12:52:43 -08:00
Arthur Kiyanovski fec0c3fb08 Add myself (akiyano) to calendar.freebsd
Approved by: cperciva (mentor)
2023-11-20 20:50:52 +00:00
R. Christian McDonald e0f3dc8272 loader: improve lua ACPI detection and handling
This is a follow-up patch to https://reviews.freebsd.org/D42459
that modifies the loader lua to use the correct loader variables
for determining ACPI availability.

This also fixes a bug where ACPI can be inadvertently disabled when
setting System Defaults at the loader menu.

Reviewed by:	imp, kevans
Approved by:	kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D42483
2023-11-20 14:03:59 -05:00
R. Christian McDonald 0b01d45783 loader: fix EFI ACPI detection
lua was previously unable to determine ACPI presence because this
probing was postponed until the final loading and execution of the
kernel.

This patch resolves that by detecting ACPI early (similar to
the order of operations in the legacy i386 loader).

Reviewed by:	kevans
Approved by:	kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D42459
2023-11-20 14:03:59 -05:00
R. Christian McDonald 34de1d507b committers-src: Add rcm as a src committer and kp as mentor
Approved by:	kp
2023-11-20 11:23:07 -05:00
Igor Ostapenko b453e3f755 pf tests: fix name and description of divert-to cases
Reflect the correct order of events for dummynet+ipdivert.
2023-11-20 12:30:18 +01:00
Igor Ostapenko 7e1affa242 pf.conf.5: revise divert-to and divert-reply 2023-11-20 12:30:18 +01:00
Konstantin Belousov 806e4e3273 ldconfig: filter out non-existing directories from default path
This is done only for ld-elf32.so.1, where /lib32 is kept in the path
due to the way STANDARD_LIBRARY_PATH is defined in rtld_paths.h.

This change fixes innocent warning appearing after
99132daf6f

Reviewed by:	dim, emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42626
2023-11-20 13:26:00 +02:00
Alvin Chen e0d0f0930e pseudofs: fix off by one in hash iteration in pfs_purge
Sponsored by:	Dell Technologies
Differential Revision:	https://reviews.freebsd.org/D42628
2023-11-20 05:57:25 +00:00
Warner Losh 1b681154f5 math: Move to const instead of __const
There's no reason to use the __const construct here. This is a left-over
from supporting K&R and ANSI compilers in the original Sun msun. All
other K&R crutches have been removed. Remove these as well. There's no
semantic difference. And there's already several others in math.h.

Sponsored by:		Netflix
2023-11-19 20:55:57 -07:00
Warner Losh 8ae4bb9398 cdefs: remove __GNUCLIKE_MATH_BUILTIN_CONSTANTS
Exp Run PR:		275123
Sponsored by:		Netflix
2023-11-19 19:36:51 -07:00
Warner Losh cc02e98a95 cdefs: Remove __GNUCLIKE_ASM
It's no longer used in the tree.

Exp Run PR:		275123
Sponsored by:		Netflix
2023-11-19 19:36:46 -07:00
Warner Losh 7b7975e032 cdefs: Remove __GNUCLIKE___TYPEOF from cdefs.h
It's been unused for quite some time, so remove it from sys/cdefs.h.

Exp Run PR:		275123
Sponsored by:		Netflix
2023-11-19 19:35:53 -07:00
Mateusz Guzik 305a2676ae vfs: dodge locking for lseek(fd, 0, SEEK_CUR)
It is very common and according to dtrace while running poudriere almost
all calls with SEEK_CUR pass 0.
2023-11-19 22:25:45 +00:00
Michael Tuexen 99c79cab42 if_tuntap: add LRO support to tap devices
This allows testing the LRO code with packetdrill in local mode.

Reviewed by:		rscheff
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D42548
2023-11-19 15:57:53 +01:00
Arthur Kiyanovski 33db883c95 Add akiyano as src committer and cperciva as mentor
Approved by: cperciva (mentor)
2023-11-19 13:54:29 +00:00
Martin Matuska 3c773cad57 cat: fallback on EISDIR with copy_file_range(2)
The filesystem may support reading directories directly
when security.bsd.allow_read_dir is set.

MFC after:	1 week
PR:		275099
2023-11-19 02:14:50 +01:00
Jamie Gritton 6000d46fc3 Move "jail -e" out of the rest of jail(8) flow. 2023-11-18 12:47:50 -08:00