feat(libkernel): wake each listed address in _umtx_op UMTX_OP_NWAKE_PRIVATE #3845
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3845"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by 13hourstilliland on 2026-10-11T17:52:16Z.
What
_umtx_opthrew forUMTX_OP_NWAKE_PRIVATE(21). It now follows FreeBSD 11.4's__umtx_op_nwake_private: the object is an array ofvalpointers, and every waiter on each address is woken (kern_umtx_wake(td, uaddrs[i], INT_MAX, 1)). The count is read as anint, as instruct _umtx_op_args, so a count of 0 or fewer reads nothing and returns 0. A null list fails withEFAULT, which is whatcopyinreturns for it. Null entries inside the list wake nothing, matchingWAKE_PRIVATE. Waiters share the existing address queue, soWAIT,WAIT_UINTandWAIT_UINT_PRIVATEwaiters are all released.The other unimplemented operations still throw. The
_umtx_opTechnicalDebt entry now lists this operation and the unreadable-list gap (FreeBSD'scopyinfails for any unmapped list, not only a null one).Tested
Linux x86-64, GCC 14, Release, BUILD_TESTING=ON.
guest_umtx_oppasses with two new cases:WAIT_UINT_PRIVATEwaiters on one word and aWAITwaiter on another are released by oneNWAKE_PRIVATEcall whose list also holds a null entry. A waiter on an address not in the list stays blocked.EFAULT.On
mainthe new test throws on the firstNWAKE_PRIVATEcall. Each of these mutations makes it fail: waking one waiter per address instead of all, skipping the last entry, returning 0 for a null list, and treating the count as 64-bit.check_conventions.py(with this title and description) andcheck_test_registration.pypass. Not tested with a title.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T22:09:02Z.
Checked against FreeBSD
__umtx_op_nwake_private(int count, wake all waiters per listed address, EFAULT on an unreadable list); build +guest_umtx_oppass, and the new test fails without the change. Merging.