Commit Graph

281957 Commits

Author SHA1 Message Date
Brooks Davis
105a4f7b3c ng_atmllc: remove
This standalone module is the last vestage of ATM support in the tree so
send it on its way.

Reviewed by:	manu, emaste
Relnotes:	yes
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38880
2023-03-09 18:04:21 +00:00
Brooks Davis
af0cc0b223 NgATM: Remove netgraph ATM support
Most ATM support was removed prior to FreeBSD 12.  The netgraph support
was kept as it was less intrusive, but it is presumed to be unused.

Reviewed by:	manu
Relnotes:	yes
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38879
2023-03-09 18:04:02 +00:00
Baptiste Daroussin
b2654064c2 pkg(7): use libmd for sha256 instead of openssl
OpenSSL 3.0 has deprecated the sha256 api, let's use libmd which has the
same API instead.

In order to avoid the collision in definitions (sha256.h cannot be
included in the same file as a file where openssl headers has been
included) let's move the sha256 related code in its own file

PR:		270023
Reported by:	ngie
2023-03-09 17:43:01 +01:00
Mark Johnston
e08302f649 vm_fault: Update a comment to reflect the removal of the default pager
Fixes:	5d32157d4e ("vm_object: Modify vm_object_allocate_anon() to return OBJT_SWAP objects")
Reviewed by:	alc, kib
Differential Revision:	https://reviews.freebsd.org/D38985
2023-03-09 11:15:49 -05:00
Roger Pau Monné
6f80738b22 xen: fetch dom0 video console information from Xen
It's possible for Xen to switch the video mode set by the boot loader,
so that the information passed in the kernel metadata is no longer
valid.  Fetch the video mode used by Xen using an hypercall and update
the medatada for the kernel to use the correct video mode.

Sponsored by: Citrix Systems R&D
2023-03-09 17:13:17 +01:00
Roger Pau Monné
5489d7e93a xen: bump used interface version
This is required for a further change that will make use of a field
that was added in version 0x00040d00.

No functional change expected.

Sponsored by: Citrix Systems R&D
2023-03-09 17:13:17 +01:00
Alexander V. Chernikov
da4047d3ba fix buildworld after 595d23f777.
Reported by:	se
2023-03-09 15:45:57 +00:00
Alexander Motin
20dc2c4d11 nvmecontrol: Fix default ns create parameters.
Instead of passing 0xff's for all unset parameters, prefer reasonable
defaults.  It is much easier to use it this was without specs in hand.

MFC after:	1 week
2023-03-09 10:19:00 -05:00
Alexander V. Chernikov
595d23f777 netlink: add snl(3) default parsers for routes and links.
This change adds the "default" parsers of _all_ route/link attributes
 exported by the kernel.
It removes the need to declare similar parsers in the userland applications,
 simplifying their logic.

Differential Revision: https://reviews.freebsd.org/D38979
MFC after:	2 weeks
2023-03-09 14:46:27 +00:00
Alexander V. Chernikov
90d6251228 netlink: add rtsock-compatible header to use with netlink snl(3).
Some routing socket defines (`RTM_` and `RTA_` ones) clash with the ones
 used by the the Netlink.
As some rtsock definitions like interface flags or route flags are used in
 both netlink and rtsock, provide a convenient way to include those without
 running into the define collision.

Differential Revision: https://reviews.freebsd.org/D38982
MFC after:	2 weeks
2023-03-09 14:37:42 +00:00
Alexander V. Chernikov
76f6d39150 netlink: add basic message writing support to snl(3).
Differential Revision:	https://reviews.freebsd.org/D38947
MFC after:	2 weeks
2023-03-09 14:33:26 +00:00
Tijl Coosemans
ecad3f5c4d rc.d: Generate machine-id from hostid_save
rc.d/hostid_save saves a UUID generated by rc.d/hostid in /etc/hostid.
Store the same UUID, without hyphens, in /etc/machine-id.  The hypĥens
are removed with a shell function because hostid_save runs before file
systems are mounted so other tools may not be available yet.

