Commit graph

294294 commits

Author SHA1 Message Date
Colin Percival 925f15731e loader: Make pkcs5v2 unconditionally available
This was previously only available if GELI support was included, but I
want to use it for processing entropy from EFI

Reviewed by:	imp
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46634
2024-09-22 00:35:47 -07:00
Colin Percival 8ce291a335 pkcs5v2: Add pkcs5v2_genkey_raw function
This is like pkcs5v2_genkey but takes a "passphrase" as a buffer and
length rather than a NUL-terminated string.

Reviwed by:	pjd
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46633
2024-09-22 00:35:47 -07:00
Colin Percival f4a69a933c loader: Make EFI entropy size configurable
Add a new loader variable entropy_efi_seed_size which defaults to 2048;
if not defined (e.g. if the /boot/lua/ is updated but /boot/defaults/
isn't) the same 2048 default will be used.

Reviewed by:	Val Packett
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46632
2024-09-22 00:35:47 -07:00
Colin Percival b58fe4eb29 loader: Instrument EFI GetRNG with TSLOG
On some systems, the EFI GetRNG is slow.  Make it show up in flamecharts.

MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46631
2024-09-22 00:35:47 -07:00
Colin Percival 58ec2d0d4a loader: Add TSLOG to interpreter built-ins
Wrap each call to a built-in command with TSENTER/TSEXIT to make
it easier to see where time is going in the loader.

MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46630
2024-09-22 00:35:47 -07:00
Colin Percival 32fce09268 random: Avoid magic numbers
Move RANDOM_FORTUNA_{NPOOLS,DEFPOOLSIZE} from fortuna.c to fortuna.h
and use RANDOM_FORTUNA_DEFPOOLSIZE in random_harvestq.c rather than
having a magic (albeit explained in a comment) number.  The NPOOLS
value will be used in a later commit.

Reviewed by:	cem
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46693
2024-09-22 00:35:47 -07:00
Kevin Bowling 5f6964d9fb e1000: drop NEEDGIANT from em_sysctl_debug_info use
The write is only used to toggle the debug print function and this is
otherwise stateless.

MFC after:	1 week
2024-09-21 21:17:30 -07:00
Kevin Bowling c11a0649b9 e1000: drop NEEDGIANT on em_sysctl_reg_handler uses
These are simple singular diagnostic register reads

MFC after:	1 week
2024-09-21 21:04:38 -07:00
Kevin Bowling e3a6e916db ixgbe: fix misleading indentation in ixgbe_phy
MFC after:	1 week
2024-09-21 20:57:48 -07:00
Kevin Bowling f6e1b56792 e1000: remove NEEDGIANT from a couple sysctls
These are internally locked already

MFC after:	1 week
2024-09-21 20:52:48 -07:00
Zhenlei Huang 0ca553d761 iflib: Ignore fa7045f99c in blame 2024-09-22 10:09:29 +08:00
Zhenlei Huang fa7045f99c iflib: Many style fixes
MFC after:	3 days
2024-09-22 10:07:39 +08:00
Zhenlei Huang b90ba458dc iflib: Prefer C99's __func__ over GCC's __FUNCTION__
MFC after:	3 days
2024-09-22 10:07:38 +08:00
Zhenlei Huang 55ea43ce4b git-blame-ignore-revs: Ignore f3754afd59 in blame 2024-09-22 09:18:56 +08:00
Kristof Provost f8d14a44de if_usie: fix typo
Fix a 'case AF_INET;' typo, and ensure we include 'opt_inet6.h' so #ifdef INET6
actually works.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-09-22 00:56:37 +02:00
Kristof Provost 93e96359c9 libpfctl: ensure we return useful error codes
Return errno rather than -1 on error. This allows pfctl to report much
more useful errors.

Reported by:	Alexander Leidinger <Alexander@Leidinger.net>
MFC after:	1 week
2024-09-22 00:55:46 +02:00
Konstantin Belousov 66fcbd9556 VOP_ATTRIB.9: switch to Fa/Fc
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2024-09-22 00:18:55 +03:00
Siva Mahadevan 32b0830aa0 conf: make ZFS depend on XDR sources
ZFS nvpair.c source file depends on XDR unconditionally. This
fixes the ZFS build with NFSD kernel options disabled.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1429
2024-09-21 15:15:33 -06:00
Pierre Pronchery f505f9a842 bhyve: simplify slot validation in xHCI emulation
This is a follow-up to commit e72d86ad9c ("bhyve: improve input
validation in pci_xhci") -- introducing a helper for slot validation.

Co-authored-by:	John Baldwin <jhb@FreeBSD.org>
Reviewed by:	markj, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46696
2024-09-21 13:36:10 -04:00
Warner Losh e47939b3b1 hn: fix build on !x86
hv_netvm aren't installed on !x64. Do the canonical thing with the
links.

Fixes: 83e93d53f6
Sponsored by: Netflix
2024-09-21 08:53:47 -06:00
Mark Johnston 7cfdb02a73 bhyve: Fix an inverted check when enabling PCI busmastering
Reported by:	Andy Fiddaman <andy@omniosce.org>
Fixes:	e962b37bf0 ("bhyve: Do not enable PCI BAR decoding if a boot ROM is present")
2024-09-21 13:42:15 +00:00
Evgenii Khramtsov 1a58fd5bf6 Makefile.inc1: make pkg-create(8) compression level overridable
pkg(8) after 8991ebd7afb0 ("Fix #1566: Add pkg-create(8) -l,--level
to set compression level") accepts compression level when creating
packages with a compression format (e.g. txz, tzst).

When compression is used (PKG_FORMAT is not "tar"), use compression
level from PKG_LEVEL for pkg-create(8) to make use of 8991ebd7afb0.

PKG_LEVEL default is set to pkg default to keep current behavior,
see pkg(8) 31000cb40b30 ("tzst: by default compression at the 19 level).

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1420
2024-09-21 07:40:11 -06:00
Ed Maste 03ff6260b4 src.conf.5: regen after LOADER_IA32 knob addition
Fixes: fe3f792f9a ("Add build option for the ia32 loader")
Sponsored by:	The FreeBSD Foundation
2024-09-21 09:12:36 -04:00
Joshua Rogers f3754afd59 Remove stray whitespaces from sys/amd64/
Signed-off-by: Joshua Rogers <Joshua@Joshua.Hu>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1418
2024-09-21 07:05:46 -06:00
David E. Cross 1b1e392aed ggate: Add support for O_DIRECT access
Adds support for controlling O_DIRECT access to ggated, ggatec, and
ggatel.

Reviewed by:	markj
Relnotes:	yes
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D45056
2024-09-21 13:05:22 +00:00
Ingo Schwarze e36af20691 jail.conf.5: cleanup introduction
Suggested by ingo on mandoc-tech@

MFC after:	3 days

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1422
2024-09-21 07:03:21 -06:00
Alexander Ziaee b15aff0505 mitigations.7: explain installing firmware + spdx
MFC after:	3 days
Reported by:	imp (ucode is for security)
Reported by:	emaste (ucode is not minix)
Reported by:	delphij (please ucode asap)
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1411
2024-09-21 06:56:03 -06:00
Warner Losh dca2b27e42 jail.conf.5: Minor igor issues
Sponsored by:		Netflix
2024-09-21 06:43:34 -06:00
Alexander Ziaee 944c74b7d9 jail.conf.5: minor cleanup (spdx, macros, xrefs)
+ expand see also section with other relevant pages and the handbook
+ tag paths with the path macro so they can be searched with apropos
+ tag spdx, one sentance per line

MFC after:	3 days

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1371
2024-09-21 06:41:50 -06:00
Alexander Ziaee 2a680c5c37 sysctl.8: mark sysctls as vars per style.mdoc(7)
+ while here, fix alignment and tag SPDX

MFC after:	3 days

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1421
2024-09-21 05:25:16 -06:00
Alexander Ziaee 83e93d53f6 hv_netvsc.4: mlink to hn(4)/if_hn(4) + tag spdx
dmesg for this device says:
> hn0: <Hyper-V Network Interface> on vmbus0

Add links so that `man hn` and `man if_hn` work.

MFC after:	3 days
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1377
2024-09-21 05:25:16 -06:00
Ahmad Khalifa 6fdb07d5b7 loader: provide error message in command_errmsg instead of printing
Also provide an error message when argc is too long instead of printing
"no error message".

Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1381
2024-09-21 05:25:16 -06:00
Ahmad Khalifa a698c15a41 loader: remove unneeded variable
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1381
2024-09-21 05:25:16 -06:00
Ahmad Khalifa c105113752 loader: actually change the staging slop
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1381
2024-09-21 05:25:15 -06:00
Faraz Vahedi f144058b40 Refactor error handling in lseek operations
1. Subtraction was performed on the current position
   regardless of the success of the lseek operation.
   In the event of an error, this resulted in the
   current position being erroneously set to -2,
   which bypassed the intended error handling
   mechanism. The proposed change performs error
   checking immediately following the lseek operation,
   prior to any modification of the current position.
   This ensures that a failed lseek operation will
   correctly trigger the appropriate error handling.

2. The error checking logic was based on the assumption
   that lseek would return `offset - 1` upon failure.
   However, this is not consistent with the behaviour of
   lseek as specified in the POSIX standard, which
   stipulates that lseek shall return -1 in case of
   an error. The code has been updated to reflect this
   standard, improving reliability and compliance.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1392
2024-09-21 05:25:15 -06:00
Faraz Vahedi c3c06f94f0 Remove unused includes, migrate to stdint.h for uintXX_t types.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1392
2024-09-21 05:25:15 -06:00
John F. Carr a55640536a Install xo_emit_f.3
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1406
2024-09-21 05:25:15 -06:00
Graham Percival 2878d99dfc manuals: Misc macro typos
These were reported by `mandoc -T lint` as
    ERROR: skipping unknown macro
When these pages were rendered with `man`, the "unknown macro" meant
that the entire line was omitted from the output.

Obvious typos in:
lib/libsys/swapon.2
lib/libsys/procctl.2
share/man/man9/firmware.9

lib/libcasper/services/cap_net/cap_net.3: 'mode' describes a function
    argument.

lib/libsys/statfs.2: there's no .Tm command ("trademark?"), and
    .Tn ("tradename") is deprecated, so remove the macro entirely.

usr.sbin/mfiutil/mfiutil.8: man was interpreting '/dev/' as a macro
    (which it didn't recognize).

share/man/man4/qat.4: same issue as above, but with '0'.  In this case,
    given the context of the previous line, rewriting as "Value '0'"
    seemed more appropriate.

usr.sbin/mlx5tool/mlx5tool.8: typo in .Xr

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Sponsored by:	Tarsnap Backup Inc.
Reviewed by:	concussious, imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1417
2024-09-21 05:25:15 -06:00
Graham Perrin 45001ab45e loader.efi.8: BOOOTX64.EFI: fix typo
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1412
2024-09-21 05:25:15 -06:00
Franco Fichtner 1693e3be3b u3g: reorder Quectel devices by product ID
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1410
2024-09-21 05:25:15 -06:00
Kevin Bowling a924b5ee6a ixgbe: fix fw_recovery_mode callout
Need to pass the softc in with the callout arg

MFC after:	1 week
2024-09-21 04:11:17 -07:00
Kevin Bowling b6cd053e6d ixgbe: update if_sriov with ix-3.3.38 changes
There are some critical fixes here. The PF must communicate with each VF
slot (vf->pool), only VFs shall use 0 for everything.

IXGBE_FEATURE_SRIOV needs to be set before calling ixgbe_if_init().

With these changes, ixv(4) now attaches to VFs, but after bringing up
VFs, the PF and VF still are not correctly passing traffic.

MFC after:	1 week
2024-09-21 02:59:33 -07:00
Kevin Bowling f72de14ea1 ixgbe: update if_ix and ixgbe api with ix-3.3.38 changes
MFC after:	1 week
2024-09-21 02:52:21 -07:00
Kevin Bowling 0acea458f8 ixgbe: update ixgbe_mbx with ix-3.3.38 changes
MFC after:	1 week
2024-09-21 02:47:11 -07:00
Kevin Bowling e06918b94a ixgbe: update ixgbe_phy with ix-3.3.38 changes
MFC after:	1 week
2024-09-21 02:45:12 -07:00
Kevin Bowling c41a0eeea0 ixgbe: update if_bypass to ix-3.3.38
Bring if_bypass up to date with changes in the out of tree driver

Drop NEEDGIANT as the sysctl handlers have internal mutex for state
changes.

MFC after:	1 week
2024-09-21 02:42:23 -07:00
Kevin Bowling ddfec1fb68 e1000: Update igb driver version to 2.5.28-fbsd
Bump to the current out of tree driver version since we only have some
gratuitous changes.

MFC after:	1 week
2024-09-20 23:27:54 -07:00
Kevin Bowling 36c516b311 ixgbe: update if_sriov to use the new mailbox apis
This fixes a page fault when creating VFs and updates to the new mailbox
API and naming conventions.

The functionality works to the same level that it did before my recent
changes. In particular on my 82599 it creates both passthru and ixv
interfaces. In either case, the PF seems to lose the ability to pass
traffic. The ixv driver fails to attach. These issues are present with
or without my updates.

If you use SR-IOV on ixgbe I would be interested in hearing what does
or does not work for you.

MFC after:	6 days
2024-09-20 20:26:42 -07:00
WHR c6ad7dcd9c mfiutil: Fix incorrect accesses of an union member in 'struct mfi_evt_detail'
PR: 281156
Reviewed by: imp, delphij
Pull Request: https://github.com/freebsd/freebsd-src/pull/1402
2024-09-20 16:22:44 -06:00
WHR 66efdefe78 mfi: Correct a struct member name
This 'struct mfi_evt_pd' typed member should be named 'pd' instead of 'ld'.

PR: 281155
Reviewed by: imp, delphij
Pull Request: https://github.com/freebsd/freebsd-src/pull/1402
2024-09-20 16:22:43 -06:00