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
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
A signed one-bit wide bit-field can take only the values 0 and -1. Clang
16 introduced a warning that "implicit truncation from 'int' to a
one-bit wide bit-field changes value from 1 to -1". Fix the warnings by
using C99 bool.
Reported by: Clang 16
Reviewed by: emaste, jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39705
This reverts commit 4c856fb333.
To quote a pending upstream PR:
This reverts commit 4c856fb to resolve a newly introduced deadlock which
in practice is more disruptive that the issue this commit intended to
address.
Causes deadlocks described in https://github.com/openzfs/zfs/issues/14775
Sponsored by: Rubicon Communications, LLC ("Netgate")
Usage:
zpool set org.freebsd:comment="this is my pool" poolname
Tests are based on zfs_set's user property tests.
Also stop truncating property values at MAXNAMELEN, use ZFS_MAXPROPLEN.
Reviewed by: markj
Approved by: markj
Co-authored-by: Mateusz Piotrowski <0mp@FreeBSD.org>
Obtained from: OpenZFS 8eae2d214c Add support for zpool user properties
Sponsored by: Beckhoff Automation GmbH & Co. KG.
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D39657
This is a temporary measure until a better fix is sorted out.
Upstream report: https://github.com/openzfs/zfs/issues/14785
Reported by: Evgeniy Khramtsov
Sponsored by: Rubicon Communications, LLC ("Netgate")
This brings in the following commits:
commit 584b574a3b16c6772c8204ec1d1c957c56f22a87
12174 i86pc: variable may be used uninitialized
Author: Toomas Soome <tsoome@me.com>
Reviewed by: John Levon <john.levon@joyent.com>
Reviewed by: Andrew Stormont <astormont@racktopsystems.com>
Approved by: Dan McDonald <danmcd@joyent.com>
commit a25e615d76804404e5fc63897a9196d4f92c3f5e
12371 dis x86 EVEX prefix mishandled
12372 dis EVEX encoding SIB mishandled
12373 dis support for EVEX vaes instructions
12374 dis support for EVEX vpclmulqdq instructions
12375 dis support for gfni instructions
Author: Robert Mustacchi <rm@fingolfin.org>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Joshua M. Clulow <josh@sysmgr.org>
commit c1e9bf00765d7ac9cf1986575e4489dd8710d9b1
12369 dis WBNOINVD support
Author: Robert Mustacchi <rm@joyent.com>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@joyent.com>
commit e4f6ce7088a7dd335b9edf4774325f888692e5fb
10893 Need support for new Cascade Lake Instructions
Author: Robert Mustacchi <rm@joyent.com>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Gordon Ross <gwr@nexenta.com>
commit cff040f3ef42d16ae655969398f5a5e6e700b85e
10226 Need support for new EPYC ISA extensions
Author: Robert Mustacchi <rm@joyent.com>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Reviewed by: Jason King <jason.king@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Dan McDonald <danmcd@joyent.com>
commit d242cdf5288b86d9070d88791c8ee696612becdc
8492 AVX512 dis - legacy logical instructions
Author: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
commit 81b505b772ab015c588c56bb116239ee549b6eee
8384 AVX512 dis - EVEX prefix support
8385 32-bit avx dis test mishandles EVEX prefix
8386 32-bit bound dis is incorrect
Author: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
commit 92381362ae635a3bea638d87b7119f1623b6212e
8319 dis support for new xsave instructions
Author: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
commit a4e73d5d60e566669c550027fae2b1d87b4be2b4
8240 AVX512 dis - opmask instruction support
Author: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
959b2dfd39979fe8a9a315a52741d009eb168822
7825 want avx dis tests
7826 PCLMULQDQ psuedo-ops aren't properly described in dis
7827 dis tests for f16c, movbe, cpuid, msr, tsc, fence instrs
7828 sysenter and sysexit dis should be allowed in 64-bit x86
Author: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
MFC after: 2 weeks
Add a regression test for a718431c30 ("lookup(): ensure that
openat("/", "..", O_RESOLVE_BENEATH) fails").
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Packet Mark is an analogue to ipfw tags with O(1) lookup from mbuf while
regular tags require a single-linked list traversal.
Mark is a 32-bit number that can be looked up in a table
[with 'number' table-type], matched or compared with a number with optional
mask applied before comparison.
Having generic nature, Mark can be used in a variety of needs.
For example, it could be used as a security group: mark will hold a security
group id and represent a group of packet flows that shares same access
control policy.
Reviewed By: pauamma_gundo.com
Differential Revision: https://reviews.freebsd.org/D39555
MFC after: 1 month
This change adds netlink create/modify/dump interfaces to the `if_clone.c`.
The previous attempt with storing the logic inside `netlink/route/iface_drivers.c`
did not quite work, as, for example, dumping interface-specific state
(like vlan id or vlan parent) required some peeking into the private interfaces.
The new interfaces are added in a compatible way - callers don't have to do anything
unless they are extended with Netlink.
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D39032
MFC after: 1 month
The change is intended to be fully transparent to the users.
Similarly to route(8) and netstat(8), ndp can be build without
netlink by defining WITHOUT_NETLINK in make.conf.
Differential Revision: https://reviews.freebsd.org/D39720
The change is intended to be fully transparent to the users.
Similarly to route(8) and netstat(8), arp can be build without
netlink by defining WITHOUT_NETLINK in make.conf.
Differential Revision: https://reviews.freebsd.org/D39720
The manual describes "if*" form only while kernel uses fnmatch(3)
and allows use for more versatile shell-like patterns.
Note that explicitly and provide an example.
MFC after: 3 days
Allow new features to be supported without changing the size of
existing structures.
Reviewed by: kib
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D39777
The MT2 uses a compact report format, but otherwise is similar in many
ways to the internal trackpads, it even uses the same mode switching
commands.
Reviewed by: wulf
MFC after: 1 month
Differential revision: https://reviews.freebsd.org/D34437
The pseudo file systems (devfs, fdescfs, procfs, etc.) report total
and available blocks and inodes despite being synthetic with no
underlying storage device to which those values could be applied.
The current code of these file systems tends to report a fixed number
of total blocks but no free blocks, and in the case of procfs,
libprocfs, linsysfs also no free inodes.
This can be irritating in e.g. the "df" output, since 100% of the
resources seem to be in use, but it can also create warnings in
monitoring tools used for capacity management.
This patch makes these file systems return the same value for the
total and free parameters, leading to 0% in use being displayed by
"df". Since there is no resource that can be exhausted, this appears
to be a sensible result.
Reviewed by: mckusick
Differential Revision: https://reviews.freebsd.org/D39442
Some combinations of FAT12 file system parameters could cause a kernel
panic due to an unmapped access if the size of the FAT was larger than
the CPU page size. The reason is that FAT12 uses 3 bytes to store
2 FAT pointers, leading to partial FAT pointers at the end of buffers
of a size that is not a multiple of 3.
With a typical page size of 4 KB, this caused the FAT entry at byte
offsets 4095 and 4096 to cross the page boundary, with only the first
page mapped. This was fixed by adjusting the mapping to always cover
both bytes of each FAT entry.
Testing revealed 2 other inconsistencies that are fixed by this commit:
1) The calculation of the size of the data area did not take into
account the fact that the first two data block numbers are reserved
and that the data area starts with block 2. This could cause a
FAT12 file system created with the maximum supported number of
blocks to be incorrectly identified as FAT16.
2) The root directory does not take up space in the data area of a
FAT12 or FAT16 file system, since it is placed into a reserved
area outside of that data area. This commits makes stat() report
the logical size of the root directory, but with 0 blocks allocated
from the data area.
PR: 270587
Reviewed by: mckusick
Differential Revision: https://reviews.freebsd.org/D39386
If we need to set MK_host_egacy=yes we might need to check it
in local.toolchain.mk so set it earlier in local.meta.sys.env.mk
Leave the default MK_host_egacy?=no in local.sys.mk so it can
be tested in Makefiles without concern for build mode.
Add all acpi tables to qemus acpi table loader. This passes the acpi
tables by fwcfg to the guest.
Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38439
The hypervisor is aware of all system properties. For the guest bios
it's hard and complex to detect all system properties. For that reason,
it would be better if the hypervisor creates acpi tables instead of the
guest. Therefore, the hypervisor has to send the acpi tables to the
guest. At the moment, bhyve just copies the acpi tables into the guest
memory. This approach has some restrictions. You have to keep sure that
the guest doesn't overwrite them accidentally. Additionally, the size of
acpi tables is limited.
Providing a plain copy of all acpi tables by fwcfg isn't possible. Acpi
tables have to point to each other. So, if the guest copies the acpi
tables into memory by it's own, it has to patch the tables. Due to
different layouts for different acpi tables, there's no generic way to
do that. For that reason, qemu created a table loader interface. It
contains commands for the guest for loading specific blobs into guest
memory and patching those blobs.
This commit adds a qemu_loader class which handles the creation of qemu
loader commands. At the moment, the WRITE_POINTER command isn't
implement. It won't be required by bhyve's acpi table generation yet.
Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38438
Relevant/interesting changes:
* make.1: document seemingly unexplained Error code 6.
o compat.c: CompatDeleteTarget skip .PHONY targets to be
consistent with JobDeleteTarget.
o job.c: fix memory leak in handling sysv :from=to modifiers
o unit tests for .MAKE.META.IGNORE_{FILTER,PATHS,PATTERNS}
o var.c: fix parsing of unevaluated subexpressions with
unbalanced '{}'
o cond.c: reduce complexity of evaluating expressions
This is the historical (and still current) behavior, as well as that of
NetBSD, OpenBSD, illumos and Linux (getdents()/getdents64()).
Reviewed by: kib
MFC after: 3 days