This eliminates some duplication between hostid and machine-id and for
virtual machines machine-id now contains the UUID configured in the
hypervisor like it does on Linux.

Reviewed by:	delphij
Discussed with:	bapt
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D38811
2023-03-09 10:31:55 +01:00
Tijl Coosemans
862aab6281 hostid: Generate random UUID by default
This way MAC addresses are no longer exposed.

Discussed with:	bapt
MFC after:	3 days
2023-03-09 10:31:39 +01:00
Kyle Evans
b617584942 grep: remove tautological condition
st_size is an off_t, it cannot hold values larger than OFF_MAX.

CID:		1008931
2023-03-08 23:53:10 -06:00
Kyle Evans
c816aea7ab Revert "grep: remove tautological condition"
This reverts commit f6d6c66889.

Gremlins snuck into my tree and injected some WIP.
2023-03-08 23:52:23 -06:00
Kyle Evans
f6d6c66889 grep: remove tautological condition
st_size is an off_t, it cannot hold values larger than OFF_MAX.

CID:		1008931
2023-03-08 23:34:22 -06:00
Ed Maste
bd258f88e5 src.conf.5: Use common phrasing in WITHOUT_OFED text
Reported by:	jhb
Sponsored by:	The FreeBSD Foundation
2023-03-08 21:18:37 -05:00
Ed Maste
c581962414 src.conf.5: Add some WITH_/WITHOUT_ option descriptions
Reviewed by:	markj, brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38961
2023-03-08 18:30:45 -05:00
Ed Maste
4a869d380e nvram2env: Retire unused MIPS-specific driver
This code was used only on MIPS platforms, and has not built in some
time.

Reviewed by: ray
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38986
2023-03-08 18:24:02 -05:00
John Baldwin
3140e27ee5 sys/modules/Makefile: Add a section for arm64 + x86 + powerpc64.
This reduces some duplication between the existing arm64 + x86 section
and the powerpc64 section.  To make the diff simpler, enable mlx4 on
powerpc64 since it compiles.

Reviewed by:	pkubaj, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D38973
2023-03-08 15:12:25 -08:00
John Baldwin
fe0f695039 Enable OFED on all platforms except for 32-bit arm.
32-bit arm triggers multiple -Wunaligned-access errors due to
structure packing.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D38972
2023-03-08 15:12:00 -08:00
John Baldwin
f4ea84cea2 krping: Use get_cyclecount for get_cycles.
This avoids having to duplicate identical MD code.

Reviewed by:	np, emaste
Differential Revision:	https://reviews.freebsd.org/D38971
2023-03-08 15:06:59 -08:00
John Baldwin
6dcd6d199f arch.7: Drop most mentions of MIPS.
Only keep MIPS in the list of deprecated architectures.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D38970
2023-03-08 15:06:47 -08:00
John Baldwin
eee4264c9f Make <sys/systm.h> more self-contained.
Replace <sys/cdefs.h> with <sys/types.h>.  Other includes need types
defined in <sys/types.h> and <sys/types.h> includes <sys/cdefs.h>
already.

