Commit Graph

285741 Commits

Author SHA1 Message Date
Marius Strobl
ae6d496358 sym(4): Add __diagused to nseg of getbaddrcb()
The parameter is only used when compiling with INVARIANTS.
2023-08-18 16:33:27 +02:00
Konstantin Belousov
4318843250 std.nodebug: remove DIAGNOSTIC from debug configs
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-08-18 16:39:22 +03:00
Konstantin Belousov
1384a0b940 kern/subr_unit.c: fix non-debug build
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-08-18 16:37:16 +03:00
Konstantin Belousov
5f452214f2 vm_map.c: fix syntax
Fixes:	c718009884
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-08-18 16:37:16 +03:00
Michael Tuexen
c3179e6660 sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
Michael Tuexen
e416c81923 sctp: whitespace change to improve consistency
MFC after:	1 week
2023-08-18 15:06:23 +02:00
Michael Tuexen
fb259f62bb sctp: unbreak congestion control dtrace support
Fix a typo and improve consistency of handling variables only used
when compiling with dtrace support.

MFC after:	1 week
2023-08-18 15:01:35 +02:00
Dmitry Chagin
0541653520 linux(4): Remove sys/cdefs.h inclusion under x86/linux due to 685dc743 2023-08-18 15:58:32 +03:00
Dmitry Chagin
110be11ac9 linux(4): Remove include of sys/types.h from linux_vdso.h
Due to sys/param.h includes sys/types.h and the fact that the sys/param.h
is included everywhere where linux_vdso.h is needed.
2023-08-18 15:58:32 +03:00
Dmitry Chagin
2be88e2cca linux(4): Follow style(9), don't include both sys/param.h and sys/types.h 2023-08-18 15:58:32 +03:00
Konstantin Belousov
c718009884 vm_map.c: plug several more places which might modify entry->offset
for the GUARD entries protecting stacks gaps.

