]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 months agonetlink: enable NETLINK_SUPPORT by default on all architectures.
Alexander V. Chernikov [Thu, 27 Apr 2023 14:38:08 +0000 (14:38 +0000)]
netlink: enable NETLINK_SUPPORT by default on all architectures.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D39849

14 months agolibifconfig: fix incorrect carp output
Kristof Provost [Fri, 28 Apr 2023 11:24:44 +0000 (13:24 +0200)]
libifconfig: fix incorrect carp output

If one interface has a carp address configured on it ifconfig would show
this information on all interfaces.

That's because the kernel does (as one would expect) not return any carp
data for interface without carp configuration. However, this wound up
not overwriting the data passed in by the caller, and leaving the (now
stale) information in pace. As a result the caller thought carp was
configured on the interface.

Zero out the input structure before making the call to the kernel, so
that we correctly return 0 if there is no carp configuration on the
queried interface.

Sponsored by: Rubicon Communications, LLC ("Netgate")

14 months agoSplit out pmap_map_delete on arm64
Andrew Turner [Fri, 28 Apr 2023 10:54:19 +0000 (11:54 +0100)]
Split out pmap_map_delete on arm64

This will be used when supporting some extensions, e.g. Branch Target
Identification (BTI).

Sponsored by: Arm Ltd

14 months agomrsas: Fix a typo in a source code comment
Zhenlei Huang [Fri, 28 Apr 2023 10:01:58 +0000 (18:01 +0800)]
mrsas: Fix a typo in a source code comment

- s/feild/field/

MFC after: 3 days

14 months agomps: Fix a typo in a source code comment
Zhenlei Huang [Fri, 28 Apr 2023 10:01:58 +0000 (18:01 +0800)]
mps: Fix a typo in a source code comment

- s/feild/field/

MFC after: 3 days

14 months agoixgbe: Fix typos in source code comments
Ian Moffett [Fri, 28 Apr 2023 10:01:58 +0000 (18:01 +0800)]
ixgbe: Fix typos in source code comments

- s/feilds/fields/

Reviewed by: zlei
MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/707

14 months agolinux(4): Uniformly dev_t arguments translation
Dmitry Chagin [Fri, 28 Apr 2023 08:55:05 +0000 (11:55 +0300)]
linux(4): Uniformly dev_t arguments translation

The two main uses of dev_t are in struct stat and as a parameter of the
mknod system calls.
As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit quantity
with 12 bits set asaid for the major number and 20 for the minor number.
The in-kernel dev_t encoded as MMMmmmmm, where M is a hex digit of the
major number and m is a hex digit of the minor number.
The user-space dev_t encoded as mmmM MMmm, where M and m is the major
and minor numbers accordingly. This is downward compatible with legacy
systems where dev_t is 16 bits wide, encoded as MMmm.
In glibc dev_t is a 64-bit quantity, with 32-bit major and minor numbers,
encoded as MMMM Mmmm mmmM MMmm. This is downward compatible with the Linux
kernel and with legacy systems where dev_t is 16 bits wide.
In the FreeBSD dev_t is a 64-bit quantity. The major and minor numbers
are encoded as MMMmmmMm, therefore conversion of the device numbers between
Linux user-space and FreeBSD kernel required.

14 months agolinux(4): Add a dedicated fstat() implementation
Dmitry Chagin [Fri, 28 Apr 2023 08:55:04 +0000 (11:55 +0300)]
linux(4): Add a dedicated fstat() implementation

In between kern_fstat() and translate_fd_major_minor(), another process
having the same filedesc could modify or close fd.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D39763

14 months agolinux(4): Add a dedicated statat() implementation
Dmitry Chagin [Fri, 28 Apr 2023 08:55:04 +0000 (11:55 +0300)]
linux(4): Add a dedicated statat() implementation

Get rid of calling Linux stat translation hook and specific to Linux
handling of non-vnode dirfd from kern_statat(),

Reviewed by: kib, mjg
Differential revision: https://reviews.freebsd.org/D35474

14 months agolinux(4): Make struct stat64 to match Linux actual one
Dmitry Chagin [Fri, 28 Apr 2023 08:55:04 +0000 (11:55 +0300)]
linux(4): Make struct stat64 to match Linux actual one

14 months agolinux(4): Regen for mknod syscall changes
Dmitry Chagin [Fri, 28 Apr 2023 08:55:04 +0000 (11:55 +0300)]
linux(4): Regen for mknod syscall changes

14 months agolinux(4): Use Linux dev_t type for mknod syscalls dev argument
Dmitry Chagin [Fri, 28 Apr 2023 08:55:02 +0000 (11:55 +0300)]
linux(4): Use Linux dev_t type for mknod syscalls dev argument

As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit unsigned integer
on all platforms. Prior the 2.6 kernel dev_t type was an unsigned short.
However, since the firs commit of the Linuxulator, mknod syscall get int dev
argument.
Also, there is some confusion here, while the kernel declares a dev_t type
as a 32-bit sized, the user-space dev_t type can be size of 64 bits, e.g.,
in the Glibc library.
To avoid confusion and to help porting of the Linuxulator to other platforms
use explicit l_dev_t for dev argument of mknod syscalls.

