1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00
Commit Graph

294960 Commits

Author SHA1 Message Date
Kevin Bowling
9dc452b983 e1000: txrx function prototype cleanup
Drop variable names of function prototypes since the file is mixed in
listing them or not and they fall out of sync.

MFC after:	1 week
Sponsored by:	BBOX.io
2024-10-14 09:10:59 -07:00
Baptiste Daroussin
1aeedde11d Unicode: revert to unicode 15.0.0
Unicode the generation of UTF-8 ctype is somehow broken for now
for unicode 16, so for now revert to unicode 15
2024-10-14 17:59:39 +02:00
Baptiste Daroussin
c5dee76368 unicode: revert to 15, more work is needed for 16 2024-10-14 17:59:39 +02:00
Kristof Provost
6b8096fa5f netpfil tests: skip checksum verification in pft_ping.py
From scapy 2.6.0 it now removes (sets to None) the IP checksum in its defrag
code. We typically ask for IPv4 or IPv6 defragmentation, which causes check
function failures.

Just skip the checksum verificiation here, because we're going to notice
incorrect checksums even if the tests don't directly verify it.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-10-14 17:54:49 +02:00
Kevin Bowling
1b0e41ddff igc: Function prototype cleanup
Drop variable names of function prototypes since the file is mixed in
listing them or not and they fall out of sync.

MFC after:	1 week
Sponsored by:	BBOX.io
2024-10-14 06:52:31 -07:00
Kevin Bowling
542f5d5631 igc: Rename 'struct adapter' to 'struct igc_softc'
Rename the 'struct adapter' to 'struct igc_softc' to avoid type
ambiguity in things like kgdb and make sharing code with e1000 and
ixgbe easier.

MFC after:	1 week
Sponsored by:	BBOX.io
2024-10-14 06:52:31 -07:00
Mark Johnston
1bae9dc584 netmap: Make memory pools NUMA-aware
Each netmap adapter associated with a physical adapter is attached to a
netmap memory pool.  contigmalloc() is used to allocate physically
contiguous memory for the pool, but ideally we would ensure that all
such memory is allocated from the NUMA domain local to the adapter.

Augment netmap's memory pools with a NUMA domain ID, similar to how
IOMMU groups are handled in the Linux port.  That is, when attaching to
a physical adapter, ensure that the associated memory pools are local to
the adapter's associated memory domain, creating new pools as needed.

Some types of ifnets do not have any defined NUMA affinity; in this case
the domain ID in question is the sentinel value -1.

Add a sysctl, dev.netmap.port_numa_affinity, which can be used to enable
the new behaviour.  Keep it disabled by now to avoid surprises in case
netmap applications are relying on zero-copy optimizations to forward
packets between ports belonging to different NUMA domains.

Reviewed by:	vmaffione
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D46666
2024-10-14 13:33:33 +00:00
Mark Johnston
4e15366c6a makefs: Record a larger TXG number in the uberblock
By default, OpenZFS will perform metadata verification of the most
recent TXGs, but this can be very slow since all data in a pool
generated by makefs was logically written in a single transaction.

Avoid triggering this verification by default, but add an option to
restore the previous behaviour and enable it in regression test cases.

Reported by:	cperciva
Tested by:	cperciva (previous version)
MFC after:	2 weeks
2024-10-14 13:14:37 +00:00
Kevin Bowling
09526a771a igc: Add sysctls for some missing MAC stats
MFC after:	1 week
Sponsored by:	BBOX.io
2024-10-14 06:07:41 -07:00
Kevin Bowling
68b1f5dc59 igc: Add sysctl for DMA Coalesce
This feature can increase efficiency at the expense of latency

It does not work well with the default interrupt delay, but expose
the otherwise unconnected code in the driver in case people want to
experiment.

See
https://www.intel.com/content/dam/support/us/en/documents/network/adapter/pro100/sb/466827_intel_r__dma_coalescing_white_paper_v003.pdf

