Commit Graph

148389 Commits

Author SHA1 Message Date
Michael Tuexen
4f14d4b6b7 sctp: cleanup handling of graceful shutdown of the peer
Don't handle a graceful shutdown of the peer as an implicit signal
that all partial messages are complete. First, this is not implemented
correctly and second this should not be done by the peer. It is more
appropriate to handle this as a protocol violation.
Remove the incorrect code and leave detecting the protocol violation
and its handling in a followup commit.

MFC after:	1 week
2023-08-19 12:35:49 +02:00
Bjoern A. Zeeb
e039b38d46 LinuxKPI: skbuff: add skb_cow_head()
Add dummy implementation of skb_cow_head().

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
2023-08-19 04:55:56 +00:00
Bjoern A. Zeeb
149c457de1 LinuxKPI: skbuff: fix tracing
Fix arguments to a trace line and remove another trace line until we
actually will have the skb to trace along with a future implementation.

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
2023-08-19 04:53:00 +00:00
Mateusz Guzik
64e881f2db vfs: track how many times vn_alloc blocked on hitting the vnode limit 2023-08-18 23:56:58 +00:00
John Baldwin
5aacf339f6 sys: Remove SND_DECLARE_FILE
Reviewed by:	kbowling, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41499
2023-08-18 13:05:12 -07:00
John Baldwin
cbe53bd975 pcm: Turn SND_DECLARE_FILE into a no-op.
SND_DECLARE_FILE originally added lines to the output of /dev/sndstat
listing the $FreeBSD$ strings for individual files, but only if the
value of hw.snd.verbose was raised to 3.  With the switch to Git these
strings became meaningless as they were now all identical and no longer
contained the path (which was implicitly included previously via the
keyword expansion).

This commit removes all of the infrastructure to support file version
strings from /dev/sndstat, but preserves the KPI/KBI by turning the
SND_DECLARE_FILE macro into a nop and changing the backing sysinit
functions into null functions and is suitable for merging to
stable/13.

A future commit will remove SND_DECLARE_FILE entirely.

Reviewed by:	kbowling, emaste
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D41498
2023-08-18 13:04:33 -07:00
Bartosz Sobczak
01fbb86991
irdma(4): upgrade to 1.2.17-k
Update Intel irdma driver to version 1.2.17-k

Notable changes:
- pf-reset handling improvements, including fixes in communication with if_ice(4)
- avoid racing when handling various events
- adding sw stats sysctls
- hand over pe_criterr handling from ice(4) to irdma(4)
- debug prints adjustments
- fix crash after changes in irdma_add_mqh_ifa_cb

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	erj@
MFC after:	1 month
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D41425
2023-08-18 11:28:58 -07:00
Konstantin Belousov
04f683b25a subr_unit.c: another attempt to fix the build
Reported by:	cy
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-08-18 19:28:42 +03:00
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
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
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
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
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
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
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
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
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
Dag-Erling Smørgrav
e738085b94 Remove my middle name. 2023-08-17 15:08:30 +02:00
Mateusz Pacuszka
89e7335942 ixl: fix multicast filters handling
Summary:
Hardware supports up to 128 entries of multicast filters. If there is more,
filters should be removed and multicast promiscuous enabled. In case
user deletes the multicast address and overall count is less than 128,
multicast promiscuous mode should be disabled and all the filters
reapplied into the HW.

Currently driver only enables multicast promiscuous mode and deletes
the entries without any information to the user and it's not capable of
reapplying the filters once count is less than 128.

Address that by:

1. Add logging
2. Add logic in case multicast promiscuous is enabled and user lowers
the number of multicast entries to <128.
3. Fix a bug where driver removes different MAC entries along with the one
that's being deleted by the user.

Reviewers: #intel_networking, erj

Reviewed By: #intel_networking, erj

Subscribers: imp, ae

Differential Revision: https://reviews.freebsd.org/D40860
2023-08-17 13:46:48 +02:00