Commit Graph

283688 Commits

Author SHA1 Message Date
Simon J. Gerraty
090e9752d7 Additions to targets/pseudo/host-tools
More tools needed to be built for Linux.
These are the ones that "just work".
2023-04-27 14:16:49 -07:00
Simon J. Gerraty
e020aa37b8 jobs.mk report JOB_ARGS log and JOB_LOG_START
At the start of a job include info such as JOB_ARGS the log location
and anything in JOB_LOG_START (eg TARGET_SPEC=${TARGET_SPEC})
2023-04-27 13:40:44 -07:00
Justin Hibbits
5a83f761c7
powerpc64: Support ELFv2 asm on Big Endian
FreeBSD/powerpc64 is all ELFv2 since FreeBSD 13, even big endian.  The
existing sha256 and sha512 asm code assumes that BE is all ELFv1, and LE
is ELFv2.  Minor changes to add ELFv2 in the BE side gets this working
correctly on FreeBSD with latest OpenZFS import.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Justin Hibbits <chmeeedalf@gmail.com>
Closes #14779
2023-04-27 12:49:21 -07:00
Alexander Motin
2fd1c30423
Mark TX_COMMIT transaction with TXG_NOTHROTTLE.
TX_COMMIT has no on-disk representation and does not produce any more
dirty data.  It should not wait for anything, and even just skipping
the checks if not waiting gives improvement noticeable in profiler.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #14798
2023-04-27 12:32:58 -07:00
Yuri Pankov
08ed87514f tzsetup: appease checkstyle9 2023-04-27 20:29:55 +02:00
Yuri Pankov
cfd0217aa9 tzsetup: adopt zone1970.tab changes
- assumption that single-zone countries do not have description
  is no longer correct; do not try to optimize this case as it's
  only going to make the code more confusing and we now have menus
  with a single zone selection because of this
- remove the single-country continent short cut, it also only serves
  to confuse users as we now have such a continent
- instead add a single-zone contry short cut (see above), now all
  single-zone countries fall here
- use the #@ continent overrides that zone1970.tab introduces (this is
  visible at least fixing Iceland being currently listed under Africa)
- add Arctic Ocean "continent" coming only from the overrides at the
  moment
- update baseline with the changes

Reviewed by:	bapt, philip
Differential Revision:	https://reviews.freebsd.org/D39606
2023-04-27 19:31:48 +02:00
Mark Johnston
ec45f952a2 sockbuf: Add KMSAN checks to sbappend*()
Otherwise KMSAN only detects uninitialized memory when the contents of
the buffer are copied out to userspace or transmitted to a network
interface.  At that point the KMSAN violation will be far removed from
its origin, so let's try to make debugging such problems a bit easier.

Reviewed by:	glebius
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38101
2023-04-27 12:58:56 -04:00
Val Packett
ae0d0f0e04
PAM: support the authentication facility
Implement the pam_sm_authenticate method, using the noop argument of
lzc_load_key to do a passphrase check without actually loading the key.

This allows using ZFS as the source of truth for user passwords,
without storing any password hashes in /etc or using other PAM modules.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Felix Dörre <felix@dogcraft.de>
Signed-off-by: Val Packett <val@packett.cool>
Closes #14789
2023-04-27 09:49:03 -07:00
Eugene Grosbein
83fd35b3f3 logger(1): fix timestamps in case of long run
An example:

( echo test; sleep 2; echo test2 ) | logger -h /var/run/log

Before fix, logger assigned same timestamp to both records.

Fixes:		65547fb33d
Reported by:	Vadim Goncharov
MFC after:	1 week
2023-04-27 23:43:16 +07:00
Mark Johnston
7ee4066db1 cap_net tests: Skip tests if there is no connectivity
When testing cap_connect() and name/addr lookup functions, skip tests if
we fail and the error is not ENOTCAPABLE.  This makes the tests amenable
to running in CI without Internet connectivity.

Reviewed by:	oshogbo
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D39242
2023-04-27 09:42:36 -04:00
Guido Falsi
014e03411f bhyve: Add DEBUG_HDA_FILE define to specify location of debug output
Reviewed by:		corvink
Approved by:		corvink
Differential Revision:	https://reviews.freebsd.org/D39826
2023-04-27 15:12:55 +02:00
Guido Falsi
03d3124629 bhyve: Disable bhyve HDA debug by default.
Adapt hda_print_cmd_ctl_data() to not generate compiler warnings
when DEBUG_HDA is off.