14 months agolinux(4): Move dev_t type declaration under /compat/linux
Dmitry Chagin [Fri, 28 Apr 2023 08:55:02 +0000 (11:55 +0300)]
linux(4): Move dev_t type declaration under /compat/linux

As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit unsigned integer
on all platforms. Move it into the MI linux.h under /compat/linux.

14 months agolinux(4): Make struct newstat to match actual Linux one
Dmitry Chagin [Fri, 28 Apr 2023 08:55:01 +0000 (11:55 +0300)]
linux(4): Make struct newstat to match actual Linux one

In the struct stat the st_dev, st_rdev are unsigned long.

14 months agolinux(4): Regen for struct l_old_stat changes
Dmitry Chagin [Fri, 28 Apr 2023 08:55:01 +0000 (11:55 +0300)]
linux(4): Regen for struct l_old_stat changes

14 months agolinux(4): Update syscalls.master to reflect struct l_old_stat
Dmitry Chagin [Fri, 28 Apr 2023 08:54:59 +0000 (11:54 +0300)]
linux(4): Update syscalls.master to reflect struct l_old_stat

14 months agolinux(4): Mark old fstat syscal as unimplemented
Dmitry Chagin [Fri, 28 Apr 2023 08:54:59 +0000 (11:54 +0300)]
linux(4): Mark old fstat syscal as unimplemented

It looks like the old fstat system call never been implemented.

14 months agolinux(4): Rename obsolete old struct l_stat to struct l_old_stat
Dmitry Chagin [Fri, 28 Apr 2023 08:54:59 +0000 (11:54 +0300)]
linux(4): Rename obsolete old struct l_stat to struct l_old_stat

14 months agolinux(4): Move statx_copyout() close to linux_statx()
Dmitry Chagin [Fri, 28 Apr 2023 08:54:59 +0000 (11:54 +0300)]
linux(4): Move statx_copyout() close to linux_statx()

Just for future changes of the conditional Linuxulator build. We need
a small refactoring of the MI code to help porting Linuxulator to other
platforms.

14 months agolinux(4): Move translate_vnhook_major_minor() into the Linux common module
Dmitry Chagin [Fri, 28 Apr 2023 08:54:58 +0000 (11:54 +0300)]
linux(4): Move translate_vnhook_major_minor() into the Linux common module

14 months agolinux(4): Sort includes in the linux_stats.c
Dmitry Chagin [Fri, 28 Apr 2023 08:54:58 +0000 (11:54 +0300)]
linux(4): Sort includes in the linux_stats.c

14 months agobhyve: enable capsicum for snapshot code
Vitaliy Gusev [Fri, 28 Apr 2023 07:02:51 +0000 (09:02 +0200)]
bhyve: enable capsicum for snapshot code

Reviewed by: corvink
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D38860

14 months agobhyve: use directory file descriptor for checkpoint
Vitaliy Gusev [Fri, 28 Apr 2023 07:00:48 +0000 (09:00 +0200)]
bhyve: use directory file descriptor for checkpoint

This is required to enable capsicum for the snapshot code.

Reviewed by: corvink
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D38858

14 months agoefiwake(8): style
Konstantin Belousov [Fri, 28 Apr 2023 02:58:01 +0000 (05:58 +0300)]
efiwake(8): style

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

14 months agoAdd efiwake tool
Johannes Totz [Wed, 26 Apr 2023 16:16:55 +0000 (17:16 +0100)]
Add efiwake tool

Reviewed by: kib
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36714

14 months agoExpose EFI wake time API
Johannes Totz [Wed, 26 Apr 2023 16:15:31 +0000 (17:15 +0100)]
Expose EFI wake time API

Reviewed by: kib
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36714

14 months agovfs: Fix "emptydir" mount option
Olivier Certner [Sat, 22 Apr 2023 16:07:07 +0000 (18:07 +0200)]
vfs: Fix "emptydir" mount option

Fix vfs_emptydir(). It would consider directories containing directories
with name of the form 'X.' (X being any authorized byte) as empty. Also,
it would cause VOP_READDIR() to return an error on directories
containing enough whiteouts. While here, use a more decently sized
buffer as done elsewhere.

Remove ad-hoc iteration on the directory's content and instead use the
newly exported vn_dir_next_dirent() function (this is what fixes the
second problem mentioned above).

PR: 270988
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39775

14 months agovfs: vn_dir_next_dirent(): Simplify interface and harden
Olivier Certner [Mon, 24 Apr 2023 08:25:15 +0000 (10:25 +0200)]
vfs: vn_dir_next_dirent(): Simplify interface and harden

Simplify the old interface (one less argument, simpler termination test)
and add documentation about it. Add more sanity checks (mostly under
INVARIANTS, but also in the general case to prevent infinite
loops). Drop the explicit test on minimum directory entry size (without
INVARIANTS).

