[orc-rt] Use the Error matchers in BootstrapInfoTest (#228305)
Use the Error matchers introduced in 4c8a437d0487 to clean up error
checks in BootstrapInfoTest.
[InstCombine] Fix profile propagation in intrinsic-select.ll (#228295)
In these cases we're creating a new Select with the exact same
condition, so we can just copy the metadata.
kern: Fix mmioctl() to return ENOTTY for unknown devices
The default case for unknown devices handles /dev/null and previously
returned ENODEV for tcsetattr/tcgetattr/tc* requests, which should be
ENOTTY as specified by POSIX (as well as documented in the man pages).
Fix the bug by correcting mmioctl() to return ENOTTY in the default
case.
Patch-by: jpikin, sigttou (David Bidner)
Bug: https://bugs.dragonflybsd.org/issues/3252
w(1) - Do not warn about non-existent tty lines
ttystat() called warn() when stat("/dev/<line>") failed, so X11 sessions
(ut_line like ":16") printed a spurious
"w: /dev/:16: No such file or directory".
Return NULL silently unless the line is an existing character device.
Matches FreeBSD (see commits 21632754d652d20a4618cac0b52ebe7d8e790865,
d0d0355e4dd9fa060443d3f1b1a223118ff68827).
Fixes #3298
loader: Clear CR0.WP during EFI kernel relocation
Firmware on an HP ProDesk 600 G4 leaves relocation destination pages
read-only. efi_copy_finish() faults at 0x1001000 with page-fault error
code 3 (supervisor write, protection violation) while CR0.WP is set.
Save CR0 and clear WP around the relocation copy after ExitBootServices,
with interrupts disabled. Restore CR0 before entering the kernel. Reject
active CET before leaving boot services, since it prevents clearing WP.
Bug: https://bugs.dragonflybsd.org/issues/3427
w(1) - Do not warn about non-existent tty lines
ttystat() called warn() when stat("/dev/<line>") failed, so X11 sessions
(ut_line like ":16") printed a spurious
"w: /dev/:16: No such file or directory".
Return NULL silently unless the line is an existing character device.
Matches FreeBSD (see commits 21632754d652d20a4618cac0b52ebe7d8e790865,
d0d0355e4dd9fa060443d3f1b1a223118ff68827).
Fixes #3298
[StaticDataLayout] Only emit JT prefixes if enabled (#228222)
Previously we were unconditionally emitting section prefixes for jump
tables. This meant that even with SDP disabled, we would end up with a
.rodata.unlikely section. This is somewhat confusing and also makes
ablation experiments harder.
sbappendcontrol never fails; nix the return value indicating success.
Cleanup which in principle changes the module ABI (I doubt there are
any modules out there that actually use sbappendcontrol, though rump
does use it across libraries) after:
PR kren/60832: AF_LOCAL stream: sendmsg() with SCM_RIGHTS silently
drops data and descriptors but reports success
XXX kernel revbump due to API/ABI change -- not for pullup
sendmsg(2): Don't fail with ENOBUFS on fd passing.
We don't fail with ENOBUFS if we're not fd-passing -- we just block
or fail earlier on with EAGAIN; no reason to invent a new failure
mode just for the fd-passing case.
Whether we should have _any_ path that checks the receiving socket's
receive buffer limit is another question, but it's silly for it to:
1. apply _only_ when passing fds,
2. trip only when the kernel internally expands the buffer, and/or
3. fail with ENOBUFS instead of blocking or failing with EAGAIN.
This change essentially matches FreeBSD's subversion r337328:
commit 5b0480f2cca0a4a04f21055ed769be93f11348de
Author: Mark Johnston <markj at FreeBSD.org>
Date: Sat Aug 4 20:26:54 2018 +0000
Don't check rcv sockbuf limits when sending on a unix stream socket.
[25 lines not shown]
sendmsg(2): Treat ENOBUFS on fd passing as a bug.
PR kern/60832: AF_LOCAL stream: sendmsg() with SCM_RIGHTS silently
drops data and descriptors but reports success
Add NTS support for NTP servers
- Add `nts` to system.ntpserver, rendered as chrony's `nts` option
- Without `force`, probe NTS-KE (TLS 1.3, ALPN ntske/1) and the
negotiated NTP server on save
- Cap `maxpoll` at 21 for NTS servers
- Render `authselectmode prefer` in chrony.conf
- Add system.security `require_nts` (default off), rendered as
`authselectmode require`
- With `require_nts`: refuse enabling without an NTS server, saving
servers without NTS and deleting the last NTS server
- Restart chronyd on both controllers when `require_nts` changes
- Migration: add `ntp_nts` and `require_nts`; add time.cloudflare.com
and ntppool1.time.nl (NTS) to stock NTP configs, except AD/IPA members
- Read NTS key state from the chronyd socket (AUTH_DATA,
NTP_SOURCE_NAME); name failing NTS servers in the NTP health alert
- Add NTS-aware advice to directory services clock skew errors
- Use absolute clock offsets in the NTP alert and AD health check
- Reject line breaks and whitespace in ntpserver `address`; skip such
[6 lines not shown]
[llvm-profdata] Propagate Error in loadInput and mergeWriterContexts
Propagate Error from loadInput and mergeWriterContexts in mergeInstrProfile,
supplementInstrProfile, and overlapInstrProfile. In mergeInstrProfile's
ThreadPool, catch errors from worker threads, stop scheduling new jobs,
and return the first encountered fatal error.
Ensure ~WriterContext() consumes any pending unhandled errors in
WriterContext::Errors upon destruction.
Not NFC as destructors are run on the stack and ThreadPool workers exit
earlier on error.
With all subcommands propagating llvm::Error to main, exitWithError,
exitWithErrorCode, and the LSan leak suppression workaround are no
longer needed.
Assisted-by: Gemini
loader: Clear CR0.WP during EFI kernel relocation
Firmware on an HP ProDesk 600 G4 leaves relocation destination pages
read-only. efi_copy_finish() faults at 0x1001000 with page-fault error
code 3 (supervisor write, protection violation) while CR0.WP is set.
Save CR0 and clear WP around the relocation copy after ExitBootServices,
with interrupts disabled. Restore CR0 before entering the kernel. Reject
active CET before leaving boot services, since it prevents clearing WP.
Bug: https://bugs.dragonflybsd.org/issues/3427
kern: Fix mmioctl() to return ENOTTY for unknown devices
The default case for unknown devices handles /dev/null and previously
returned ENODEV for tcsetattr/tcgetattr/tc* requests, which should be
ENOTTY as specified by POSIX (as well as documented in the man pages).
Fix the bug by correcting mmioctl() to return ENOTTY in the default
case.
Patch-by: jpikin, sigttou (David Bidner)
Bug: https://bugs.dragonflybsd.org/issues/3252
[NFCI][llvm-profdata] Propagate Error in merge subcommand
Change merge_main and its helpers to return Error and handle it
with reportError in main.
Not NFC as destructors are run on the stack.
Assisted-by: Gemini
[AMDGPU] Fix missed WMMA C-operand co-exec hazard
The gfx1250 WMMA co-execution hazard check treats only A, B and the
SWMMAC index as registers the in-flight MMA still reads. C (src2 of a
non-SWMMAC WMMA) is missing, so a VALU scheduled into the MMA's shadow
can clobber C and the MMA consumes the new value.
This is latent while C is tied to vdst, since the existing D check then
covers it. It miscompiles where the tie does not hold: for
v_wmma_bf16f32_16x16x32_bf16, whose D is narrower than C, and for the
_threeaddr form of any WMMA.
Add src2 to the checked set for non-SWMMAC WMMAs.
lang/hare: New package
Hare is a systems programming language designed to be simple, stable, and
robust. Hare uses a static type system, manual memory management, and a
minimal runtime. It is well-suited to writing operating systems, system
tools, compilers, networking software, and other low-level, high performance
tasks.
[bazel] Use `includes` for per-target lib/Target dirs to fix -Wmicrosoft-include (#228282)
This is a cleaner implementation to
https://github.com/llvm/llvm-project/pull/227867 which provides a more
accurate-to-cmake include path instead of silencing the error.
[compiler-rt] Add more common HSA utilities for memory and symbolization
Summary:
Adds memory pool management for different kinds of allocation. Intended
to be used for the in-progress concurrency sanitizer.
RFC: discourse.llvm.org/t/rfc-a-thread-concurrency-sanitizer-for-gpus-in-compiler-rt/91113