syzkaller: https://syzkaller.appspot.com/bug?extid=c325d6a75e4fd0a68714
Reviewed by:	dougm, markj (previous version)
Tested by:	pho (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D41475
2023-08-18 15:43:35 +03:00
Dmitry Salychev
2a9021898c
sff: Add SFP driver (fdt-based draft)
This basic version of the driver obtains properties of the "sff,sfp"
compatible devices and implements a simple interface to provide an I2C
bus device for the rest of the drivers (e.g. to implement SIOCGI2C).

Both of the interface and driver are subjects for a further
generalization to be used in case of non-FDT and non-arm64 platforms.

Reviewed by:		bz, manu
Approved by:		bz (mentor)
MFC after:		3 weeks
Differential Revision:	https://reviews.freebsd.org/D41440
2023-08-18 12:40:11 +02:00
Dmitry Chagin
7bbdcdc9b7 linprocfs(5): Follow style(9), sort includes 2023-08-18 13:12:02 +03:00
Dmitry Chagin
cb1fab08e9 linprocfs(5): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
Dmitry Chagin
88362a0086 linsysfs(5): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
Dmitry Chagin
ce8e645a4a linux(4): Follow style(9), include sys/systm.h after sys/param.h 2023-08-18 13:12:02 +03:00
Dmitry Chagin
3460fab5fc linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
Doug Moore
b6a61d6836 linuxkpi math: fix kassert in math64.h
Include <sys/systm.h> in math64.h, so that KASSERT and bool are
defined, to allow compilation to succeed after
b80ea45237 and dabbbebcb0f5...
2023-08-18 00:31:03 -05:00
Enji Cooper
47fc52b181 Update make delete-old
This change updates `make delete-old` to account for files installed by the
following options:
- MK_BSDINSTALL
- MK_DMAGENT
- MK_EXAMPLES
- MK_SENDMAIL

MFC after:	2 weeks
2023-08-18 05:18:36 -07:00
Kyle Evans
dabbbebcb0 linuxkpi: fix buildkernel after b80ea45237
Unbalanced parentheses broke the build; re-balance.

Fixes:	b80ea45237 ("LinuxKPI: implement mul_u64_u64_div_u64()")
2023-08-18 00:12:37 -05:00
Enji Cooper
22dc8901a7 Use proper convention for relative path linking
The change made in e835ee68e1 did not
follow the convention for relative path symlinks. Per the convention,
paths be prefixed with `${BINDIR}`, not `/bin/`. `${BINDIR}` can be
modified from the Makefile, on the command line, or in the
environment. This convention is the canonically correct way to do
things.

This follows the convention used in `bin/pkill/Makefile`,
`bin/timeout/Makefile`, etc.

MFC after:	1 week
MFC with:	f05948d4e9
MFC with:	e835ee68e1
Requested by:	jrtc27, kevans
2023-08-18 04:20:32 -07:00
Kyle Evans
a76629cb03 kern: osd: stop downsizing arrays when the last slot deregisters
It was noted in D41404 that these reallocations aren't actually
guaranteed to succeed, despite assertions to the contrary.  We're
talking relatively small allocations, so just free up the individual
slot to be reused later as needed.

Note that this doesn't track the last active slot as of this moment, but
this could be done later if we find it's worth the complexity for what
little that would allow to be optimized (osd_call, slightly).

While we're here, fix the debug message that indicates which slot we
just allocated when we find an unused one; the slot # is actually one
higher than the index.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D41409
2023-08-17 23:06:12 -05:00
Bjoern A. Zeeb
214e3e09b3 fwget: fix installing multiple firmware files
Remove quotes around the list of packages to install.
Otherwise pkg is only fed one argument which results in a
non-working solution:
pkg: No packages available to install matching 'wifi-firmware-ath10k-kmod wifi-firmware-mt76-kmod wifi-firmware-ath11k-kmod' have been found in the repositories

MFC after:	10 days
Reviewed by:	manu
Differential Revision: https://reviews.freebsd.org/D41474
2023-08-18 01:22:22 +00:00
Bjoern A. Zeeb
b80ea45237 LinuxKPI: implement mul_u64_u64_div_u64()
Implement mul_u64_u64_div_u64() for an updated iwlwifi driver (though
we do not yet use it there; it is used for in-kernel ptp on wifi).

Sponsored by:	The FreeBSD Foundation
Submitted by:	cperciva
MFC after:	10 days
Reviewed by:	cperciva, dwmalone
Differential Revision: https://reviews.freebsd.org/D40120
2023-08-18 01:20:39 +00:00
Gregory Neil Shapiro
98fd1add67 Remove confDH_PARAMETERS settings in favor of using sendmail's built-in
default which was added in sendmail 8.15.2 (the config line predates
that 8.15.2 feature).  This also alleviates the need for admins
to create the DH parameters file if they opt to use Diffie-Hellman.

PR:		248387
MFC after:	2 weeks
2023-08-18 00:32:56 +00:00
Glen Barber
77013f29d0 release: update main to ALPHA2
Due to an issue being investigated, the branch of stable/14 will
be delayed a week.  This should not impact the rest of the schedule
for this cycle.

Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd
2023-08-17 20:08:32 -04:00
Ed Maste
fa5f94140a msi: handle error from BUS_REMAP_INTR in msi_assign_cpu
Previously errors from BUS_REMAP_INTR were silently ignored, and we
ended up with non-functional interrupts.

Now we allocate and enable new vectors, but postpone assignment of new
APIC IDs and vectors where we can, until after BUS_REMAP_INTR is
successful.  We then disable and free the old vectors.

If BUS_REMAP_INTR fails we restore the old configuration, and disable
and free the new, unused vectors.

Thanks to AMD for providing hardware (with APIC IDs above 255) for
testing.

Reviewed by:	jhb
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41455
2023-08-17 20:03:48 -04:00
John Baldwin
91d0876a20 arm64 makectx: Fix overflow of tf_x array
PCB_LR isn't stored in tf_x, so trying to store it as pcb_x[PCB_LR] =
tf->tf_x[PCB_LR + PCB_X_START] overflowed the tf_x array.

Reported by:	Morello (bounds check crash)
Reviewed by:	jrtc27, andrew, markj
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D41485
2023-08-17 15:26:16 -07:00
Mark Johnston
5635d5b61e vmm: Fix VM_GET_CPUS compatibility
bhyve in a 13.x jail fails to boot guests with more than one vCPU
because they pass too small a buffer to VM_GET_CPUS, causing the ioctl
handler to return ERANGE.  Handle this the same way as cpuset system
calls: make sure that the result can fit in the truncated space, and
relax the check on the cpuset buffer.

As a side effect, fix an insufficient bounds check on "size".  The
signed/unsigned comparison with sizeof(cpuset_t) fails to exclude
negative values, so we can end up allocating impossibly large amounts of
memory.

Reviewed by:	jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41496
2023-08-17 18:10:02 -04:00
Elliott Mitchell
5ad59b9153 intr: merge interrupt table uses of MAXCOMLEN into INTRNAME_LEN
The repeated uses of `MAXCOMLEN + 1` seem a bit hazardous.  If there was
a future need to change the size, the repeats will be troublesome.
Merge everything into `#define INTRNAME_LEN` (matches the name used by
INTRNG).

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D38455
2023-08-17 18:10:02 -04:00
Elliott Mitchell
d8099e33c7 intr: move MAX_STRAY_LOG to interrupt.h
The two interrupt controllers which implement squelching of reports
after a maximum use the same limit.  Move the limit to interrupt.h, the
better to encourage other interrupt controllers to implement the same.

Reviewed by:	markj
MFC after:	2 weks
Differential Revision:	https://reviews.freebsd.org/D35527
2023-08-17 18:10:02 -04:00
John Baldwin
768489c721 RELNOTES: Clarify package building on older branches for 32-bit.
"on" could be read to require native builds only vs cross-builds
via qemu-user and that was not the intention.

Suggested by:	Mark Millard <marklmi@yahoo.com>
2023-08-17 14:25:44 -07:00
Dmitry Chagin
c47116e909 linux(4): Update my copyrights, add SPDX tag 2023-08-17 23:54:36 +03:00
Dmitry Chagin
270e01d468 linux(4): Fix leftovers after 2ff63af9 2023-08-17 23:54:00 +03:00
Dmitry Chagin
6ecab39494 linux(4): Drop bogus __arm__ condition due to lack of 32-bit arm support
MFC after:		1 month
2023-08-17 22:57:17 +03:00
Dmitry Chagin
4a521544a6 linux(4): Don't miss error from underlying in sendfile
MFC after:		1 month
2023-08-17 22:57:17 +03:00
James McLaughlin
bb66c59753 linux(4): Add sendfile fallback for non-socket fds
Before Linux 2.6.33, out_fd must refer to a socket. Since Linux 2.6.33
it can be any file.
The patch was originally provided by James McLaughlin and adapted by me
for copy_file_range.

PR:			262535
Differential revision:	https://reviews.freebsd.org/D34555
MFC after:		1 month
2023-08-17 22:57:17 +03:00
Dmitry Chagin
7307c43963 linux(4): Use native off_t for fo_sendfile call
MFC after:		1 month
2023-08-17 22:57:17 +03:00
Dmitry Chagin
158b57295f linux(4): Regen for sendfile 2023-08-17 22:57:17 +03:00
Dmitry Chagin
5068387f42 linux(4): Use l_off_t type for offset argument in sendfile syscall
The off_t on Linux is a long, so it's non-functional change, just to
avoid confusing future readers.

MFC after:		1 month
2023-08-17 22:57:16 +03:00
Alvin Chen
5ad5cf5079 linux(4): Be verbose about unsupported ioctl commands on ifreq ioctl
Differential revision:	https://reviews.freebsd.org/D39786
MFC after:		1 month
2023-08-17 22:57:16 +03:00
Alvin Chen
1f2b31f76e linux(4): Add 2 Linux socket ioctl commands
Support 2 Linux socket ioctl commands: SIOCGIFMETRIC, SIOCSIFMETRIC.

Differential revision:	https://reviews.freebsd.org/D39786
MFC after:		1 month
2023-08-17 22:57:16 +03:00
Ed Maste
d1eb515f14 bhyve: default UART to 115200
Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D41494
2023-08-17 14:53:23 -04:00
Marius Strobl
51e235148a iflib drivers: Constify PCI ID LUTs
Since d49e83eac3, iflib(9) is ready
for this change.
While at it, make isc_driver_version strings (static) const where
not apparently un-const on purpose, too.
This reduces the size of the amd64 GENERIC by about 10 KiB.
2023-08-17 20:34:23 +02:00
John Baldwin
ece58eaf50 Restore blank line after #include 2023-08-17 11:32:32 -07:00
John Baldwin
638c68897f arm64 db_trace: Ensure trapframe pointer is suitably aligned.
Reviewed by:	jrtc27, markj
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D41486
2023-08-17 11:32:32 -07:00
John Baldwin
18974bd616 bhyve: Store the FreeBSD OUI in little-endian in the controller data
Section 7.10.3 of the NVME 1.4b specification states that the IEEE OUI
in the identify controller structure is stored in little-endian format
(unlike the embedded OUI in EUI64 identifiers).

Reviewed by:	corvink, chuck, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D41487
2023-08-17 11:32:32 -07:00
Ed Maste
3ff0677993 share/examples: clarify BOOT_COMCONSOLE_SPEED
Give an example of why one may want to override BOOT_COMCONSOLE_SPEED so
that it's clear why the default (in a comment) and the commented-out
example setting have different values.

Reported by:	otis
Fixes: 4722ceb7d5 ("Use 115200 bps by default for serial communication")
2023-08-17 13:46:42 -04:00
Ed Maste
4722ceb7d5 Use 115200 bps by default for serial communication
9600 was a standard baud rate decades ago, but 115200 is now more common
so choose defaults that are useful to the largest number of users.

Note that boot0sio does not support rates above 9600 so it remains
unchanged.

Reviewed by:	bz, imp, manu
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36295
2023-08-17 13:31:38 -04:00
Ed Maste
5f72ceb2c5 Cirrus-CI: for *-gcc12, build world with make -s
Cirrus-CI appears to have a 100MB limit for log output.  Use `make -s`
to attempt to reduce the amount of output.

Sponsored by:	The FreeBSD Foundation
2023-08-17 13:23:15 -04:00