Commit Graph

283491 Commits

Author SHA1 Message Date
Simon J. Gerraty
e5e345a4b0 local.dirdeps.mk skip N_host_libs for non-FreeBSD host
The N_host_libs dance only makes sense if host is FreeBSD.
Even then, if MK_host_egacy is yes we need libmd

libnetbsd does not need libutil when using libegacy

Sponsored by:	Juniper Networks, Inc.
2023-05-04 11:58:39 -07:00
Dag-Erling Smørgrav
cb46f47c79 tsort: Error out if writing to stdout failed.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans, imp
Differential Revision:	https://reviews.freebsd.org/D39959
2023-05-04 18:51:11 +00:00
Dag-Erling Smørgrav
5903d9c00b ncal: Error out if writing to stdout failed.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans, imp
Differential Revision:	https://reviews.freebsd.org/D39958
2023-05-04 18:51:10 +00:00
Simon J. Gerraty
ba4d333364 dirdeps.mk for host* DEP_TARGET_SPEC is just DEP_MACHINE
This helps avoid ugly noise in dirdeps.cache on Linux.
2023-05-04 11:29:33 -07:00
Simon J. Gerraty
42d088299c Update meta.sys.mk ensure DEP_* set at level 1+ 2023-05-04 09:46:47 -07:00
Kristof Provost
bf206a1db2 pf: remove NULL check before uma_zfree()
uma_zfree() can be called on a NULL pointer. Simplify the pf code a
little by removing the redundant checks.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-05-04 18:22:54 +02:00
Ed Maste
0d66206fff Add 'contrib/spleen/' from commit '5eab6333fa27e2b6954c6927859d462a004e57bb'
git-subtree-dir: contrib/spleen
git-subtree-mainline: 3582acbad3
git-subtree-split: 5eab6333fa

Reviewed by:	imp [earlier]
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20653
2023-05-04 11:46:40 -04:00
Konstantin Belousov
3582acbad3 amd64 mp_machdep.c: remove useless comment
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D39945
2023-05-04 18:39:22 +03:00
Konstantin Belousov
af1c6d3f30 amd64: do not leak pcpu pages
Do not preallocate pcpu area backing pages on early startup, only
allocate enough of KVA for pcpu[MAXCPU] and the page for BSP.  Other
pages are allocated after we know the number of cpus and their
assignments to the domains.

PCPUs are not accessed until they are initialized, which happens on AP
startup.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D39945
2023-05-04 18:39:22 +03:00
Konstantin Belousov
e704f88f3d amd64: initialize APs kpmap_store in init_secondary()
The APs pcpu area is zeroed in init_secondary() by pcpu_init(), so the
early initialization in pmap_bootstrap() is nop.

Fixes:	42f722e721cd010ae5759a4b0d3b7b93c2b9cad2ESC
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D39945
2023-05-04 18:39:22 +03:00
Ed Maste
5eab6333fa Vendor import of spleen font 1.9.3 2023-05-04 11:05:42 -04:00
Ed Maste
f3d044c73b Vendor import of spleen font 1.6.0
Obtained from:	https://github.com/fcambus/spleen
2023-05-04 10:39:10 -04:00
Warner Losh
5fd34912b4 stand: Fix oversight in updating OpenZFS: Add com.klarasystems:vdev_zaps_v2
com.klarasystems:vdev_zaps_v2 is a new feature that the last OpenZFS
import brought in. It needs to be on the list of supported features, but
that update didn't happen so I woke up to a mailbox with multiple
complaints.

CirrusCI test to boot twice with a zpool update inbetween coming later
today.

Sponsored by:		Netflix
2023-05-04 08:25:46 -06:00
Li-Wen Hsu
5282ada06b
ObsoleteFiles: Complete 20201025: Remove cal data files
Fixes:	d20d655018 calendar: remove all datafiles except freebsd one
MFC after:	3 days
2023-05-04 12:28:52 +08:00
Ed Maste
4194bbb34c release: Report disk image filename
For someone new to the release bits it's not always clear what files are
being created. Report the disk image name explicitly.

