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

294778 Commits

Author SHA1 Message Date
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
Matthias Lanter
ecbe99e162 amdtemp: add support for AMD Family 19h Models 40h-4Fh
PR:		281962
MFC after:	2 weeks
2024-10-13 13:21:19 +00:00
Matthias Lanter
a76e28d10f amdsmn: add support for AMD Family 19h Models 40h-4Fh
PR:		281962
MFC after:	2 weeks
2024-10-13 13:20:01 +00:00
Kristof Provost
e85d2c1b0e pf: ensure pd->src/pd->dst are valid
When we reassemble a packet we potentially invalidate the pd->src and pd->dst
pointers as they point into the packet. Reset those after reassembly.

Reported by:	markj, KASAN
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-10-13 13:51:53 +02:00
Kevin Bowling
669d26e576 igc: Want AIM at 2.5G
This should have been commited with bc9402a, need to account for
link_speed of 2500 as well on igc.

MFC after:	6 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Sponsored by:	BBOX.io
2024-10-12 23:13:08 -07:00
James Wright
a0018c65a7 EC2: Disable floppy and parallel port devices
PR:	233861
Reviewed by:	lwhsu, imp
Differential Revision:	https://reviews.freebsd.org/D18482
2024-10-12 22:43:33 -07:00
Bjoern A. Zeeb
fa3dfeff95 dpaa2: fix MRU for dpni (and software vlans along)
0480dccd3f tried to fix the MTU for software VLANs given dpni
announces IFCAP_VLAN_MTU.  Unfortunately the initial MRU during
setup is reduced from the maximum supported by the HW to our
maximum ethernet RX frame length so only after further mtu toggles
the solution there would work.
Set the maximum RX frame size (without CRC) to jumbo length +
vlan encap len by default given we also announce IFCAP_JUMBO_MTU.

While here improve the manual (ioctl) MTU setting by checking if
IFCAP_VLAN_MTU is currently enabled and only then add the extra
bytes.

Fixes:		0480dccd3f
MFC after:	3 days
Reviewed by:	dsl
Differential Revision: https://reviews.freebsd.org/D47066
2024-10-12 22:13:39 +00:00
Warner Losh
1a37caeb07 modules: Add missing opt_*.h files for stand-alone compile
Standalone compile that we at least create these opt_*.h files.

Sponsored by:		Netflix
2024-10-12 14:40:41 -06:00
Arvydas Sidorenko
4584c8f0ef lpt: check readiness with predefined macros
Replace spelled-out bits with pre-defined macros for those same bits.
No functional change.

PR: 170076
Reviewed by: imp
2024-10-12 14:40:24 -06:00
Yan-Hao Wang
00f003da7d
iscsictl(8): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41423
2024-10-13 02:21:48 +08:00
Yan-Hao Wang
f5ee007c39
vmstat(8): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41432
2024-10-13 02:21:47 +08:00
Yan-Hao Wang
183e8aa749
mount(8): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41390
2024-10-13 02:21:47 +08:00
Yan-Hao Wang
b698093da4
nfsstat(1): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41428
2024-10-13 02:21:47 +08:00
Yan-Hao Wang
20bb77c4b9
jls(8): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41413
2024-10-13 02:21:47 +08:00
Yan-Hao Wang
7d5fd25ab8
lastlogin(8): Complete libxo transition
Reviewed by:	dees
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41414
2024-10-13 02:21:47 +08:00
Yan-Hao Wang
e17a2944a6
ps(1): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41422
2024-10-13 02:21:46 +08:00
Yan-Hao Wang
95968ea7ec
netstat(1): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41427
2024-10-13 02:21:46 +08:00
Yan-Hao Wang
3d1b233e03
sesutil(8): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41418
2024-10-13 02:21:46 +08:00
Yan-Hao Wang
54ff53d890
ndp(8): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41417
2024-10-13 02:21:46 +08:00
Yan-Hao Wang
417842f908
arp(8): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41408
2024-10-13 02:21:45 +08:00
Yan-Hao Wang
aaa302d17f
last(1): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41424
2024-10-13 02:21:45 +08:00
Colin Percival
c808132731 acpi_gpiobus: OR GPIO_PIN_(IN|OUT)PUT into flags
Right now flags is set to 0 before this "=" -> "|=" change, but it will
matter when the NOT_YET section above becomes effective.

MFC after:	2 weeks
Sponsored by:	Amazon
2024-10-12 11:14:25 -07:00
Zhenlei Huang
c7a2636889 axgbe: Fix setting promisc mode
Ethernet drivers should respect IFF_PROMISC rather than IFF_PPROMISC.
The latter is for user-requested promisc mode, it implies the former
but not vice versa. Some in-kernel components such as if_bridge(4) and
bpf(4) will set promisc mode for interfaces on-demand.