Deal with the impacts in callers (dirent_exists() and vop_stdvptocnp()).
dirent_exists() has been simplified a bit, preserving the exact same
semantics but for the return code whose meaning has been reversed (0 now
means the entry exists, ENOENT that it doesn't and other values are
genuine errors). While here, suppress gratuitous casts of malloc return
values.

vn_dir_next_dirent() has been tested by a 'make -j4 buildkernel' with a
temporary modification to the VFS cache causing vn_vptocnp() to always
call VOP_VPTOCNP() and finally vop_stdvptocnp() (observed with temporary
debug counters).

Export new _GENERIC_MINDIRSIZ and _GENERIC_MAXDIRSIZ on __BSD_VISIBLE,
and GENERIC_MINDIRSIZ and GENERIC_MAXDIRSIZ on _KERNEL.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39764

14 months agovfs: Export get_next_dirent() as vn_dir_next_dirent()
Olivier Certner [Sun, 23 Apr 2023 07:47:58 +0000 (09:47 +0200)]
vfs: Export get_next_dirent() as vn_dir_next_dirent()

Move internal-to-'vfs_default.c' get_next_dirent() to 'vfs_vnops.c' and
export it for use by other parts of the VFS. This is a preparatory
change for using it in vfs_emptydir().

No functional change.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39755

14 months agoCONTRIBUTING: add intro describing the ways we accept contributions
Ed Maste [Thu, 27 Apr 2023 16:13:04 +0000 (12:13 -0400)]
CONTRIBUTING: add intro describing the ways we accept contributions

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39854

14 months agoAdditions to targets/pseudo/host-tools
Simon J. Gerraty [Thu, 27 Apr 2023 21:16:49 +0000 (14:16 -0700)]
Additions to targets/pseudo/host-tools

More tools needed to be built for Linux.
These are the ones that "just work".

14 months agojobs.mk report JOB_ARGS log and JOB_LOG_START
Simon J. Gerraty [Thu, 27 Apr 2023 20:40:44 +0000 (13:40 -0700)]
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})

14 months agotzsetup: appease checkstyle9
Yuri Pankov [Thu, 27 Apr 2023 18:26:16 +0000 (20:26 +0200)]
tzsetup: appease checkstyle9

14 months agotzsetup: adopt zone1970.tab changes
Yuri Pankov [Thu, 27 Apr 2023 17:31:48 +0000 (19:31 +0200)]
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

14 months agosockbuf: Add KMSAN checks to sbappend*()
Mark Johnston [Thu, 27 Apr 2023 16:58:56 +0000 (12:58 -0400)]
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

14 months agologger(1): fix timestamps in case of long run
Eugene Grosbein [Thu, 27 Apr 2023 16:43:16 +0000 (23:43 +0700)]
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: 65547fb33db901a9f352aacb0ed45ce68b0bd275
Reported by: Vadim Goncharov
MFC after: 1 week

14 months agocap_net tests: Skip tests if there is no connectivity
Mark Johnston [Thu, 27 Apr 2023 13:42:36 +0000 (09:42 -0400)]
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

14 months agobhyve: Add DEBUG_HDA_FILE define to specify location of debug output
Guido Falsi [Thu, 27 Apr 2023 07:49:01 +0000 (09:49 +0200)]
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

14 months agobhyve: Disable bhyve HDA debug by default.
Guido Falsi [Mon, 3 Apr 2023 10:45:11 +0000 (12:45 +0200)]
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

14 months agoopenzfs: re-enable FPU usage on aarch64
Kyle Evans [Thu, 27 Apr 2023 00:47:14 +0000 (19:47 -0500)]
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.

14 months agoFix BLAKE3 aarch64 assembly for FreeBSD and macOS
Tino Reichardt [Wed, 26 Apr 2023 19:40:26 +0000 (21:40 +0200)]
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

14 months agosiftr: remove barely used hash generation per record
Cheng Cui [Wed, 26 Apr 2023 11:18:01 +0000 (07:18 -0400)]
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

14 months agonetmap: pkt-gen: sync with upstream
Vincenzo Maffione [Wed, 26 Apr 2023 20:32:24 +0000 (20:32 +0000)]
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

14 months agoarp/ndp: Use valid prototypes for function declarations with no arguments.
John Baldwin [Wed, 26 Apr 2023 20:18:53 +0000 (13:18 -0700)]
arp/ndp: Use valid prototypes for function declarations with no arguments.

14 months agoarm: remove passing trapframe to intr_ipi_dispatch()
Elliott Mitchell [Wed, 14 Dec 2022 21:59:17 +0000 (13:59 -0800)]
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.

14 months agoarm: remove interrupt nesting by ipi_preempt()/ipi_hardclock()
Elliott Mitchell [Wed, 14 Dec 2022 20:36:47 +0000 (12:36 -0800)]
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

