netmap: Use ckdint.h helpers to check for overflow
This addresses a bug in the addition overflow check added in commit
319414a926af ("netmap: Handle overflow when computing ring sizes"): that
overflow wasn't actually caught by the check because "len" is promoted
to size_t.
PR: 297300
Fixes: 319414a926af ("netmap: Handle overflow when computing ring sizes")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58896
pf: Fix fallout from the STATE_LOOKUP macro removal
Commit 8572367b6814 ("pf: remove STATE_LOOKUP") introduced two seemingly
unintentional changes with respect to divert(4)-injected packets (i.e.,
the PACKET_LOOPED case): we no longer return the matching state, and
direct callers of pf_find_state() now treat matches of diverted packets
the same as having no matching state at all.
This seems inadvertent, and breaks certain rulesets which use divert-to.
Fix them, and add a regression test case.
Fixes: 8572367b6814 ("pf: remove STATE_LOOKUP")
Reviewed by: kp
MFC after: 2 weeks
Sponsored by: OPNsense
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D59015
[SPIRV] Fix -Wunused-variable (#219207)
These variables are only used in assertions but are used multiple
times/do not make sense to inline, so mark them [[maybe_unused]].
NAS-142117 / 26.0.0-RC.1 / Force ACL application on app-owned ix-volume paths (by Qubad786) (#19546)
## Problem
The served schema hides `force` for ix-volumes and defaults it to true,
but clients submit an explicit false and middleware honours it, so
applying an ACL fails with `path contains existing data` as soon as the
app has written to its own volume. Once that false is persisted,
validation rejects the config before normalization can correct it.
The bad value comes from the UI, which honours `hidden` only on the
field carrying it: for an ix-volume the whole `options` block is hidden,
so the form still builds a `force` control, seeds it with its own
boolean default of false rather than the schema's true, and submits that
for a system managed dataset.
## Solution
ix-volumes are system managed, so anything in them is managed bys -
confirmed with Stavros that `force` should always be true for them when
an ACL is wanted.
[19 lines not shown]
[X86] Add missing checks for attribute target testing (#218697)
Attribute target testing was missing a bunch of checks -- this adds
them. One test (attr-target-x86-mmx.c) is now redundant.
Patch done with usage of claude code
---------
Co-authored-by: Simon Pilgrim <llvm-dev at redking.me.uk>
NAS-142662 / 27.0.0-BETA.1 / Add s3 to audit service (#19547)
Add the S3 service into our auditing framework. This isn't wired up yet
but is added here to keep review manageable.
(cherry picked from commit e192549a887d66de9831e393ce834b8565e855b9)
NAS-142662 / 27.0.0-BETA.1 / Add s3 to audit service (#19547)
Add the S3 service into our auditing framework. This isn't wired up yet
but is added here to keep review manageable.
security/libgcrypt: Fix build on hardware lacking SM4-EVEX
The failure comes from cipher/sm4-intel-avx512-amd64.S, which uses the
EVEX-encoded (zmm) SM4 instructions. The base system assembler only
knows the VEX/ymm forms, and configure's SM4 probe only tests those, so
the AVX512 implementation is assembled anyway and breaks.
This patch extends the probe with the zmm forms, so the Intel SM4
assembly is disabled automatically where the assembler lacks SM4-EVEX.
GFNI-based SM4 and all other AVX512 code remain enabled, and the check
heals itself once LLVM gains these instructions.
PR: 297987
ifconfig: Add netlink support for reading ifgroup
Read interface groups from IFLAF_GROUP netlink attribute.
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D58644
rtnetlink: Add FreeBSD-specific IFLAF_GROUP support
Netlink IFLA_GROUP works with a single group id, in our
implementation an interface can be joined to multiple groups
and it works with group name.
Store interface groups in IFLAF_GROUP attribute.
Reviewed by: glebius, melifaro
Discussed with: markj
Differential Revision: https://reviews.freebsd.org/D58643
UPDATING: Fix entry for getgroups(2)/setgroups(2)
Fix a typo, grammar, and generally rephrase for better clarity.
Fixes: 3463f02706db ("UPDATING: add an entry for [gs]etgroups")
MFC after: 1 day
MFC to: stable/15
Sponsored by: The FreeBSD Foundation
[libc++] Use new/delete expressions for memory allocation in <any> (#219153)
This simplifies the implementation a bit more and avoids some includes.
This is a step towards removing `__libcpp_allocate`.
[Clang] Cast UBSan globals to appropriate generic address space (#219023)
Summary:
For GPU targets trying to use these checks, it would cause some issues.
the RTL function takes a flat pointer, but the global would be generated
as AS(1) with no cast. This seemed to work fine, mostly because for
AMDGPU the flat and global address spaces are byte identical, but it's
broken heavior. It lead to the backend not being able to fully identify
the call graph because it was not calling the 'right' function. Just add
an address space cast, these are no-ops in the vast majority of cases.
[C++20] [Modules] Handling merging predefined decls from std (#219151)
Close https://github.com/llvm/llvm-project/issues/218152
This was only reported in windows as MSSTL chose to implement std module
by wrapping the STL into extern "C++", which is different from libstdc++
and libc++.
But technically this is not specific to windows and we're able to
preoduce it in linux although we won't face it in linux.