Page MenuHomeFreeBSD

vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE
ClosedPublic

Authored by quentin.thebault_defenso.fr on Nov 6 2025, 2:05 PM.
Tags
None
Referenced Files
F142158642: D53615.id165954.diff
Fri, Jan 16, 2:33 PM
Unknown Object (File)
Thu, Jan 15, 8:49 PM
Unknown Object (File)
Wed, Jan 14, 12:12 AM
Unknown Object (File)
Sun, Jan 4, 1:40 PM
Unknown Object (File)
Tue, Dec 30, 7:08 AM
Unknown Object (File)
Sun, Dec 21, 9:25 AM
Unknown Object (File)
Nov 17 2025, 4:21 PM
Unknown Object (File)
Nov 12 2025, 6:40 PM
Subscribers

Details

Summary

VT_SETMODE ioctl currently checks the provided signal numbers with its own
ISSIGVALID macro that uses NSIG (32) as a maximum, although the code that will
actually send the signal in sys/kern/kern_sig.c uses _SIG_VALID which allows up
to _SIG_MAXSIG (128).

This change aligns the vt code with the kernel internals and enables the use of
higher signal numbers so that applications are not limited to SIGUSR1 and
SIGUSR2 for vt release and acquire signals.

Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>

Diff Detail

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

Event Timeline

kevans added a reviewer: ray.

I know ray@ pops in sometimes so we might give him (and Ed) a little time to object, but I also didn't really see a reason to impose this particular limit. I did wonder if it was just an oversight because NSIG on other platforms *does* usually cover all valid signals (as far as I've observed)

This revision is now accepted and ready to land.Nov 6 2025, 2:30 PM

This looks good to my eye as well. We're just using kern_psignal(), which doesn't care. If there's some reason to avoid them, it's going to be subtle enough we should document the why.

In a direct e-mail from November 30, 2025 ray@ said he had little access to his FreeBSD mailbox these days but said he didn't really have input on this, and recommended asking ed@ instead.