14 months agozfs: Fix positive ABD size assertion in abd_verify().
Mateusz Guzik [Wed, 26 Apr 2023 17:59:24 +0000 (17:59 +0000)]
zfs: Fix positive ABD size assertion in abd_verify().

This cherry-picks upstream:
commit bba7cbf0a481ab16f9a9a4874b7dbd5682e4d3a4
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")

14 months agoipv6: disable RFC 4620 nodeinfo by default
Ed Maste [Mon, 24 Apr 2023 19:41:45 +0000 (15:41 -0400)]
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

14 months agoopenzfs: arm64: implement kfpu_begin/kfpu_end
Kyle Evans [Wed, 26 Apr 2023 17:23:48 +0000 (12:23 -0500)]
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

14 months agocallout: Remove an unneeded MTX_NEW
Mark Johnston [Wed, 26 Apr 2023 15:15:56 +0000 (11:15 -0400)]
callout: Remove an unneeded MTX_NEW

Reported by: hselasky
Fixes: 78cfa762ebf2 ("callout: Move per-CPU callout state into the dpcpu region")

14 months agopf: clear PF_TAG_ROUTE_TO for dummynet fast path
Kristof Provost [Wed, 26 Apr 2023 13:12:30 +0000 (15:12 +0200)]
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: 27407a6adc793bdfaef8a86ece32fb1b461429f0
See also: https://redmine.pfsense.org/issues/14055
Sponsored by: Rubicon Communications, LLC ("Netgate")

14 months agopfctl: match expand_label_addr() prototype to definition
Kristof Provost [Tue, 25 Apr 2023 14:01:45 +0000 (16:01 +0200)]
pfctl: match expand_label_addr() prototype to definition

Sponsored by: Rubicon Communications, LLC ("Netgate")

14 months agobuf: Dynamically allocate per-CPU buffer queues
Mark Johnston [Wed, 26 Apr 2023 14:09:31 +0000 (10:09 -0400)]
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

14 months agocallout: Move per-CPU callout state into the dpcpu region
Mark Johnston [Wed, 26 Apr 2023 14:09:09 +0000 (10:09 -0400)]
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

14 months agovmm: Dynamically allocate a couple of per-CPU state save areas
Mark Johnston [Wed, 26 Apr 2023 14:08:42 +0000 (10:08 -0400)]
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

14 months agolinux(4): Use inlined LINUX_KERNVER for tests to improve readability
Dmitry Chagin [Wed, 26 Apr 2023 13:57:30 +0000 (16:57 +0300)]
linux(4): Use inlined LINUX_KERNVER for tests to improve readability

MFC after: 1 month

14 months agolinux(4): Don't relie on process osreldata when testing features
Dmitry Chagin [Wed, 26 Apr 2023 13:56:41 +0000 (16:56 +0300)]
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

14 months agoirdma: Silence an unused function warning
Mark Johnston [Wed, 26 Apr 2023 13:36:31 +0000 (09:36 -0400)]
irdma: Silence an unused function warning

Reviewed by: erj
Fixes: 35105900c65b ("irdma(4): Upgrade the driver to 1.1.11-k")
Differential Revision: https://reviews.freebsd.org/D39719

14 months agopxeboot: bugs in pxe.h
Toomas Soome [Tue, 25 Apr 2023 12:12:07 +0000 (15:12 +0300)]
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

14 months agonetlink: fix IPv6 proxy ndp deletion.
Alexander V. Chernikov [Wed, 26 Apr 2023 13:23:39 +0000 (13:23 +0000)]
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

14 months agoarp: report successful deletion via netlink to mimic rtsock.
Alexander V. Chernikov [Wed, 26 Apr 2023 12:29:43 +0000 (12:29 +0000)]
arp: report successful deletion via netlink to mimic rtsock.

14 months agoAdd vt_simplefb to the arm64 NOTES file
Andrew Turner [Wed, 26 Apr 2023 13:09:00 +0000 (14:09 +0100)]
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

14 months agoMark simplefb as depending on fdt
Andrew Turner [Wed, 26 Apr 2023 13:11:31 +0000 (14:11 +0100)]
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

14 months agotzsetup: fix bootstrapping for github CI jobs
Yuri Pankov [Wed, 26 Apr 2023 12:29:08 +0000 (14:29 +0200)]
tzsetup: fix bootstrapping for github CI jobs

Move dump_zonetab() under HAVE_BSDDIALOG as the parsing code
it relies on already is.

14 months agonetlink: fix build without NETLINK in the kernel.
Alexander V. Chernikov [Wed, 26 Apr 2023 11:18:43 +0000 (11:18 +0000)]
netlink: fix build without NETLINK in the kernel.

PR: 271066

14 months agogetconf(1): add DEALLOC_PRESENT
Yuri Pankov [Wed, 26 Apr 2023 11:01:43 +0000 (13:01 +0200)]
getconf(1): add DEALLOC_PRESENT

