Currently we pass the raw pointer to the on-stack auxargs. This can
legitimately have fewer than AT_COUNT entries, so the use of
__min_size(AT_COUNT), i.e. static AT_COUNT, is inaccurate, and also
needlessly forces the callee to iterate over the elements to find the
entry for a given type. Instead we can just pass aux_info like we use
for everything else.
Note that the argument has been left unused by every callee since its
introduction in 4352999e0e ("Pass CPUID[1] %edx (cpu_feature), %ecx
(cpu_feature2) and CPUID[7].%ebx (cpu_stdext_feature), %ecx
(cpu_stdext_feature2) to the ifunc resolvers on x86.")
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D46276
Don't provide default linkage for jemalloc 3.0 compatability symbols.
We stopped declaring these interfaces with the introduction of jemalloc
4.0 prior to FreeBSD 11.0. Any code using them would have had to
declare them manually so stop declaring them and export the symbols
directly for compatability. Arguably they should be x86 only as they
were never declared on other Tier-1 architectures.
Reviewed by: imp, kib
Differential Revision: https://reviews.freebsd.org/D46407
The format for CTLTYPE_UINT is "IU" instead of "UI" as specified
in sysctl.9.
Reviewed by: cc, zlei
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46408
It is defined as const char[] in config.c which is auto generated by
usr.sbin/config/kernconf.tmpl .
While here prefer macro SYSCTL_CONST_STRING to avoid casting.
MFC after: 1 week
Callers of cdev_pager_free_page in the kernel always have object->type
== OBJT_MGTDEVICE. Define a function for them to call that skips the
runtime type check in cdev_pager_free.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D46389
Add a reset_adapter wrapper that picks the most suitable reset routine
internally. Use it in the fatal error handler as well as the sysctl
based reset.
MFC after: 1 week
Sponsored by: Chelsio Communications
This function is called by GCC 14 if a destructor invoked during
exception unwinding throws an exception.
Reviewed by: emaste
Obtained from: libcxxrt commit 391a3dcc1054e18c2f0dff4e14d6d79ac95399d7
Differential Revision: https://reviews.freebsd.org/D46004
This should stop attempts to use a unit which was not completely
initialized, but referenced by ACPI DMAR table during scoped devices
operions.
PR: 280817
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D46382
Previously 3 bytes of data from the heap could be leaked to ctl
consumers.
Reported by: Synacktiv
Reviewed by: asomers, mav
Sponsored by: The Alpha-Omega Project
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46091
While this won't be noticed by most users the time to zero the bss
while using instruction tracing in the Arm FVP models (simulators) is
noticeable.
Reduce this time by using a store-pair instruction to double the size
of memory we zero on each iteration of the loop.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D42733
* We can build the non-VHE code with branch protection, it is already
build as such in the module.
* Use the correct file name for the non-VHE exception .o file.
When FEAT_VHE is present the HCR_EL2 E2H field will be implemented. Try
setting this and checking if it's still set to decide if we can boot
into VHE mode or not.
When it is implemented the kernel will boot into EL2 rather than EL1
it currently boots to. The parts of the kernel that need to know if
they are in EL1 or EL2 have been updated other than the CoreSight
driver as there doesn't appear to be any way to currently use it and
it will be updated soon with the new HWT framework.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46087
This was added to not use the physical timer when E2H was set. As we
now use the correct timer in this case we can remove this extra check.
Tested by: kevans
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46086
RFC8275 defines a new attribute as an extension to NFSv4.2
called MODE_UMASK. This patch adds support for this attribute
to the NFSv4.2 client and server.
Since FreeBSD applies the umask above the VFS/VOP layer,
this attribute does not actually have any effect on the
handling of ACL inheritance, which is what it is designed for.
However, future changes to NFSv4.2 require support of it,
so this patch does that, resulting in behaviour identcal to
the mode attribute already supported.
MFC after: 2 months
This allows us to support symbols optionally available based on
configuration, not just on compiler built-in #defines.
Reviewed by: brooks, jrtc27
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45346
Use LIST_FOREACH_SAFE(), since the list element is removed from
the list in the loop body, zero out and inserted in the free list.
Reviewed by: rrs
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46383
A number of people have reported panics with it enabled by default,
possibly due to broken ACPI tables, which we do not handle well. D46382
is a potential fix for this issue.
Additionally DMAR is currently not compatible with bhyve passthrough
(see comment #10 in PR280817), with a draft patch to address that in
D25672.
Revert to disabling DMAR by default pending the resolution of those two
issues.
This reverts commit 3192fc3023.
PR: 280817
Sponsored by: The FreeBSD Foundation
There will at most lro_entries entries in the LRO hash table. So no
need to take lro_mbufs into account, which only results in the
LRO hash table being too large and therefore wasting memory.
Reviewed by: rrs
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46378
If UseLink() returns NULL, it is possible that Deletelink()
has already freed "grp", so check it out carefully.
PR: 269770
Reported by: Peter Much
X-MFC-With: 8132e95909
Add vlan tag match to RX FS SA and policy rules
and report SA lifetime counter on vlan interface
in case SA was installed on vlan interface
Existing code didn't have the net tag id as part of
the FS matching rules. This can cause applying
ipsec offload to the wrong interface.
This commit add tag id as part of FS matchers
and treat tag value 0 as no tag
Sponsored by: NVidia networking