vfs_lookup_cross_mount(): fix missing LK_CANRECURSE
This was a rather dumb miss on my part in commit 42442d7a6e.
LK_CANRECURSE is clearly needed in any case in which the covered vnode
is held exclusive across the call to VFS_ROOT(), regardless of whether
it was initially held exclusive or upgraded. The commit message for
that change also noted that unionfs lookup only worked without
LK_CANRECURSE due to a coincidence of the then-current unionfs
implementation. As it happens, said coincidence was recently removed
in commit b952606b4f ("unionfs_lock(): eliminate LK_CANRECURSE special-
case").
PR: 298201
Reported by: olivier
Fixes: 42442d7a6e "Generalize the VV_CROSSLOCK logic in
vfs_lookup"
Reviewed by: kib, markj, pho
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D59494
[2 lines not shown]
vfs_lookup_cross_mount(): fix missing LK_CANRECURSE
This was a rather dumb miss on my part in commit 42442d7a6e.
LK_CANRECURSE is clearly needed in any case in which the covered vnode
is held exclusive across the call to VFS_ROOT(), regardless of whether
it was initially held exclusive or upgraded. The commit message for
that change also noted that unionfs lookup only worked without
LK_CANRECURSE due to a coincidence of the then-current unionfs
implementation. As it happens, said coincidence was recently removed
in commit b952606b4f ("unionfs_lock(): eliminate LK_CANRECURSE special-
case").
PR: 298201
Reported by: olivier
Fixes: 42442d7a6e "Generalize the VV_CROSSLOCK logic in
vfs_lookup"
Reviewed by: kib, markj, pho
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D59494
[2 lines not shown]
[LoongArch] Introduce PseudoAddUpperImm to deduplicate stack-frame base address materialization (#217250)
This is largely inspired by
https://github.com/llvm/llvm-project/pull/211748, except some LoongArch
specific changes, which includes merge 12-bit signed immediate into
`ld/st` instructions while materializing the frame index first to
generate a `lu12i.w + add` combo if we could, instead of a `lu12i.w +
ori + add`. So that we could use a `PseudoAddUpperImm` to replace them
for `MachineLateInstrsCleanup` to deduplicate them later on.
This patch improves SPEC CPU2026 `709.cactus_r` performance by 27% (from
1.64 to 2.09).
**edit:** After replacing some `ld/st` with `ldptr/stptr` as long as
their address offset could not fit in 12-bit imm but could fit in 14-bit
one, the `709.cactus_r` slightly improved from **2.09** to **2.16**,
however this is done by `-O3 -mlasx`, with `-O3 -mlsx`, the score
remains at **2.31**, which shows its bottleneck is no longer on address
materialization.
www/py-binarycookies: update the port to version 2.5.0
- Fix serializer so written files match Apple's format
- Preserve full cookie fidelity on round trips
Reported by: portscout
[clang][bytecode] Check diagnosing() before calling diagnoseUnknownDecl() (#224906)
We can save some small preparations this way, e.g. calling
`getRootVarDecl()`.
iso/img-test: fail on the #467 strings (FSTAB-ROOT-REMOUNT)
Once nextbsd-overlays#5 stops shipping /etc/fstab, launchctl's boot-time
mount -vat nonfs is skipped, so neither 'Cannot union mount root
filesystem' nor launchctl's 'fwexec(mount_tool' assert should appear.
Gate both harnesses on it so the root remount can't come back unnoticed.
The ISO verdict now checks pivot+login first, then the gate, so a boot
that never completes still reports as a boot failure.
Red until nextbsd-overlays#5 is in the image: merge together with it.
Refs #472, #467
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
build.sh: stop describing the overlay fstab as the source of the root entry
Root comes from the kernel's baked-in ROOTDEVNAME (#188), not from an
fstab line or loader.conf.d, and nextbsd-overlays#5 (E15 A1) stops
shipping /etc/fstab. Rewrite the three comments that said otherwise and
drop the doubled "the the".
Refs #472
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
img-test: gate on noatime for / and match the whole mount line
Adds ROOT-NOATIME to the verdict: the serial transcript must show
' on / (ufs, local, noatime'. noatime moves from the fstab root line into
launchd's own remount (nextbsd-userland#185, E15 A2), and the overlay
stops shipping fstab (nextbsd-overlays#5, A1). This gate catches a
build where A1 ships before A2.
The ROOT-IS-UFS step matched "ufs" in the echoed device name
(/dev/ufs/...), so it said nothing about mount flags, and it sent
halt -p before the line finished. It now waits for the whole
'on / (ufs...)' line. The verdict checks login first, so a boot that
never reaches login still reports as a boot failure.
Refs nextbsd/nextbsd-userland#185
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
Avoid sleeping while recording SEM_UNDO information
sys_semop(), by way of semundo_adjust() and semu_alloc(), could sleep in
pool_get(PR_WAITOK) after it had already applied the semaphore operations.
Another process can remove the set with IPC_RMID while we sleep; we then write
sempid and sem_otime through the freed semid_ds_kern and sem_base, and record
an undo entry for a set semundo_clear() has already swept, which panics
semexit() when the process exits.
This was introduced as a fallback in rev 1.14, after moving the
structures from a static array to a pool made the allocation able to
fail at all. semop(2) documents ENOSPC, so drop the fallback with the
extra complexity to work around the sleep.
semundo_adjust() must then stop freeing an emptied structure in the middle of
an operation: sys_semop()'s rollback can need it again, and re-creating it
there is allowed to fail, which is a panic. Keep it until done2. That also
takes a second sleeping pool_put() out of the done: region.
[7 lines not shown]
vfs_bio: retry fresh buffer allocation if recycling fails
getnewbuf() uses buf_lotsfree() to choose whether to
allocate a fresh buffer before trying BQ_AGE and BQ_LRU.
If fresh allocation is skipped and no buffer can actually be
recycled, it sleeps on needbuffer_cv even when the buffer cache
is still below its high water mark.
In that situation, a thread which could release a buffer may
itself need another buffer, resulting in a deadlock.
To avoid this, if recycling finds no usable buffer and bufmem is
still below bufmem_hiwater, make one more PR_NOWAIT fresh allocation
attempt before sleeping. See PR kern/60584 for details.
Worth to pullup to netbsd-11.
net-p2p/libtorrent-rasterbar2: revert "net-p2p/libtorrent-rasterbar2: update 2.0.13 → 2.1.1"
There are run-time issues that need to be investigated.
This reverts commit 7c412d80f232eb225c1d48ff72d5fab1dd8769e9.
www/immich: Set the machine learning URL
Immich defaults to the Docker hostname immich-machine-learning, which
never resolves outside a container, so the service ran unnoticed while
the server reported it unhealthy. The rc script now sets
IMMICH_MACHINE_LEARNING_URL, adjustable with immich_server_ml_url.
Sponsored by: Netzkommune GmbH
[CIR][ABI] Honor abi::ArgInfo::CanBeFlattened in the call-conv lowering (#220579)
**Summary:**
- CanBeFlattened landed on abi::ArgInfo in main
(llvm/llvm-project#220558).
- Consume the abi::ArgInfo::CanBeFlattened flag in the CIR
call-convention lowering bridge.
Assisted by: Claude Opus 4.8
[MLGO] Diagnose unavailable ML advisors under the new pass manager (#224585)
Without an ML model there is no release or development advisor
The legacy pass manager says so and uses the default advisor, but the
new one just crashed
www/linux-brave: DRM out of the box, GPU auto-detection
Add a WIDEVINE option (default on) so DRM playback works with no
browser-side setup once the CDM is present. The option links
${PREFIX}/lib/WidevineCdm into the Brave install directory, where the
component updater discovers it as a preinstalled component, and runs a
pre-launch seed script that sets brave.widevine_opted_in and maintains
the Widevine component hint file: Chromium registers the CDM at
startup from the hint and never repairs it itself, so the script
plants the hint before the first launch and repoints it when its
target no longer holds a CDM (e.g. after the CDM port is reinstalled),
while leaving intact hints -- including one naming a newer
component-updated CDM -- alone.
The option adds no dependency: Google's license permits fetching the
CDM but not redistributing it (www/linux-widevine-cdm is
no-pkg-mirror), so a RUN_DEPENDS would keep linux-brave itself off the
package mirrors. Everything the option installs is inert until the
user builds www/linux-widevine-cdm from ports -- the symlink dangles
[39 lines not shown]
atari: Fix 68030 SRP setup across kernel relocation
protorp[1] is currently updated after the kernel has been copied to
TT-RAM in RELOC_KERNEL case. The following PMOVE reads the ST-RAM
copy while the MMU is disabled, so this happens to work when enabling
the MMU. After the MMU is enabled, however, protorp refers to the
relocated copy, where protorp[1] still contains its old value.
Fortunately, this is not currently fatal because later uses of
protorp overwrite protorp[1] with the root table address before
loading the root pointer. However, any writes to global variables
after relocation leave the reloacated kernel state inconsistent.
Set protorp[1] before copying the kernel so that the relocated copy
also contains the root table address. This matches the ordering used
by amiga.
The PMOVE inline asm also specifies only the address of protorp as an
input, even though it reads both words of the SRP prototype from memory.
[2 lines not shown]
[compiler-rt] Use integers for __gnu_h2f_ieee and __gnu_f2h_ieee (#220167)
In libgcc, these conversion routines use integers in the signature. In
practice compiler-rt's definition has worked because the AAPCS calling
convention passes and returns floats the same as the same-sized integer,
but this may not be the case on all platforms. Thus, update the
signatures to match GCC.
This new version calls the inlined functions directly., changing the
generated code from:
00000000 <__extendhfsf2>:
0: ee100a10 vmov r0, s0
4: e1a01000 mov r1, r0
<snip>
60: e1800001 orr r0, r0, r1
64: ee000a10 vmov s0, r0
68: e12fff1e bx lr
[28 lines not shown]
[C++20] [Modules] Profiling non dependent noexcept expression by pointer (#224528)
Another approach to solve
https://github.com/llvm/llvm-project/issues/191361 and
https://github.com/llvm/llvm-project/issues/224180 than
https://github.com/llvm/llvm-project/pull/222148
I want to avoid competing PR but I do feel the original one's approach
seems too workaround. And I want to emphasize that, in my experience,
finding the root cause is much more harder than find the solution to me.
Many thanks to @ispeters
For the approach itself, I described them in the comments of the PR.
Note that the real problem is we were profiling something is not
completely deserialized, so that even if it is not crash, the logic is
not correct.
[AMDGPU] Fold 24 bit multiply with zero low bits
Fold `MUL_I24` and `MUL_U24` to zero when either operand has known zero
low 24 bits.
For example:
```
llvm.amdgcn.mul.i24(x, 0x01000000) -> 0
```