Allow getconf to query _PC_DEALLOC_PRESENT pathconf(2) variable
added in 0dc332bff200.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D39796

14 months agotzcode: Clean up the ctime(3) manual page.
Dag-Erling Smørgrav [Wed, 26 Apr 2023 09:46:41 +0000 (11:46 +0200)]
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

14 months agoUpdate tzcode to 2023c.
Dag-Erling Smørgrav [Wed, 26 Apr 2023 09:46:18 +0000 (11:46 +0200)]
Update tzcode to 2023c.

MFC after:      3 weeks
Sponsored by:   Klara, Inc.
Reviewed by:    philip
Differential Revision:  https://reviews.freebsd.org/D39712

14 months agopf: introduce ridentifier and labels to ether rules
Christian McDonald [Mon, 24 Apr 2023 18:55:34 +0000 (14:55 -0400)]
pf: introduce ridentifier and labels to ether rules

Make Ethernet rules more similar to the usual layer 3 rules by also
allowing ridentifier and labels to be set on them.

Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")

14 months agovmm: fix HLT loop while vcpu has requested virtual interrupts
Vitaliy Gusev [Wed, 26 Apr 2023 08:17:50 +0000 (10:17 +0200)]
vmm: fix HLT loop while vcpu has requested virtual interrupts

This fixes the detection of pending interrupts when pirval is 0 and the
pending bit is set

More information how this situation occurs, can be found here:
https://github.com/freebsd/freebsd-src/blob/c5b5f2d8086f540fefe4826da013dd31d4e45fe8/sys/amd64/vmm/intel/vmx.c#L4016-L4031

Reviewed by: corvink, markj
Fixes: 02cc877968bbcd57695035c67114a67427f54549 ("Recognize a pending virtual interrupt while emulating the halt instruction.")
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D39620

14 months agoprometheus_sysctl_exporter: Replace magic numbers with identifiers.
Peter Jeremy [Wed, 26 Apr 2023 08:29:33 +0000 (18:29 +1000)]
prometheus_sysctl_exporter: Replace magic numbers with identifiers.

Identifiers make it clearer what is going on and makes it easier to
find consumers of sysctl functionality.

No functional change.

MFC after: 3 days
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D39797

14 months agobhyve: pass E820 table to guest
Corvin Köhne [Thu, 9 Sep 2021 09:37:04 +0000 (11:37 +0200)]
bhyve: pass E820 table to guest

E820 table will be used to report valid RAM ranges and reserve special
memory areas like graphics memory for GPU passthrough.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39550

14 months agobhyve: add E820 dump function
Corvin Köhne [Thu, 9 Sep 2021 09:37:03 +0000 (11:37 +0200)]
bhyve: add E820 dump function

For debugging purposes it is helpful to dump the E820 table.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39549

14 months agobhyve: add allocation function to E820
Corvin Köhne [Thu, 9 Sep 2021 09:37:03 +0000 (11:37 +0200)]
bhyve: add allocation function to E820

This function makes it easy to allocate new E820 entries. It will be
used to allocate graphics memory for Intel integrated graphic devices.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39547

14 months agobhyve: add common memory holes to E820 table
Corvin Köhne [Thu, 9 Sep 2021 09:37:03 +0000 (11:37 +0200)]
bhyve: add common memory holes to E820 table

The VGA and the ROM memory ranges can't be used as system memory. For
that reason, remove them from the E820 table.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39546

14 months agobhyve: add basic E820 implementation
Corvin Köhne [Thu, 9 Sep 2021 09:37:03 +0000 (11:37 +0200)]
bhyve: add basic E820 implementation

There are some use cases where bhyve has to prepare some special memory
regions. E.g. GPU passthrough for Intel integrated graphic devices needs
to reserve some memory for the graphic device. So, bhyve has to inform
the guest about those memory regions. This information can be passed by
the qemu fwcfg interface. As qemu creates an E820 table, we can reuse
the existing fwcfg item "etc/e820".

This commit is the first one of a series. It only adds a basic
implementation for the creation of the E820 table. Some subsequent
commits will add more items to the E820 table and register it as fwcfg
item.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39545

14 months agoAdd a simple-framebuffer vt driver
Andrew Turner [Wed, 26 Apr 2023 05:44:10 +0000 (00:44 -0500)]
Add a simple-framebuffer vt driver

This allows us to support this hardware and, in the future, use clocks
so they are enabled past the initial kernel boot process.

Reviewed by: ray
Differential Revision: https://reviews.freebsd.org/D30103

14 months agoNote that static hints no longer break loader hints
Kyle Evans [Wed, 26 Apr 2023 05:38:32 +0000 (00:38 -0500)]
Note that static hints no longer break loader hints

This commentary was carried over from the x86 version of the same code,
but has actually been inaccurate for a while now. As of FreeBSD 12.x,
all environments are used unless they disable each other. See
39d44f7f15c ("kern_environment: use any provided environments [...]")
for details.

Reviewed by: imp
Differentiala Revision: https://reviews.freebsd.org/D35695