MFC after:	1 week
Sponsored by:	BBOX.io
2024-10-14 05:56:39 -07:00
Mateusz Piotrowski
6fa42b91ca rc/tests: Skip oomprotect tests in a jail
oomprotect cannot be used in a jail.

Reviewed by:	bnovkov, christos, markj
Approved by:	bnovkov (mentor), christos (mentor), markj (mentor)
MFC after:	1 week
2024-10-14 12:30:23 +02:00
Mateusz Piotrowski
e018265679 vnode.9: Document vnode_if.awk and vnode_if.src
Discussed with:	bjk, imp
Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D27196
2024-10-14 12:25:58 +02:00
Mateusz Piotrowski
4851376de1 rc.conf.5: Fix grammar
Reported by:	markj
Fixes:		d80d7a8e46 rc.conf.5: Clarify wording
MFC with:	d80d7a8e46
2024-10-14 12:18:55 +02:00
Baptiste Daroussin
7fd3fed642 locales: add missing af_ZA.UTF8
Fix the forgotten git add

Fixes:	ddfc6f84f2
Reported by:	manu
2024-10-14 11:56:30 +02:00
Emmanuel Vadot
7df3e400ea loader: default: Add a default splash screen
Setting boot_mute="YES" currently use the in-kernel black and white logo.
Instead default to the color png one.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
2024-10-14 11:27:41 +02:00
Emmanuel Vadot
2cb20681e1 splash(4): Note that only rgba png are supported
While here document that I'm the author for png splash support.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
2024-10-14 11:02:01 +02:00
Emmanuel Vadot
c875e976f6 vt_splash: Remove debug print
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2024-10-14 11:01:59 +02:00
Baptiste Daroussin
0706fa3787 RELNOTES: document update of unicode and cldr 2024-10-14 10:57:04 +02:00
Baptiste Daroussin
e46c4de73e RELNOTES: document the disabling of RSA generation for basic cloudinit 2024-10-14 10:56:08 +02:00
Baptiste Daroussin
ddfc6f84f2 locales: update unicode version 16 and CLDR to version 45 2024-10-14 10:43:39 +02:00
Baptiste Daroussin
18626e1f86 Unicode: prepare update to unicode 16 and CLDR 45 2024-10-14 10:43:38 +02:00
Baptiste Daroussin
bd490be574 w(1): fix libxo output being locale dependant
by being locale dependant the json export is invalid in locales where
the separator for float is a comma.
The Json and the XML are invalid for login-time when days contains
contains characters which are not unicode.

Forcing locale to be C, makes this json and xml output valid and also
identical accross locales, so reliable for parsers

PR:		276304
Reported by:	Vedran Miletic <vedran@miletic.net>
2024-10-14 10:43:38 +02:00
Hartmut Brandt
bc7afab6a1 Fix compilation of bsnmp tests.
PR:		277539
Submitted by:	John F. Carr
2024-10-14 10:23:18 +02:00
Konstantin Belousov
4bf34c597c md(4): always trim the last partial sector
Do it also for the preloaded disk, in addition to the dynamically
configured device.  This is needed to avoid geom checking alignment and
panicing on read of the last sector, e.g. for partition schemes and
label tasting.

PR:	281978
Reported by:	bz
Reviewed by:	bz, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D47102
2024-10-14 11:08:21 +03:00
Warner Losh
793c668ec5 UPDATING: Note higher-risk than I'd like ciss changes 2024-10-13 23:37:46 -06:00
Peter Eriksson
b339ab1491 ciss: Don't panic on null CR ciss_dequeue_notify
Apparently, sometimes on hot plug/unplug, a null cr comes back from
ciss_dequeue_notify. This is clearly a bug, and by ignoring it we're
papering over that bug. We only ever wake the thread after enqueing a
notification or setting a bit about killing the thread, so once we check
the bit isn't the cause, cr can't be NULL unless something else has
dequeued it.