Reviewed by:		corvink
Approved by:		corvink
Differential Revision:	https://reviews.freebsd.org/D39826
2023-04-27 15:12:45 +02:00
Kyle Evans
087a2e64ba openzfs: re-enable FPU usage on aarch64
The BLAKE3 generated assembly files have now been updated to avoid
clobbering x18, we can safely re-enable FPU usage on aarch64.
2023-04-26 19:47:14 -05:00
Tino Reichardt
42f0ac5f1b Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
The x18 register isn't useable within FreeBSD kernel space, so we
have to fix the BLAKE3 aarch64 assembly for not using it.

The source files are here: https://github.com/mcmilk/BLAKE3-tests

Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #14728
2023-04-26 19:46:47 -05:00
Cheng Cui
60167184ab
siftr: remove barely used hash generation per record
Reviewers: rscheff, tuexen
Approved by: rscheff, tuexen
Subscribers: imp, melifaro, glebius
Differential Revision: https://reviews.freebsd.org/D39835
2023-04-26 15:57:42 -04:00
Vincenzo Maffione
8c3b8c8386 netmap: pkt-gen: sync with upstream
Keep in sync with the recent upstream changes:

Fix compilation on 32-bit architectures
Update IP length, UDP length/checksum when size changes
Man page fixes

Submitted by:	jlduran@gmail.com
MFC after:	7 days
Differential Revision:	https://reviews.freebsd.org/D39760
2023-04-26 20:32:24 +00:00
John Baldwin
2d7842d0bf arp/ndp: Use valid prototypes for function declarations with no arguments. 2023-04-26 13:18:53 -07:00
Tino Reichardt
ee728008a4
Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
The x18 register isn't useable within FreeBSD kernel space, so we
have to fix the BLAKE3 aarch64 assembly for not using it.

The source files are here: https://github.com/mcmilk/BLAKE3-tests

Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #14728
2023-04-26 12:40:26 -07:00
Elliott Mitchell
d7e3b05b0d arm: remove passing trapframe to intr_ipi_dispatch()
This was needed before INTRNG was in place and handling the push of
curthread->td_intr_frame.  Since INTRNG now handles this, there is no
longer and need for playing around with the frame inside IPI interrupts.
2023-04-26 20:08:30 +01:00
Elliott Mitchell
c7e5e9dc41 arm: remove interrupt nesting by ipi_preempt()/ipi_hardclock()
This was needed when intr_ipi_dispatch() was called by hardware-specific
IPI interrupt routines which didn't save the trap frame.  Now all ARM
interrupts pass through INTRNG which will have already saved the trap
frame and disabled preemption.

Remove the conditional trapframe/argument passing to the handlers.

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D37938
2023-04-26 20:08:30 +01:00
Brian Behlendorf
b5411618f7
Fix checkstyle warning
Resolve a missed checkstyle warning.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Mateusz Guzik <mjguzik@gmail.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #14799
2023-04-26 11:49:16 -07:00
Mateusz Guzik
d09a955a60 zfs: Fix positive ABD size assertion in abd_verify().
This cherry-picks upstream:
commit bba7cbf0a4
Author: Alexander Motin <mav@FreeBSD.org>
Date:   Wed Apr 26 12:20:43 2023 -0400

    Fix positive ABD size assertion in abd_verify().

    Gang ABDs without childred are legal, and they do have zero size.
    For other ABD types zero size doesn't have much sense and likely
    not working correctly now.

    Reviewed-by: Igor Kozhukhov <igor@dilos.org>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Signed-off-by:  Alexander Motin <mav@FreeBSD.org>
    Sponsored by:   iXsystems, Inc.
    Closes #14795

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-04-26 18:00:36 +00:00
Ed Maste
b73183d1a2 ipv6: disable RFC 4620 nodeinfo by default
RFC 4620 is an experimental RFC that can be used to request information
about a host, including:

- the fully-qualified or single-component name
- some set of the Responder's IPv6 unicast addresses
- some set of the Responder's IPv4 unicast addresses