14 months agogbde: stop rebuilding sha512 bits
Kyle Evans [Wed, 26 Apr 2023 05:36:33 +0000 (00:36 -0500)]
gbde: stop rebuilding sha512 bits

In the early days of gbde, it linked against libmd.  Shortly after
conception, phk replaced ARC4 with SHA-512, but libmd did not have SHA2
at the time thus he built a copy of sha2.c for gbde.

Fast forward 3 years, cperciva adds SHA2 to libmd -- this makes gbde's
build of sha2.c redundant, but it's (understandably) overlooked.  Let's
simplify the gbde build now and just assume that libmd includes the most
optimal implementation.

Reported by: koobs (weird lto errors?)
Differential Revision: https://reviews.freebsd.org/D34668

14 months agobectl: document the -r flag to bectl
Kyle Evans [Thu, 20 Apr 2023 04:55:07 +0000 (23:55 -0500)]
bectl: document the -r flag to bectl

Independent of all of the commands, bectl itself takes an `-r` flag that
specifies the BE root to use.  This was originally added to facilitate
testing, but it was later discovered to be incredibly useful in other
scenarios; e.g., trying to recover some boot environments in rescue
media.

The "BE root" described here is the parent dataset that holds boot
environments, but I've no idea if that's an accepted definition for that
dataset.

Reviewed by: gallatin, imp, Pau Amma
MFC after: 1 week
Differential Review: https://reviews.freebsd.org/D39710

14 months agoVOP_CLOSE(): MNTK_EXTENDED_SHARED filesystems do not need excl lock
Konstantin Belousov [Mon, 24 Apr 2023 22:43:32 +0000 (01:43 +0300)]
VOP_CLOSE(): MNTK_EXTENDED_SHARED filesystems do not need excl lock

All in-tree implementations of VOP_CLOSE() for filesystems proclaiming
MNTK_EXTENDED_SHARED, are fine with the shared lock for the closed
vnode.  I checked the following implementations:
ffs
ext2
ufs
null
tmpfs
devfs
fdescfs
cd9660
zfs
It seems that initial addition of FWRITE check was due to necessity of
handling the VV_TEXT vnode vflag.  Since VOP_ADD_WRITECOUNT() only
requires shared lock, we can relax the locking requirement there.

Reviewed by: markj, Olivier Certner <olce.freebsd@certner.fr>
Tested by: Olivier Certner
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D39784

14 months agotcp_hpts: add missing "inline"
Gleb Smirnoff [Tue, 25 Apr 2023 22:18:26 +0000 (15:18 -0700)]
tcp_hpts: add missing "inline"

Fixes: c2a69e846fffb95271c0299e0a81e2033382e9c2

14 months agoChange the unit of srtt and rto to usec, inspired by these in struct "tcp_info"....
Cheng Cui [Tue, 25 Apr 2023 11:52:28 +0000 (07:52 -0400)]
Change the unit of srtt and rto to usec, inspired by these in struct "tcp_info". Therefore, no need hz and tcp_rtt_scale in the headline of the log. Update the man page as well.

Summary: Simplify srtt and rto values in siftr log.

Test Plan:
Tested in Emulab testbed:
cc@s1:~ % sudo sysctl net.inet.siftr
net.inet.siftr.port_filter: 0
net.inet.siftr.genhashes: 0
net.inet.siftr.ppl: 1
net.inet.siftr.logfile: /var/log/siftr.log
net.inet.siftr.enabled: 0
cc@s1:~ % sudo sysctl net.inet.siftr.port_filter=5001
net.inet.siftr.port_filter: 0 -> 5001
cc@s1:~ % sudo sysctl net.inet.siftr.enabled=1
net.inet.siftr.enabled: 0 -> 1
cc@s1:~ %
cc@s1:~ % iperf -c r1 -n 1M
------------------------------------------------------------
Client connecting to r1, TCP port 5001
TCP window size: 32.0 KByte (default)
------------------------------------------------------------
[  1] local 10.1.1.2 port 33817 connected with 10.1.1.3 port 5001
[ ID] Interval       Transfer     Bandwidth
[  1] 0.00-0.91 sec  1.00 MBytes  9.22 Mbits/sec
cc@s1:~ % sudo sysctl net.inet.siftr.enabled=0
net.inet.siftr.enabled: 1 -> 0

