sigqueue: In capability mode, only allow signalling self
This is copied from the check in kern_kill.
Reviewed by: markj, oshogbo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57244
test_zap: cover all core ZAP operations
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18586
zap: expose _by_dnode() variants of remaining core functions
Exposes the remaining internal implementation functions:
- zap_update_by_dnode()
- zap_length_by_dnode()
- zap_get_stats_by_dnode()
And creates zap_contains_by_dnode(), followng the same structure as the
other functions.
Together, these complete the "core" ZAP _by_dnode() API for the test
suite to use.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18586
unit: TOPT make arg to pass test options through to the test binary
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18586
unit: zero coverage counters before coverage run
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18586
ZTS/zinject: cover label, object, delay, panic and verify effect (#18579)
* ZTS/zinject: cover label, object, delay, panic and verify effect
Cover the device, label, object, delay and panic injection modes:
every valid value is accepted and unknown values are rejected. A
final pass confirms that registered injections execute by watching
the inject counter advance after triggering the desired injected
error.
Signed-off-by: Christos Longros <chris.longros at gmail.com>
* ZTS/zinject: add author copyright
Signed-off-by: Christos Longros <chris.longros at gmail.com>
---------
Signed-off-by: Christos Longros <chris.longros at gmail.com>
[lld][MachO] Fix SIGBUS crash in saveOrHardlinkBuffer (#198381)
This change removes a hardlink in saveOrHardlinkBuffer if the
hardlink already exists.
On Mac, -object_path_lto files are hardlinked to the cache when
possible. If the hardlink fails, the saveOrHardlinkBuffer method
falls back to saveBuffer instead.
saveBuffer() opens the file that is being written to as a
raw_fd_ostream object, which truncates a file when opening if the
file already exists.
Most of the time this is not an issue, however, if the hardlink
fails because it actually already exists, AND the hardlink exists
specifically between the -object_path_lto file and the cache file,
then when the file is opened and truncated, we also accidentally
truncate the file we are trying to read from.
[8 lines not shown]
[AMDGPU] Implement -amdgpu-spill-cfi-saved-regs
These spills need special CFI anyway, so implementing them directly
where CFI is emitted avoids the need to invent a mechanism to track them
from ISel.
Change-Id: If4f34abb3a8e0e46b859a7c74ade21eff58c4047
Co-authored-by: Scott Linder scott.linder at amd.com
Co-authored-by: Venkata Ramanaiah Nalamothu VenkataRamanaiah.Nalamothu at amd.com
[AMDGPU] Implement CFI for CSR spills
Introduce new SPILL pseudos to allow CFI to be generated for only CSR
spills, and to make ISA-instruction-level accurate information.
Other targets either generate slightly incorrect information or rely on
conventions for how spills are placed within the entry block. The
approach in this change produces larger unwind tables, with the
increased size being spent on additional DW_CFA_advance_location
instructions needed to describe the unwinding accurately.
Change-Id: I9b09646abd2ac4e56eddf5e9aeca1a5bebbd43dd
Co-authored-by: Scott Linder <scott.linder at amd.com>
Co-authored-by: Venkata Ramanaiah Nalamothu <VenkataRamanaiah.Nalamothu at amd.com>
[AMDGPU] Implement CFI for non-kernel functions
This does not implement CSR spills other than those AMDGPU handles
during PEI. The remaining spills are handled in a subsequent patch.
Change-Id: I5e3a9a62cf9189245011a82a129790d813d49373
Co-authored-by: Scott Linder <scott.linder at amd.com>
Co-authored-by: Venkata Ramanaiah Nalamothu <VenkataRamanaiah.Nalamothu at amd.com>
[AMDGPU] Emit entry function Dwarf CFI
Entry functions represent the end of unwinding, as they are the
outer-most frame. This implies they can only have a meaningful
definition for the CFA, which AMDGPU defines using a memory location
description with a literal private address space address. The return
address is set to undefined as a sentinel value to signal the end of
unwinding.
Change-Id: I21580f6a24f4869ba32939c9c6332506032cc654
Co-authored-by: Scott Linder <scott.linder at amd.com>
Co-authored-by: Venkata Ramanaiah Nalamothu <VenkataRamanaiah.Nalamothu at amd.com>
[MC][Dwarf] Add custom CFI pseudo-ops for use in AMDGPU
While these can be represented with .cfi_escape, using these pseudo-cfi
instructions makes .s/.mir files more readable, and it is necessary to
support updating registers in CFI instructions (something that the
AMDGPU backend requires).
Change-Id: I763d0cabe5990394670281d4afb5a170981e55d0
[Clang] Default to async unwind tables for amdgcn
To avoid codegen changes when enabling debug-info (see
https://bugs.llvm.org/show_bug.cgi?id=37240) we want to
enable unwind tables by default.
There is some pessimization in post-prologepilog scheduling, and a
general solution to the problem of CFI_INSTRUCTION-as-scheduling-barrier
should be explored.
Change-Id: I83625875966928c7c4411cd7b95174dc58bda25a
[MIR] Error on signed integer in getUnsigned
Previously we effectively took the absolute value of the APSInt, instead
diagnose the unexpected negative value.
Change-Id: I4efe961e7b29fdf1d5f97df12f8139aac12c9219
AMDGPU/GlobalISel: RegBankLegalize rules for wave_shuffle (#196412)
Add uniform and divergent RegBankLegalize rules for wave shuffle. When
wave_shuffle is uniform, it is folded by AMDGPUUniformIntrinsicCombine
before reaching RegBankLegalize, to its value operand when value is
uniform, or to amdgcn_readlane when only idx is uniform. Add a test to
disable UniformIntrinsicCombine so we can verify and test for uniform
rule.
[libc++] Mark string.capacity/over_max_size.pass.cpp as UNSUPPORTED on old dylibs (#199682)
This test is currently failing in the CI for unknown reasons, likely
related to the setup and not a recent patch. Disable it for now to get
the CI green again.
[SSAF][WPA] Bounds propagation graph is a supergraph of the pointer-flow graph (#198889)
Background: The whole-program UnsafeBufferReachableAnalysis propagates
bounds between pointers. It uses the pointer-flow graph extracted and
linked from translation units.
This commit patches the gap between the semantics of bounds propagation
and pointer-flow: the bounds propagation graph is a super graph of the
pointer-flow graph in that a pointer-flow graph edge `(src, i) -> (dst,
j)` is the projection of a finite set of bounds propagation graph edges
`{(src, i+d) -> (dst, j+d) | 0 <= d < UB}` for a small constant upper
bound UB. See the following example for the idea:
```
void f(int ***p, int **q) {
*p = q;
(**p)[5] = 0;
}
```
[6 lines not shown]
[lldb-dap][NFC] Use GetStringValue helper (#199672)
I noticed some inconsistency in working with
`SBStructuredData.GetStringValue` (e.g. use `length + 1` or `length`),
so it would be better to remove that code duplication and use common
helper (`GetStringValue`) to do this routine.
[clang] Add -fno-debug-record-sysroot (#192541)
This enables excluding the absolute path to the sysroot from debug info
for reproducible builds. These fields are used by lldb, which also has
fallbacks since it's possible these paths don't exist on the machine
doing the debugging when built remotely anyways.
This was also possible using
`-fdebug-prefix-map=/path/to/Xcode.app=/some/path`
but depending on the environment you might not be able to easily pass
that with the user specific developer directory path.
Assisted by: claude