This is not something that should be made available by default.

PR:		257709
Submitted by:	ruben@verweg.com
Reviewed by:	melifaro
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39778
2023-04-26 13:47:59 -04:00
Kyle Evans
ce5a210997 openzfs: arm64: implement kfpu_begin/kfpu_end
This is part one of a fix for booting with ZFS on arm64 using
accelerated checksum implementations.  Checksum benchmarking will
attempt to use the FPU, so we currently panic quickly on boot.  BLAKE3
is still broken, as it clobbers x18 and we promptly discover that fact
as soon as we attempt to fetch curthread in kfpu_end().

Note that _STANDALONE is special-cased here, but ideally we wouldn't be
building the code that uses kfpu_begin()/kfpu_end() at all in the loader
environment.

Discussed with:	imp (a bit)
Differential Revision:	https://reviews.freebsd.org/D39448
2023-04-26 12:24:00 -05:00
Ed Maste
3a9b77fea2 Vendor import of libfido2 1.10.0 2023-04-26 12:38:59 -04:00
Ed Maste
7248ec417c Vendor import of libfido2 1.9.0 2023-04-26 12:38:55 -04:00
Alexander Motin
bba7cbf0a4
Fix positive ABD size assertion in abd_verify().
Gang ABDs without childred are legal, and they do have zero size.
For other ABD types zero size doesn't have much sense and likely
not working correctly now.

Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #14795
2023-04-26 09:20:43 -07:00
Mateusz Guzik
e37a89d5d0 FreeBSD: fix up EINVAL from getdirentries on .zfs
Without the change:
/.zfs
/.zfs/snapshot
find: /.zfs: Invalid argument

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Closes #14774
2023-04-26 09:16:37 -07:00
Mateusz Guzik
88b8777159 FreeBSD: add missing vn state transition for .zfs
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Closes #14774
2023-04-26 09:16:09 -07:00
Rob N
b69cb06664
tests/zdb_encrypted: parse numbers a little more robustly
On FreeBSD, `wc` prints some leading spaces, while on Linux it does not.
So we tell ksh to expect an integer, and it does the rest.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #14791
Closes #14797
2023-04-26 08:50:44 -07:00
Brian Behlendorf
d960beca61
zdb: Fix minor memory leak
Commit 6b6aaf6dc2 introduced a small
memory leak in zdb.  This was detected by the LeakSanitizer and was
causing all ztest runs to fail.

Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #14796
2023-04-26 08:43:39 -07:00
Mark Johnston
2c0209a2ca callout: Remove an unneeded MTX_NEW
Reported by:	hselasky
Fixes:		78cfa762eb ("callout: Move per-CPU callout state into the dpcpu region")
2023-04-26 11:15:56 -04:00
Kristof Provost
a81f5112a0 pf: clear PF_TAG_ROUTE_TO for dummynet fast path
Similar to the PF_TAG_DUMMYNET we must also clear the route tag if
dummynet didn't keep the packet. In that case we'd continue immediately
and there'd be no need for the route tag. Keeping it could lead to
unexpected routing of traffic.

See also:	27407a6adc
See also:	https://redmine.pfsense.org/issues/14055
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-04-26 17:09:47 +02:00
Kristof Provost
9ec48bc31e pfctl: match expand_label_addr() prototype to definition
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-04-26 17:09:46 +02:00
Mark Johnston
e72f7ed43e buf: Dynamically allocate per-CPU buffer queues
To reduce static bloat.  No functional change intended.

PR:		269572
Reviewed by:	mjg, kib, emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39808
2023-04-26 10:09:31 -04:00
Mark Johnston
78cfa762eb callout: Move per-CPU callout state into the dpcpu region
This eliminates some static bloat in amd64 kernels and reduces the
penalty of increasing MAXCPU.  The structures now also maintain NUMA
affinity.  No functional change intended.

PR:		269572
Reviewed by:	mjg, kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39807
2023-04-26 10:09:09 -04:00
Mark Johnston
74ac712f72 vmm: Dynamically allocate a couple of per-CPU state save areas
This avoids bloating the BSS when MAXCPU is large.

No functional change intended.