cc@s1:~ % ll /var/log/siftr.log
-rw-r--r--  1 root  wheel    91K Apr 25 09:38 /var/log/siftr.log
cc@s1:~ % cat /var/log/siftr.log
enable_time_secs=1682437111 enable_time_usecs=121115 siftrver=1.3.0 sysname=FreeBSD sysver=1400088 ipmode=4
o,0x00000000,1682437125.907343,10.1.1.2,33817,10.1.1.3,5001,1073725440,1073725440,2,0,0,0,0,2,536,0,1,672,1000000,32768,0,65536,0,0,0,0,0
i,0x00000000,1682437126.106759,10.1.1.2,33817,10.1.1.3,5001,1073725440,1073725440,2,0,0,0,0,2,536,0,1,672,1000000,32768,0,65536,0,1,0,0,0
o,0x00000000,1682437126.106767,10.1.1.2,33817,10.1.1.3,5001,1073725440,14480,2,65535,65700,9,9,4,1460,201000,1,16778209,803000,33580,0,65700,0,0,0,0,0
o,0x00000000,1682437126.107141,10.1.1.2,33817,10.1.1.3,5001,1073725440,14480,2,65535,65700,9,9,4,1460,201000,1,16778208,803000,33580,60,65700,0,0,0,0,0
...
i,0x00000000,1682437127.016754,10.1.1.2,33817,10.1.1.3,5001,1073725440,606109,1030,748544,66048,9,9,9,1460,100812,1,1008,303000,475948,0,65700,0,0,0,0,0
o,0x00000000,1682437127.016759,10.1.1.2,33817,10.1.1.3,5001,1073725440,606109,1030,748544,66048,9,9,10,1460,100812,1,1011,303000,475948,0,65700,0,0,0,0,0
disable_time_secs=1682437131 disable_time_usecs=767582 num_inbound_tcp_pkts=371 num_outbound_tcp_pkts=186 total_tcp_pkts=557 num_inbound_skipped_pkts_malloc=0 num_outbound_skipped_pkts_malloc=0 num_inbound_skipped_pkts_tcpcb=0 num_outbound_skipped_pkts_tcpcb=0 num_inbound_skipped_pkts_inpcb=0 num_outbound_skipped_pkts_inpcb=0 total_skipped_tcp_pkts=0 flow_list=10.1.1.2;33817-10.1.1.3;5001,

Reviewers: rscheff, tuexen
Approved by: rscheff, tuexen
Subscribers: imp, melifaro, glebius
Differential Revision: https://reviews.freebsd.org/D39803

14 months agoclang: Enable -Wdeprecated-non-prototype by default.
John Baldwin [Tue, 25 Apr 2023 21:09:21 +0000 (14:09 -0700)]
clang: Enable -Wdeprecated-non-prototype by default.

PR: 270919 (exp-run)
Reviewed by: dim, emaste
Differential Revision: https://reviews.freebsd.org/D39535

14 months agoprintf(9): clarify the description of %b
Mitchell Horne [Tue, 25 Apr 2023 20:26:36 +0000 (17:26 -0300)]
printf(9): clarify the description of %b

The bit values are numbers given in octal representation, not decimal,
as one might assume from the description. Same goes for the base,
although this has an example.

Reviewed by: emaste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39815

14 months agoarm64/disassem.c: Add support str/strb/strh instructions
Mykola Hohsadze [Tue, 18 Apr 2023 15:51:15 +0000 (12:51 -0300)]
arm64/disassem.c: Add support str/strb/strh instructions

Added disassembly support for each type of str/strb/strh instruction
encoding.

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39336

14 months agoarm64/disassem.c: Fix typo sxts to sxts and amount for TYPE_02
Mykola Hohsadze [Tue, 18 Apr 2023 15:50:58 +0000 (12:50 -0300)]
arm64/disassem.c: Fix typo sxts to sxts and amount for TYPE_02

The current implementation is wrong, since it unconditionally sets the
amount equal to the <size> field of the instruction. However, when the
<S> bit (scale) is not set, it must be zero.

Also fix a typo, sxts to sxtx, according to the Arm64 documentation.

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39334

14 months agoarm64/disassem.c: style and formatting
Mykola Hohsadze [Tue, 18 Apr 2023 15:50:33 +0000 (12:50 -0300)]
arm64/disassem.c: style and formatting

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D38899

14 months agotcp: move HPTS/LRO flags out of inpcb to tcpcb
Gleb Smirnoff [Tue, 25 Apr 2023 19:19:48 +0000 (12:19 -0700)]
tcp: move HPTS/LRO flags out of inpcb to tcpcb

These flags are TCP specific.  While here, make also several LRO
internal functions to pass tcpcb pointer instead of inpcb one.

Reviewed by: rrs
Differential Revision: https://reviews.freebsd.org/D39698

14 months agotcp_hpts: move HPTS related fields from inpcb to tcpcb
Gleb Smirnoff [Tue, 25 Apr 2023 19:18:33 +0000 (12:18 -0700)]
tcp_hpts: move HPTS related fields from inpcb to tcpcb

This makes inpcb lighter and allows future cache line optimizations
of tcpcb.  The reason why HPTS originally used inpcb is the compressed
TIME-WAIT state (see 0d7445193ab), that used to free a tcpcb, while the
associated connection is still on the HPTS ring.

Reviewed by: rrs
Differential Revision: https://reviews.freebsd.org/D39697

14 months agotcp: purge the input queue from tcp_discardcb()
Gleb Smirnoff [Tue, 25 Apr 2023 19:18:19 +0000 (12:18 -0700)]
tcp: purge the input queue from tcp_discardcb()