Reviewed by:	gjb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39953
2023-05-03 16:58:22 -04:00
Chuck Silvers
4064755812 fsck_ffs: fix the previous change that skipped pass 5 in some cases
The previous change involved calling check_cgmagic() twice in a row
for the same CG in order to differentiate when the CG was already ok vs.
when the CG was rebuilt, but that doesn't work because the second call
(which was supposed to rebuild the CG) returns 0 (indicating that
the CG was not rebuilt) due to the prevfailcg check causing an early
failure return.  Fix this by moving the rebuild part of check_cgmagic()
out into a separate function which is called by pass1() when it wants to
rebuild a CG.

Fixes: da86e7a20d
Reported by:	pho
Discussed with:	mckusick
Sponsored by:	Netflix
2023-05-03 13:31:32 -07:00
Simon J. Gerraty
9f27341c33 local.meta.sys.mk set BOOTSTRAPPING
When building for host on non-FreeBSD
some makefiles want to see BOOTSTRAPPING defined.

With this libmd and hence nmtree build ok
2023-05-03 12:20:02 -07:00
Michael Tuexen
04ede3675e sctp: only start shutdown guard timer when sending SHUTDOWN chunk
The intention is to protect a malicious peer not following the
shutdown procedures.

MFC after:	1 week
2023-05-03 20:28:46 +02:00
Mark Johnston
e8f6e5b2d9 unix: Fix locking in uipc_peeraddr()
After the locking protocol changed in commit 75a67bf3d0 ("AF_UNIX:
make unix socket locking finer grained"), uipc_peeraddr() was not
updated accordingly.

The link lock now only protects global socket lists.  The PCB lock is
used to protect the link between connected PCBs, so use that.  Remove an
old comment which appears to be noting that unp_conn is not set for
connected SOCK_DGRAM sockets (in one direction anyway).

Reviewed by:	glebius
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D39855
2023-05-03 11:56:46 -04:00
Ed Maste
fc2e2c950d src.conf: add WITH_TOOLCHAIN description
It is not used by the in-tree default configuration, but adding it
allows downstream projects with different defaults to make use of
Cirrus-CI (as the makeman test added in 85e8c2a034 requires that
there are no missing option descriptions).

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39936
2023-05-03 11:41:58 -04:00
Michael Tuexen
d9ae4adff2 sctp: improve shutdown(..., SHUT_WR) handling
When shutdown(..., SHUT_WR) is called in the front states, send a
SHUTDOWN chunk when a COOKIE ACK chunk is received and there is
no outstanding data.

MFC after:	1 week
2023-05-03 17:33:49 +02:00
Ed Maste
81f964e2ff authpf: do not sprintf to a null pointer
The fgetln loop will terminate with buf = NULL at EOF.

Reported by:	GCC
Reviewed by:	kp
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39947
2023-05-03 10:03:27 -04:00
Martin Matuska
d411c1d696 zfs: merge openzfs/zfs@d96e29576
Notable upstream pull request merges:

  #11680 Add support for zpool user properties
  #14145 Storage device expansion "silently" fails on degraded vdev
  #14405 Create zap for root vdev
  #14659 Allow MMP to bypass waiting for other threads
  #14674 Miscellaneous FreBSD compilation bugfixes
  #14692 Fix some signedness issues in arc_evict()
  #14702 Fix typo in check_clones()
  #14715 module: small fixes for FreeBSD/aarch64
  #14716 Trim needless zeroes from checksum events
  #14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
  #14722 Fix "Detach spare vdev in case if resilvering does not happen"
  #14723 freebsd clone range fixes
  #14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
  #14735 Fix in check_filesystem()
  #14739 Fix data corruption when cloning embedded blocks
  #14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
  #14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
  #14774 FreeBSD .zfs fixups
  #14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
  #14779 powerpc64: Support ELFv2 asm on Big Endian
  #14788 FreeBSD: add missing vop_fplookup assignments
  #14789 PAM: support the authentication facility
  #14790 Revert "Fix data race between zil_commit() and zil_suspend()"
  #14795 Fix positive ABD size assertion in abd_verify()
  #14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
  #14804 Correct ABD size for split block ZIOs
  #14806 Use correct block pointer in block cloning case.
  #14808 blake3: fix up bogus checksums in face of cpu migration

Obtained from:	OpenZFS
OpenZFS commit:	d96e29576c
2023-05-03 12:04:55 +02:00
Kajetan Staszkiewicz
16303d2ba6 pf: improve source node error handling
Functions manipulating source nodes can fail due to various reasons like
memory allocation errors, hitting configured limits or lack of
redirection targets. Ensure those errors are properly caught and
propagated in the code. Increase the error counters not only when
parsing the main ruleset but the NAT ruleset too.

Cherry-picked from development of D39880

Reviewed by:	kp
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D39940
2023-05-03 10:31:05 +02:00
Kristof Provost
7b67669885 pf: simplify structs with anonymous unions
Rather than playing preprocessor hacks use actual anonymous unions.
No functional change.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-05-03 10:24:20 +02:00
Emmanuel Vadot
1d7355248b RELNOTES: Document TI code removal from armv7 GENERIC kernel
Suggested by:	mhorne
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2023-05-03 09:21:58 +02:00
Emmanuel Vadot
f15b2e1afd RELNOTES: Add fwget entry
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2023-05-03 09:20:35 +02:00
Mateusz Guzik
cf0fc64bc2 vfs: reduce audit branching in namei_setup 2023-05-03 06:56:10 +00:00
Jessica Clarke
f78cc42f10 riscv: Add pass(4) to GENERIC kernel
Whilst we don't have ahci(4) currently, we do have umass(4), and need
pass(4) for smartctl(8) to be able to talk to such devices.

Reported by:	David Gilbert <dgilbert@daveg.ca>
MFC after:	1 week
2023-05-03 05:14:57 +01:00
Ed Maste
ec1e83782d rtld: don't add extraneous -L directory when MK_TOOLCHAIN == no
rtld's Makefile used to add -L${LIBDIR} to LDFLAGS when MK_TOOLCHAIN was
no.  This was done as part of a change to fix building rtld with
MK_TOOLCHAIN == no (although I'm not sure this part was necessary).

In any case as of 5f2e84015d libc_pic.a is built independent of the
MK_TOOLCHAIN setting and the main part of the workaround has already
been removed.  Remove the rest now.

This reverts commit c0f5aeb032.

Reviewed by:	jrtc27
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39938
2023-05-02 18:01:43 -04:00
Christos Margiolis
0ebc92bf3d vmrun.sh: mention new edk2 package
uefi-edk2-bhyve no longer exists.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39937
2023-05-02 15:19:09 -04:00
Justin Hibbits
0785c323f3 Convert nfs bootp/diskless to use IfAPI
Use the new IfAPI interface and address iterators so the nfs driver
doesn't need direct access to the interface structures.

Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38962
2023-05-02 14:35:58 -04:00
Justin Hibbits
4db5958a06 Mechanically convert if_hn(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37855
2023-05-02 14:34:47 -04:00
Justin Hibbits
f766d1d5a7 IfAPI: Add if_maddr_empty() to check for any maddrs
if_llmaddr_count() only counts link-level multicast addresses.
hv_netvsc(4) needs to know if there are any multicast addresses.  Since
hv_netvsc(4) is the only instance where this would be used, make it a
simple boolean.  If others need a if_maddr_count(), that can be added in
the future.

Reviewed by:	melifaro
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D39493
2023-05-02 14:34:47 -04:00
Mitchell Horne
c32b6c742f riscv: retire the FPE kernel option
We always build the kernel floating point support. Now that the
riscv64sf userspace variant has been removed the option is required for
correct operation.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39851
2023-05-02 15:01:31 -03:00
Mitchell Horne
f5d39047b0 riscv: remove unused string from swtch.S
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2023-05-02 15:01:00 -03:00
Pawel Jakub Dawidek
d96e29576c
Use correct block pointer in block cloning case.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Closes #14806
2023-05-02 09:24:26 -07:00
Brian Behlendorf
012829df0c
Wrap clang specific pragma
Clang specific pragmas need to be wrapped to prevent a build
warning when compiling with gcc.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #14814
2023-05-02 09:21:47 -07:00
Kristof Provost
476babaea7 rtsol: introduce an 'always' script
In addition to the 'M' and 'O' scripts (for when 'Managed' and 'Other'
flags are set) also introduce an 'always' script that is called for any
router advertisement (so even if M and O are not set).

This is primarly useful for systems like pfSense that wish to be
informed of routers for further system configuration.

See also https://redmine.pfsense.org/issues/14072

Reviewed by:	melifaro
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D39931
2023-05-02 18:07:36 +02:00
Konstantin Belousov
a1d71cebc0 fstatat(2): restore AT_EMPTY_PATH handling
Fixes:	cb858340dc
Reported by:	markj
Sponsored by:	The FreeBSD Foundation
2023-05-02 18:11:39 +03:00
Jason A. Harmening
6f378116e9 Intel DMAR: remove parsing of 6-level paging capability
Early versions of the VT-d spec mentioned 6-level paging support as a
possible value for the SAGAW capability, but later versions removed it
and SAGAW=0x10 is currently listed as a reserved value.

The 6-level (agaw=64) entry in sagaw_bits is furthermore problematic
with clang15 because the attempted comparison against 1ULL << 64 in
dmar_maxaddr2mgaw() causes the compiler to elide the last iteration
of the initial loop, which bypasses the subsequent logic to find the
greatest HW-supported address width.  This results in 5-level paging
always being selected regardless of whether the hardware supports it,
which can result address translation failure due to invalid context-
entry programming.

Reviewed by:	kib
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D39896
2023-05-02 09:06:11 -05:00
Konstantin Belousov
42f722e721 amd64: store pcids pmap data in pcpu zone
This change eliminates the struct pmap_pcid array embedded into struct
pmap and sized by MAXCPU, which would bloat with MAXCPU increase.  Also
it removes false sharing of cache lines, since the array elements are
mostly locally accessed by corresponding CPUs.

Suggested by:	mjg
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D39890
2023-05-02 14:32:47 +03:00
Konstantin Belousov
9c8cbf3819 amd64 pmap_pcid_alloc(): pass a pointer to struct pmap_pcid instead of cpuid
Cpuid is used to index the pmap->pm_pcids array only.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D39890
2023-05-02 14:32:40 +03:00
Konstantin Belousov
9e0143694a amd64: add pmap_get_pcid() helper
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D39890
2023-05-02 14:32:35 +03:00
Konstantin Belousov
86b61ccb34 amd64 pmap: add pmap_pinit_pcids() helper
to initialize pm_pcids array for a new user pmap

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D39890
2023-05-02 14:32:29 +03:00
Konstantin Belousov
32bb28d8ad amd64: move definition of the struct pmap_pcids into _pmap.h
and rename the structure to pmap_pcid.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D39890
2023-05-02 14:32:20 +03:00
Xin LI
d713e0891f MFV: less v632.
MFC after:	2 weeks
2023-05-01 20:43:57 -07:00
Ed Maste
83d5725005 src.conf.5: regen after MK_TOOLCHAIN / MK_INCLUDES decoupling 2023-05-01 20:39:30 -04:00
Ed Maste
0b4568e36f src.opts.mk: Decouple MK_INCLUDES from MK_TOOLCHAIN
Prior to 590461a4b8 installation of include files was controlled
directly by ${MK_TOOLCHAIN}.  590461a4b8 added an INCLUDES knob
defaulting to YES.  Setting WITHOUT_TOOLCHAIN forced it off to retain
existing behaviour.

Decouple them now, as there are reasonable use cases for installing
libraries and include files without a compiler or other tool chain
components.

Reviewed by:	imp, jrtc27
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39918
2023-05-01 20:33:08 -04:00
Mateusz Guzik
e2a92d726e
blake3: fix up bogus checksums in face of cpu migration
This is a temporary measure until a better fix is sorted out.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Closes #14785
Closes #14808
2023-05-01 17:21:27 -07:00