While here, move the <machine/*.h> headers below the <sys/*.h>
headers.

Reviewed by:	imp, kib
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38841
2023-03-08 15:05:10 -08:00
Brooks Davis
cc36164a77 makeman: replace -\|/ twiddles with dots
It shows progress more clearly, there aren't so many that the output
is excessive, and it's more friendly for things like Cirrus-CI's
logging that print the backspaces as boxes.

Reviewed by:	emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38990
2023-03-08 21:01:17 +00:00
Brooks Davis
397364e7df src.conf.5: regen without $FreeBSD$ 2023-03-08 21:01:17 +00:00
Brooks Davis
fca7df1b28 makeman: don't insert a $FreeBSD$
There's no need to insert this line which won't be expanded in git.  Not
generating it won't impact MFCs to 12 since the removal won't be MFCd.

Reviewed by:	emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38989
2023-03-08 21:01:17 +00:00
Brooks Davis
42afe48b1a makeman: fix a whitespace bug
Reviewed by:	emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38988
2023-03-08 21:01:17 +00:00
Joerg Wunsch
b0484678d4
dpaa2_mc.c: unbreak by adding <sys/lock.h>
When compiling current on arm64, it breaks since LA_UNLOCKED is
undefined. This was in turn caused by the mutex code aliasing
it as MA_NOTOWNED.

Add <sys/lock.h> so the macro is defined.
2023-03-08 21:50:01 +01:00
Alexander Motin
49ebbdb264 Add NAMESPACE MANAGEMENT into admin_opcode[].
MFC after: 1 week
2023-03-08 15:42:31 -05:00
Joerg Wunsch
175a584e50
usb: dwc3: add <sys/mutex.h>
Commit 5e54bb1ea9 added USB_BUS_LOCK/USB_BUS_UNLOCK. They, in
consequence, require mutexes so <sys/mutex.h> is needed.
2023-03-08 20:59:29 +01:00
Stefan Eßer
2d8cf575d5 msdosfs: fix debug print format and parameter
Building with -DMSDOSFS_DEBUG failed due to a format mismatch and
a variable that has been renamed but not updated in the printf()
parameter list.

MFC after:	1 month
2023-03-08 17:58:00 +01:00
Justin Hibbits
d936c29ec0 dpaa2: Mechanically convert to IfAPI
Reviewed By:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38959
2023-03-08 10:18:16 -05:00
Justin Hibbits
a472fd7a57 eqos: Mechanically convert to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38963
2023-03-08 10:18:16 -05:00
Alexander V. Chernikov
0679eb1f39 netlink: make snl(3) scratch buffer growable
Differential Revision: https://reviews.freebsd.org/D38946
MFC after:	2 weeks
2023-03-08 12:28:55 +00:00
Kirk McKusick
129ea078cd FFS/UFS snapshots: improve documentation for removal (deletion) and unlinking.
Clarification of the size of the snapshot file.

Suggested by: Matteo Riondato
PR:           266358
MFC after:    2 weeks
Differential Revision: https://reviews.freebsd.org/D38817
2023-03-07 22:03:00 -08:00
Yuri
109abf744b acpica: do not print warning for missing _ADR
Started seeing the following after updating to VMware ESXi 8.0:

pcib2: <ACPI Host-PCI bridge> on acpi0
pcib2: could not evaluate _ADR - AE_NOT_FOUND
pci2: <ACPI PCI bus> on pcib2
vmx0: <VMware VMXNET3 Ethernet Adapter> ...

The virtual NIC works fine, and the code comment suggests that
missing _ADR is not something fatal, skip printing the message
if status is AE_NOT_FOUND.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/682
2023-03-07 16:25:21 -07:00
Kirk McKusick
52f9710412 Correct several bugs in fsck_ffs(8) triggered by corrupted filesystems.
If a directory entry has an illegal inode number (less than zero
or greater than the last inode in the filesystem) the entry is removed.
If a directory '.' or '..' entry had an illegal inode number they
were being removed. Since fsck_ffs knows what the correct value is
for these two entries fix them rather deleting them.

Add much more extensive cylinder group checks and use them to be
more careful about rebuilding a cylinder group.

Check for out-of-range block numbers before trying to free them.

When a directory is deleted also remove its cache entry created
in pass1 so that later passes do not try to operate on a deleted
directory.

Check for ctime(3) returning NULL before trying to use its return.

When freeing a  directory inode, do not try to interpret it as a
directory.

Reserve space in the inostatlist to have room to allocate a
lost+found directory.

If an invalid block number is found past the end of an inode simply
remove it rather than clearing and removing the inode.

Modernize the inoinfo structure to use queue(3) LIST rather than a
handrolled linked list implementation.

Reported by:  Bob Prohaska, John-Mark Gurney, and Mark Millard
Tested by:    Peter Holm
Reviewed by:  Peter Holm
MFC after:    2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38668
2023-03-07 15:14:47 -08:00
Jose Luis Duran
320e7e0003 Revert "Fix cross-build support for Ubuntu 16.04"
This reverts commit d6327ae8c1.

Before version 2.25, glibc's unistd.h would define the POSIX subset of
getopt.h by defining __need_getopt, including getopt.h (which would
disable the header guard) and then undefining it so later including
getopt.h explicitly would define the extensions. However, we wrap
getopt, and so the wrapper's #pragma once breaks that. Thus getopt.h was
included before the real unistd.h to ensure we get all the extensions.

However, with clang 12 that causes problems where we get a function
mismatch (since getopt can throw exceptions). If we include it after
unistd.h, it will get the full definitions since glibc no longer does
the subsetting thing. This will result in matching definitions and fix
clang 12.

Reviewed by: imp, jrtc27 (OK'd on irc)
Pull Request: https://github.com/freebsd/freebsd-src/pull/668
2023-03-07 16:11:11 -07:00
Kirk McKusick
0eabe33087 Updates to UFS/FFS superblock integrity checks when reading a superblock.
Have to add a check that the computed cylinder group size does not
exceed the block size of the filesystem.

It is also necessary to validate additional parameters when a
superblock is going to be used in read-only mode if its supplementary
information is going to be read in to ensure that the size and
location of the supplementary information is valid. Also when a
warning is raised let it be accepted, but bound the flagged field
to the value checked by the warning.

No legitimate superblocks should fail as a result of these changes.

Reported by:  Bob Prohaska, John-Mark Gurney, and Mark Millard
Tested by:    Peter Holm
Reviewed by:  Peter Holm
MFC after:    2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38668
2023-03-07 15:02:19 -08:00
Ed Maste
1a718f7a3b src.opts.mk: Remove long-unused NDIS option
NDIS was removed a couple of years ago, but the src.conf knob was left
behind.

Fixes: bfc99943b0 ("ndis(4): remove as previous announced")
Sponsored by: The FreeBSD Foundation
2023-03-07 15:39:44 -05:00
Justin Hibbits
954712e8f6 Mechanically convert cxgb(4) and cxgbe(4) to IfAPI
Reviewed by:	np
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38597
2023-03-07 15:31:48 -05:00
Justin Hibbits
54ab3b4a03 Mechanically convert qlxgbe(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37821
2023-03-07 15:31:48 -05:00
Justin Hibbits
5b587352a2 Mechanically convert qlxgb(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37820
2023-03-07 15:31:48 -05:00
Justin Hibbits
64c618ed7d Mechanically convert qlxge(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37819
2023-03-07 15:31:48 -05:00
Ed Maste
7661a2abe4 src.opts.mk: sync FDT and OFED options with kern.opts.mk
Where options exist in both src.opts.mk and kern.opts.mk they should be
kept in sync.

It may be that the option should be flipped the other way (e.g.,
enabling OFED in the kernel on arm64); if so that will be done as a
subsequent commit after further testing.

PR:		269994
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38952
2023-03-07 13:40:18 -05:00
Alexander V. Chernikov
5c8277ec25 netlink: cleanup netlink_writer code
* Remove unused nlattr_add_nla() - that's a duplicate of nlattr_add_raw().
* Calculate alignment only once in nlmsg_reserve_data_raw()

MFC after:	2 weeks
2023-03-07 17:45:31 +00:00
Kyle Evans
1867702942 arm64: fix the LINT-ACPI build
This file uses VM_MEMATTR_DEVICE_NP, which it gets through header
pollution somewhere with FDT enabled.  Pull in vm/vm.h to make it
explicit.
2023-03-07 11:37:31 -06:00
Alexander V. Chernikov
c57dfd92c8 tests: add more netlink tests for neighbors/routes
Differential Revision: https://reviews.freebsd.org/D38912
MFC after:	2 weeks
2023-03-07 17:31:26 +00:00
Dag-Erling Smørgrav
a9a38dea37 libc: Remove prototype and documentation for tzsetwall().
PR:		269445
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D38481
2023-03-07 17:20:49 +00:00