PR:		269572
Reviewed by:	corvink, rew
Tested by:	rew
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39805
2023-04-26 10:08:42 -04:00
Dmitry Chagin
e185d83fc4 linux(4): Use inlined LINUX_KERNVER for tests to improve readability
MFC after:		1 month
2023-04-26 16:57:30 +03:00
Dmitry Chagin
76f8584e49 linux(4): Don't relie on process osreldata when testing features
The ELF note identifyies the operating-system ABI that the executable
was created for. The note data of the Glibc executable contains the
earliest release number of the Linux kernel that supports this ABI.
As of a current 2.37 version of Glibc, it is 3.2.0 for x86, 3.7.0
for Aarch64.
Glibc does not use this release number and the current kernel's
LINUX_VERSION_CODE to detect kernel features, using fallbacks to known
previous way in case of ENOSYS or something else instead.

A dynamically linked Glibc reads the current kernel's LINUX_VERSION_CODE
from the ELF note in the vDSO or fallback to uname syscall if the vDSO
can't be located and parse the release field in struct utsname. Glibc
uses the current kernel's LINUX_VERSION_CODE for "kernel too old" check.

While here use inlined LINUX_KERNVER for tests to improve readability,
as suggested by emaste@.

MFC after:		1 month
2023-04-26 16:56:41 +03:00
Mark Johnston
727fd8a73d irdma: Silence an unused function warning
Reviewed by:	erj
Fixes:	35105900c6 ("irdma(4): Upgrade the driver to 1.1.11-k")
Differential Revision:	https://reviews.freebsd.org/D39719
2023-04-26 09:36:52 -04:00
Toomas Soome
795497bf3d pxeboot: bugs in pxe.h
SEGDESC_t needs to be PACKED
there is no status in t_PXENV_UNDI_MCAST_ADDRESS

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D39799
2023-04-26 16:33:28 +03:00
Alexander V. Chernikov
20b6945c7f netlink: fix IPv6 proxy ndp deletion.
* Move LLT_ADDEDPROXY handling into lltable_link_entry() to
 reduct duplication
* Use standard lltable_delete_addr() for entry deletion
* Add (forgotten) call to llt_post_resolved handler after
 adding the entry via netlink.

MFC after:	2 weeks
2023-04-26 13:26:37 +00:00
Alexander V. Chernikov
52199877a6 arp: report successful deletion via netlink to mimic rtsock. 2023-04-26 13:26:37 +00:00
Andrew Turner
f8c451d291 Add vt_simplefb to the arm64 NOTES file
This will be picked up in the LINT-ACPI and LINT-FDT configs to check
it builds with only one option enabled

Sponsored by:	Arm Ltd
2023-04-26 14:11:36 +01:00
Andrew Turner
80327535cf Mark simplefb as depending on fdt
This file is for a FDT specific device, mark it as such.

Reported by:	Zachary Leaf <zachary.leaf@arm.com>
Sponsored by:	Arm Ltd
2023-04-26 14:11:31 +01:00
Yuri Pankov
989a0e1d81 tzsetup: fix bootstrapping for github CI jobs
Move dump_zonetab() under HAVE_BSDDIALOG as the parsing code
it relies on already is.
2023-04-26 14:29:08 +02:00
Alexander V. Chernikov
a1db1097e6 netlink: fix build without NETLINK in the kernel.
PR:	271066
2023-04-26 11:19:41 +00:00
Yuri Pankov
01007472ea getconf(1): add DEALLOC_PRESENT
Allow getconf to query _PC_DEALLOC_PRESENT pathconf(2) variable
added in 0dc332bff2.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D39796
2023-04-26 13:13:36 +02:00
Dag-Erling Smørgrav
6f3c2f41b1 tzcode: Clean up the ctime(3) manual page.
MFC after:	3 weeks
Sponsored by:	Klara, Inc.
Reviewed by:	pauamma_gundo.com
Differential Revision:	https://reviews.freebsd.org/D39714
2023-04-26 11:46:41 +02:00
Dag-Erling Smørgrav
75411d1572 Update tzcode to 2023c.
MFC after:      3 weeks
Sponsored by:   Klara, Inc.
Reviewed by:    philip
Differential Revision:  https://reviews.freebsd.org/D39712
2023-04-26 11:46:21 +02:00