Ideally, this would be fixed, rather than papered over, but this makes a
very old card somewhat more useable for external enclosures. I suspect
it's a race when we set CISS_THREAD_SHUT and another flag (the latter
w/o ciss_mtx held), but I don't see it and w/o hardware to reproduce
it would be hard to know for sure.

PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
2024-10-13 23:37:46 -06:00
Peter Eriksson
fd95966af5 ciss: hw.ciss.initator_id to set the initiator ID
Add hw.ciss.inititor_id to set the initiator to something other than the
default.

PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
2024-10-13 23:37:46 -06:00
Peter Eriksson
45645518ea ciss: Add max physical target
Add support for tracking the maximum physical target and using that to
override the maximum logical target.

PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
2024-10-13 23:24:15 -06:00
Peter Eriksson
7c74337e2c ciss: Expose tunable hw.ciss.force_interrupt as sysctl
Expose the hw.ciss.force_interrupt tuneable as a sysctl and make it
writeable at runtime.

PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
2024-10-13 23:24:06 -06:00
Peter Eriksson
77af8c6db2 ciss: Expose tunable hw.ciss.force_transport as sysctl
Expose the hw.ciss.force_transport tuneable as a sysctl and make it
writeable at runtime.

PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
2024-10-13 23:23:54 -06:00
Peter Eriksson
cec58bba64 ciss: Expose tunable hw.ciss.nop_message_heartbeat as sysctl
Expose the hw.ciss.nop_message_heartbeat tuneable as a sysctl and make
it writeable at runtime.

PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
2024-10-13 23:23:45 -06:00
Peter Eriksson
a35564358a ciss: Expose tunable hw.ciss.expose_hidden_physical as sysctl
Expose the hw.ciss.expose_hidden_physical tuneable as a sysctl
and make it writeable at runtime.

PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
2024-10-13 23:23:36 -06:00
Peter Eriksson
d8b024673b ciss: Report more errors at higher ciss_verbose levels
Report more information on errors, including the the opcode.

PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
2024-10-13 23:23:25 -06:00
Peter Eriksson
f373e6b866 ciss: Add sysctl/tunable hw.ciss.verbose
Add tuneable to turn on/off verbosity for debugging purposes. This is
approximately the same as bootverbose, but will print even more
information when > 1.

PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
2024-10-13 23:23:17 -06:00
Peter Eriksson
74575d1428 ciss: Add sysctl/tunable hw.ciss and hw.ciss.base_transfer_speed
Add a sysctl/tuneable to report a different base transfer speed than the
default of 132*1024.

PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
2024-10-13 23:23:08 -06:00
Peter Eriksson
cafc839393 ciss: Ignore data over/under run on RECEIVE_DIAGNOSTIC
This appears to be harmless, so ignore data over/under run on
diagnostics.

PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
2024-10-13 23:22:19 -06:00
Peter Eriksson
f03e1a42e9 ciss: Minor formatting nit.
PR: 246279
Reviewed by: imp
Tested by: Marek Zarychta
Differential Revision: https://reviews.freebsd.org/D25155
2024-10-13 23:22:01 -06:00
Warner Losh
63e282288e UPDATING: Add belated note about hints for old-school ISA devices
Back in July, jhb started a cleanup of our hints. We've removed several
that have been a problem for a long time (including some that had
workarounds for VM images). We've also moved uarts to ACPI only, so they
act more like wiring than enumeration hints. Add a note about this and
ways you can find if your system is affected. Old APU1 routers with
coreboot are affected, but newer APU2 devices are not. Others likely are
as well. The affected systems will be primarily very ancient systems
that pre-date ACPI (i586 arch pentium and older typically), as well as
some older coreboot and similar non-conventional boot firmware setups
(primarily in the embedded space).  FreeBSD 15 will require ACPI or
PNPBIOS enumeration for everything by default, so any non-enumerated
devices via these means will require hints. Add notes on how to grep
for affected systems before upgrading.