The purge was intentionally removed in a540cdca3183.  My assumption
was that the stacks that use the input queue always call the
tcp_handle_orphaned_packets() in their tfb_tcp_fb_fini method.
However, rack will skip doing that if t_fb_ptr is NULL and there are
scenarios when it is NULL, e.g. close(2) on a socket (but some
special close(2)).  Instead of working out all possible scenarios
let's put this safebelt back.

Reviewed by: rrs
Differential Revision: https://reviews.freebsd.org/D39696

14 months agoal_eth: Finish conversion to IfAPI
Justin Hibbits [Tue, 7 Mar 2023 19:19:44 +0000 (14:19 -0500)]
al_eth: Finish conversion to IfAPI

Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38955

14 months agoirdma: Convert to IfAPI
Justin Hibbits [Fri, 21 Apr 2023 17:04:00 +0000 (13:04 -0400)]
irdma: Convert to IfAPI

Mostly mechanical changes, with some reworking in irdma_cm for iterating
over interfaces and addresses.  Further rework by Bartosz Sobczak.

Reviewed by: bartosz.sobczak_intel.com
Tested by: mateusz.moga_intel.com
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38960

14 months agox86: whack pmspcv from GENERIC
Mateusz Guzik [Tue, 25 Apr 2023 17:56:10 +0000 (17:56 +0000)]
x86: whack pmspcv from GENERIC

The driver is enormous and rarely used.

      text      data       bss        dec         hex   filename
  23076646   1870505   4415872   29363023   0x1c00b4f   kernel.before
  20017433   1870305   4416000   26303738   0x1915cfa   kernel.after

People using the driver will need to add pmspcv_load="YES" to
their loader.conf.

Reviewed by: jhb
Relnotes: yes
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D39816

14 months agoal_eth: make function definitions consistent with declarations
Dimitry Andric [Sat, 22 Apr 2023 11:45:57 +0000 (13:45 +0200)]
al_eth: make function definitions consistent with declarations

The declarations for al_eth_lm_retimer_ds25_signal_detect() and
al_eth_lm_retimer_ds25_cdr_lock() say that these functions return
'al_bool', but the definitions actually return 'boolean_t'.

Make the definitions match the declarations.

Reviewed by: jhb, emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39759

14 months agocd9660.5: Fix the history section
Mateusz Piotrowski [Tue, 25 Apr 2023 17:36:34 +0000 (19:36 +0200)]
cd9660.5: Fix the history section

MFC after: 7 days
Sponsored by: Klara Inc.

14 months agoboolean_t: change to unsigned int to avoid signed bitfield warnings
Dimitry Andric [Tue, 25 Apr 2023 17:52:40 +0000 (19:52 +0200)]
boolean_t: change to unsigned int to avoid signed bitfield warnings

This is the final part, which actually makes boolean_t unsigned. Note
that we do not change its size, nor do we try to change it directly to
bool, since that results in a lot of regressions.

Converting the remaining instances of boolean_t to plain C99 bool can
now be done in a piecemeal fashion, after which boolean_t may hopefully
be retired.

MFC after: 1 week
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D39753

14 months agovm: fix a number of functions to match the expected prototypes
Dimitry Andric [Tue, 25 Apr 2023 17:52:26 +0000 (19:52 +0200)]
vm: fix a number of functions to match the expected prototypes

Noticed while attempting to make boolean_t unsigned: some vm-related
function declarations and defintions were using boolean_t where they
should have used int, and vice versa.

MFC after: 1 week
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D39753

14 months agozfs: make zfs_vfs_held() definition consistent with declaration
Dimitry Andric [Tue, 25 Apr 2023 17:43:48 +0000 (19:43 +0200)]
zfs: make zfs_vfs_held() definition consistent with declaration

Noticed while attempting to change boolean_t into an actual bool: in
include/sys/zfs_ioctl_impl.h, zfs_vfs_held() is declared to return a
boolean_t, but in module/os/freebsd/zfs/zfs_ioctl_os.c it is defined to
return an int. Make the definition match the declaration.

Obtained from: https://github.com/openzfs/zfs/commit/62cc9d4f6
Reviewed by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39753

14 months agovmm: Expose some more AVX512 CPUID bits to guests
Mark Johnston [Tue, 25 Apr 2023 17:33:08 +0000 (13:33 -0400)]
vmm: Expose some more AVX512 CPUID bits to guests

This is required to announce support for some accelerated AES
operations.  AVX512BW indicates support for the AVX512-FP16 extension
and AVX512VL indicates support for the use of AVX512 instructions with
vector lengths smaller than 512 bits.

VAES and VPCLMULQDQ extensions indicate that VEX-prefixed AES-NI and
pclmulqdq instructions are supported.

All of these bits are needed for OpenSSL to use VAES to accelerate
AES-GCM transforms.

Reviewed by: corvink, kib, jhb
MFC after: 2 weeks
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D39781