Date: Sun, 12 Apr 2026 03:16:27 +0000 From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Quent=?utf-8?Q?in Th=C3=A9?=bault <quentin.thebault@defenso.fr> Subject: git: 6c143fff52b7 - stable/15 - vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE Message-ID: <69db0e8b.46430.71ba97a8@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6c143fff52b72c9fedbd72259ad60b0db166efe2 commit 6c143fff52b72c9fedbd72259ad60b0db166efe2 Author: Quentin Thébault <quentin.thebault@defenso.fr> AuthorDate: 2026-01-14 00:14:22 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2026-04-12 03:15:10 +0000 vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE 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> Reviewed by: emaste, imp, kevans (cherry picked from commit 5e1c7867e1b9a8abe7307d01087cddc057e39859) --- sys/dev/vt/vt.h | 1 - sys/dev/vt/vt_core.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h index 8e35a81bc101..4abe99e4ab13 100644 --- a/sys/dev/vt/vt.h +++ b/sys/dev/vt/vt.h @@ -81,7 +81,6 @@ #else #define DPRINTF(_l, ...) do {} while (0) #endif -#define ISSIGVALID(sig) ((sig) > 0 && (sig) < NSIG) #define VT_SYSCTL_INT(_name, _default, _descr) \ int vt_##_name = (_default); \ diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index bd6596eceacb..ef95df208863 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -3050,9 +3050,9 @@ skip_thunk: DPRINTF(5, "reset WAIT_ACQ, "); return (0); } else if (mode->mode == VT_PROCESS) { - if (!(ISSIGVALID(mode->relsig) && - ISSIGVALID(mode->acqsig) && - (mode->frsig == 0 || ISSIGVALID(mode->frsig)))) { + if (!(_SIG_VALID(mode->relsig) && + _SIG_VALID(mode->acqsig) && + (mode->frsig == 0 || _SIG_VALID(mode->frsig)))) { DPRINTF(5, "error EINVAL\n"); return (EINVAL); }home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69db0e8b.46430.71ba97a8>