Sponsored by:		Netflix
2024-10-13 16:51:21 -06:00
Konstantin Belousov
c9e22c749c iommu: extract driver-independent ddb context and mapping reporting
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-10-14 01:30:26 +03:00
Konstantin Belousov
e9d948cfe0 iommu: move context link and ref count into device-independent parts
This also allows to move some bits of ddb print routines into
iommu_utils.c common for x86 iommu drivers.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-10-14 01:30:26 +03:00
Konstantin Belousov
7896b03fff iommu_get_requester(): do not panic if asked about non-pci device
For now, return zero rid and the device itself.  Add a comment noting
that eventually ACPI HID can be used to calculate rid for some more
devices.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-10-14 01:30:26 +03:00
Konstantin Belousov
26ff9d2050 iommu.h: improve header self-sufficiency
The header embeds struct task into defined structures.  Also it needs
the PCI_BUSMAX constant.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-10-14 01:30:25 +03:00
Claudiu
ec22e705c2 tmpfs: remove duplicate flags check in tmpfs_rmdir
MFC after:	2 weeks
Reviewed By:	asomers
Differential Revision: https://reviews.freebsd.org/D47100
2024-10-13 15:43:52 -06:00
prateek sethi
c0e0e530ce mps/mpr: Add workaround for firmware not responding to IOC_FACTS or IOC_INIT
Sometimes, especially with older firmware, mps(4) would have trouble
initializing the card in one of these two steps. Add in a retry after a
short delay. Sean Bruno and Stephen McConnell thought this was OK in the
bug discussions, but never committed it.  Steve indicated the delay
might not be necessary, but the OP clearly needed to make it longer to
make things work. I've kept the delay, and added the suggested comment.

Ported the iocfacts part to mpr as well, since we see similar errors
about once every month or two over a few thousand controllers at
work. We've not seen it with IOC_INIT as far back as I can query the
error log database, so I didn't port that forward. We'll see if this
helps, but won't know for sure until next year (so I'm committing it now
since it won't hurt and might help). We usually see this failure in
connection with complicated recovery operations with a drive that's
failing, though, at least in the last year's worth of failures. It's
not clear this is the same as OP or not.

PR: 212841
Sponsored by: Netflix
Co-authored-by: imp
2024-10-13 15:38:01 -06:00
Konstantin Belousov
f50a0944d0 vnode.h: add comment line about VIRF_ flags
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2024-10-14 00:34:30 +03:00
Jamie Gritton
b3c2cc7ea9 tests: move sysctl_security_jail_children.sh to the right directory 2024-10-13 13:50:22 -07:00
Ed Maste
86e66321bb fdisk: emit deprecation notice when run
Requested by:	rgrimes
Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D43585
2024-10-13 13:52:14 -04:00
Ed Maste
255d2d9bbc fdisk: add deprecation/removal notice to man page
As of 2015 (commit b8c19fd719) the fdisk man page claimed the command
is obsolete, but had no explicit mention of removal.  Add another note
that follows our current deprecation notice format.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47067
2024-10-13 13:45:28 -04:00
Mark Johnston
610fcb06ff vmstat: Fix column header alignment in -o output
MFC after:	1 week
2024-10-13 14:32:33 +00:00
Chuck Tuffli
5374b9e146 bhyve/nvme: Fix Infinite loop in queue processing
In the functions pci_nvme_handle_admin_cmd and pci_nvme_handle_io_cmd
infinite loops are possible in the bhyve process if the sq->tail value
is greater than sq->size.

An attacker could overload the host CPU.

Fix is to validate that doorbell values:
 - Are for a valid (i.e., created) queue
 - Are not the same as the previous value
 - Fit within the available capacity

The emulation will generate an Asynchronous Event Notification (Invalid
Doorbell or Invalid Doorbell Value) if enabled and ignore the doorbell
update.

While in the neighborhood, remove a redundant bounds check.

Reported by:	Synacktiv
MFC after:	1 week
Security:	HYP-14
Sponsored by:	Alpha-Omega Project
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D46064
2024-10-13 06:58:50 -07:00