extend the "mcast" pledge to allow multicast tweaks on ethernet frame sockets.
this is for lldpd, which wants to receive lldp packets sent to a
multicast address on interfaces as they attach at runtime, which
currently isn't allowed by pledge.
part of a bigger diff that was ok deraadt@
[IR] Add source location filtering to pass dumps (#203393)
Large dumps from `-print-after-all` can be hard to use when only a few
source lines matter. Function filtering can still print too much and can
miss code after inlining.
Add `-filter-print-source-locs` to limit IR and machine-function dumps
to matching debug locations. The option accepts file names or paths with
selected lines and ranges. It also follows inlined locations and works
with legacy and new pass managers.
tighten pledge_sockopt()s level/optname checks for different types of sockets
tl;dr: the meaning of the setsockopt and getsockopt level and optname
arguments are dependent on the type of the socket you're working
with, they can't be safely understood without knowing the address
family and protocol.
i think we've been able to ignore to socket address family and
protocol so far by luck, particularly because openbsd (henning)
removed a bunch of address families like AF_IPX and AF_NETATALK.
like AF_INET and AF_INET6, they use values from the wire protocol
as identifiers in the ABI, particularly sub protocol numbers like
IPPROTO_TCP. there's no guarantee these numbers don't overlap with
a protocol from another address family. netipx used IPXPROTO_SPX
like how AF_INET uses IPPROTO_IP, but it's only luck that their
values don't collide with each other or another protocol. this
principle applies to all socktypes though.
this is also reflected in the way sockopts are handled by protocol
[17 lines not shown]
[CIR][OpenCL] Emit OpenCL language version metadata in CIR
Emit OpenCL and C++ for OpenCL language version attributes from CIRGen. Preserve the compatible OpenCL version and the C++ for OpenCL version separately so later lowering does not infer one from the other.
Assisted-by: Codex / GPT-5.6 Sol
[CIR][OpenCL] Lower OpenCL language version metadata to LLVM dialect
Propagate CIR OpenCL language version module attributes as LLVM dialect named metadata before LLVM IR translation.
Assisted-by: Codex / GPT-5.6 Sol
[CIR][OpenCL] Add OpenCL language version module attributes
Add structured CIR module attributes for OpenCL and C++ for OpenCL language versions. Verify their module-level placement and version components so lowering can consume explicit source-language version state.
Assisted-by: Codex / GPT-5.6 Sol
ixl: Reset VSI statistics after initial sampling
The initial statistics update runs before the PF VSI has obtained its
firmware-assigned statistics counter index. Discard that provisional
VSI baseline so the first update after initialization records the
correct hardware counter.
Without this reset, subtracting a larger provisional value from a newly
selected counter can be mistaken for a 32-bit wrap and report nearly
UINT32_MAX receive drops immediately after boot.
Reported by: Daniel Braniss <danny at cs.huji.ac.il>
Tested by: Daniel Braniss <danny at cs.huji.ac.il>
Obtained from: Intel ixl 1.14.2
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59336
[LoongArch][MC] Add assembly syntax highlighting for LoongArch (#218946)
This PR adds color highlighting of registers and immediates in LoongArch
disassembly.
This is similar to #65853.
[RISCV] Andes: model fast unaligned accesses (#220756)
Mark the Andes 45 tuning profile as supporting efficient unaligned
scalar loads and stores. This lets fixed-size alignment-one copies lower
to scalar instructions instead of a memcpy call. On these in-order
cores, where performance is almost synonymous with instruction count,
this is a material win.
[AArch64] Form CCMP for CBB and CBH
AArch64ConditionalCompares forms CMP/CCMP chains to transform patterns
such as
Head Head
/ | CmpBB
/ | / |
| CmpBB => / |
| / | Tail |
| / | | |
Tail | | |
| | | |
... ... ... ...
where Head is terminated by a conditional branch and CmpBB contains
a cmp + conditional branch.
We usually try to split any fused conditional branches to be able to
[8 lines not shown]
[AArch64][CMPBR] Fix splitting of CBB/CBH instructions into ext + cmp
We falsely split CBB/CBH instructions by explicitly extending the
second register operand instead of the first one, leading to the
following, wrong codegen:
cbh $wn, $wm, cc, trgt => sxth $wt, $wm
cmp $wn, $wt, cc, sxth
Correct is
cbh $wn, $wm, cc, trgt => sxth $wt, $wn
cmp $wt, $wm, cc, sxth
since cmp with extended register extends it's second, not its first
operand.
[AArch64] Allow forming CCMPs for CB branches
AArch64ConditionalCompares currently doesn't consider FEAT_CMPBR CB
instructions when trying to form CCMPs. This leads to a lot more
branches which is usually hurtful for performance.
The patchs adds handling CB instructions, just like we do for other
fused conditional branches such as CBZ or CBNZ.
[mlir][openacc] Add isCompilerGenerated to GlobalVariableOpInterface (#221096)
This function is used to determine if a global is compiler generated or
coming from user variables. This is useful when determining the handling
of globals for unified memory mode.
[AArch64] Fix missing :lo12: on the catchret address pair (#219200)
`llc -mtriple=aarch64-pc-windows-msvc` emits assembly it cannot assemble
itself.
A function with a `catchret` materialises its continuation block like
this:
```asm
"?catch$2@?0?f at 4HA":
adrp x0, .LBB0_1
add x0, x0, .LBB0_1
ret
```
Pipe that back through `llvm-mc` and you get:
```
error: expected compatible register, symbol or integer in range [0, 4095]
add x0, x0, .LBB0_1
[43 lines not shown]
[clang][OpenMP] Add explicit default libomp value to test. (#221098)
The test OMPInvariantPredicateBoundOnIntraTileLoop, in AttrTest.cpp uses
'-fopenmp' without supplying an explcit value. In some places the
default value is 'libomp', which works just fine for this test. But in
envorinments where 'libomp' is not the default value (e.g. places that
use 'libgomp' by default) the test fails. This fixes that issue by
explicitly telling the test to use 'libomp'.
Compose a new imsg when relaying terminate to vmd(8) control.
Instead of forwarding the imsg, which was already consumed in the
parent vmd process, compose a new one to the control process. When
vmd was refactored to use the new imsg api for consuming the payload
instead of reading directly from the underlying ibuf, it caused
proc_forward_imsg() to forward incomplete data.
Instead of mucking about with the underlying ibuf and rewinding it,
update the only case of the consume-then-forward pattern to compose
a new imsg by using proc_compose_imsg().
Original diff and issue from Nick Owens.
18381 don't log about async event failure on NVMe drive pull
Reviewed by: Andy Fiddaman <illumos at fiddaman.net>
Reviewed by: Hans Rosenfeld <rosenfeld at grumpf.hope-2000.org>
Approved by: Robert Mustacchi <rm at fingolfin.org>