While here, update the debugging message to be not confusing.

This was spotted while reviewing markj@ 's work D46524.

Test from Franco shows that the interface seems to be unconditionally
initialized to promisc mode regardless of this fix. That needs further
investigation.

Reviewed by:	markj, Franco Fichtner <franco@opnsense.org>
Tested by:	Franco Fichtner <franco@opnsense.org>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D46794
2024-10-12 21:56:56 +08:00
Zhenlei Huang
eacad82f3a if_enc(4): Use new KPI to create enc interface
This driver allows only exactly one instance to be created. Clone
creating additional interfaces, e.g. `ifconfig enc1 create`, will get
error EEXIST which is somewhat confusing.

Convert to new KPI for less confusing error ENOSPC.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45758
2024-10-12 21:37:53 +08:00
Kevin Bowling
516d92304a igc: Improve a comment and update copyright dates
MFC after:	1 week
2024-10-12 00:53:57 -07:00
Kevin Bowling
bc9402abdd igc: Add AIM
igc is derived from igb and has never had an AIM implementation. The
same algorithm from e1000 is appropriate here.

Upon more detailed study of the Linux driver which has a newer AIM
implementation, it finally became clear to me this is actually a
holdoff timer and not an interrupt limit as it is conventionally
(statically) programmed and displayed as an interrupt rate. The data
sheets also make this somewhat clear.

Thus, AIM accomplishes two beneficial things for a wide variety of
workloads[1]:

1. At low throughput/packet rates, it will significantly lower latency
(by counter-intuitively "increasing" the interrupt rate.. better
thought of as decreasing the holdoff timer because you will modulate
down before coming anywhere near these interrupt rates).
2. At bulk data rates, it is tuned to achieve a lower interrupt rate
(by increasing the holdoff timer) than the current static 8000/s. This
decreases processing overhead and yields more headroom for other work
such as packet filters or userland.

For a single NIC this might be worth a few sys% on common CPUs, but may
be meaningful when multiplied such as if_lagg, if_bridge and forwarding
setups.

The AIM algorithm was re-introduced from the older igb or out of tree
driver, and then modernized with permission to use Intel code from other
drivers.

[1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/gbe-controllers-interrupt-moderation-appl-note.pdf

MFC after:	1 week
Relnotes:	yes
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Sponsored by:	BBOX.io
Differential Revision:	https://reviews.freebsd.org/D47053
2024-10-12 00:36:39 -07:00
Warner Losh
37798b1d5d loader/4th: Move from hint.acpi.0.rsdp to acpi.rsdp
Use acpi.rsdp to test for ACPI. 4th wasn't updated with the old compat
was dropped a while ago.

MFC After:	1 week
Sponsored by:	Netflix
2024-10-11 15:40:53 -06:00
Warner Losh
0bd23ca0ee uart: Fix cut-n-paste error in DBG2 code
This code is parsing the DBG2 ACPI table, not the SPCR table, so tweak
the comment.

Sponsored by:		Netflix
2024-10-11 15:27:46 -06:00
Warner Losh
9d81f99b12 mac_bsdextended: Use SYSCTL VARIABLES section
All the other man pages, except iicbus(4), use .Sh SYSCTL VARIABLES for
documentig sysctls. iicbus(4) has a legitmate reason for varying,
though.

Sponsored by:		Netflix
2024-10-11 15:27:46 -06:00
Warner Losh
9bb56359e6 uart: Document rw:XXX field of hw.uart.console
Add a one-liner description of rw - Register Width added in eae36de826.

Fixes: eae36de826
Sponsored by:		Netflix
2024-10-11 15:27:46 -06:00
Warner Losh
852233cf76 uart: Small style tweak
Use if (err == 0) rather than if (!err) to follow stlye(9) and also the
rest of the file.

Sponsored by:		Netflix
2024-10-11 15:27:46 -06:00
Warner Losh
baa7e9cd30 loader: Use Cyan instead of Blue for some menu items
BLUE often translates to DARK BLUE. On BLACK this is hard to
read. Instead, use CYAN which looks good on both black and white
backgrounds.

Discussed with: kevans
Sponsored by: Netflix
2024-10-11 15:27:46 -06:00
Justin Hibbits
f2e62e6013 loader/powerpc: Add some CAS support for newer POWER CPUs
* Add PVR bits for POWER10 and POWER11
* Initialize the `err` outvar, in case it's not touched on success by
  the hypervisor, to prevent spurious errors.
2024-10-11 17:17:43 -04:00