Page MenuHomeFreeBSD

Revert most of ce42e793100b460f597e4c85ec0da12e274f9394
ClosedPublic

Authored by kib on Jul 19 2021, 4:30 PM.
Tags
None
Referenced Files
F81637256: D31220.id92430.diff
Fri, Apr 19, 7:51 AM
F81595593: D31220.diff
Thu, Apr 18, 4:56 PM
Unknown Object (File)
Thu, Mar 28, 9:40 PM
Unknown Object (File)
Fri, Mar 22, 8:57 PM
Unknown Object (File)
Jan 16 2024, 12:55 AM
Unknown Object (File)
Dec 20 2023, 3:02 AM
Unknown Object (File)
Dec 14 2023, 10:34 PM
Unknown Object (File)
Nov 11 2023, 11:49 AM
Subscribers

Details

Summary

It restores _umtx_lock() and _umtx_unlock() syscalls, and UMTX_OP_LOCK/UMTX_OP_UNLOCK umtx_op(2) operations.

UMUTEX_ERROR_CHECK flag is left out.

PR: 218571

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Jul 19 2021, 4:30 PM

Seems generally reasonable. Fortunately we have't had RESERVED syscall numbers for long so this isn't violating our guarantee too badly.

sys/sys/umtx.h
80

Does it make sense to put these under #ifdef _KERNEL to prevent new code form using them without some effort?

This revision is now accepted and ready to land.Jul 19 2021, 9:35 PM
kib marked an inline comment as done.Jul 19 2021, 10:27 PM
kib added inline comments.
sys/sys/umtx.h
80

We do not do that for UMTX_OP_SEM_WAIT/WAKE.

I considered keeping RESERVED symbols in the header, and redefine them to LOCK/UNLOCK in kern_umtx.c, as well as defining struct umtx in kern_umtx.c too. But then I decided that this obfuscation is not worth it: the facilitiy is under COMPAT_FREEBSD10 anyway, so anybody trying to use it (why? also it is not documented in umtx_op(2)) needs to make an argument to himself.

emaste added inline comments.
sys/kern/kern_umtx.c
911

Discussed briefly on IRC with @kib, the kernel side of this existed in FreeBSD 10 but it was not used by default userland for quite some time, perhaps after FreeBSD 6. Should this be COMPAT_FREEBSD6 (or whatever the actual version was) in that case?

kib marked an inline comment as done.Jul 27 2021, 7:44 PM
kib added inline comments.
sys/kern/kern_umtx.c
911

We provide COMPATX for syscalls removed in HEAD-X, not when the syscall use disappeared from the base. So I believe that COMPAT10 is the proper separation line.

sys/kern/kern_umtx.c
911

My thinking is that we could have moved it under COMPAT_FREEBSD6 in FreeBSD 7 (assuming it was 6). I think the umtx syscalls is a bit of an unusual case wrt historical practice.

sys/kern/kern_umtx.c
911

Yes, but syscall was kept until 10. I agree that right action in FreeBSD 7 times was not the removal but bracing it with COMPAT6, of course.

It is both umtx op that was removed, and dedicated syscalls.