Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Dec 2025 18:13:35 +0000
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e1c985ccc335 - stable/14 - vt: Allow VT_SETMODE with frsig=0
Message-ID:  <693c5b4f.c5ad.1268944a@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help

The branch stable/14 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=e1c985ccc335beb37bb34b368c5c019cc5f80f9c

commit e1c985ccc335beb37bb34b368c5c019cc5f80f9c
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-09-30 19:39:34 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-12-12 18:13:13 +0000

    vt: Allow VT_SETMODE with frsig=0
    
    Linux does not check that any of the signals in vt_mode VT_SETMODE ioctl
    (relsig, acqsig, frsig) are valid, but FreeBSD required that all three
    are valid.  frsig is unusued in both Linux and FreeBSD, and software
    typically leaves it unset.  To improve portability, allow frsig to be
    set to zero.
    
    PR:             289812
    Reported by:    Dušan Gvozdenović
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D52835
    
    (cherry picked from commit 5198c32210039d8dc92554647384eee75688848c)
    (cherry picked from commit 224d65015465d085f2e07edccef1f23a8c217b88)
---
 sys/dev/vt/vt_core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
index 50f12512a81c..5cf45a7c61b2 100644
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -3049,9 +3049,9 @@ skip_thunk:
 				DPRINTF(5, "reset WAIT_ACQ, ");
 			return (0);
 		} else if (mode->mode == VT_PROCESS) {
-			if (!ISSIGVALID(mode->relsig) ||
-			    !ISSIGVALID(mode->acqsig) ||
-			    !ISSIGVALID(mode->frsig)) {
+			if (!(ISSIGVALID(mode->relsig) &&
+			    ISSIGVALID(mode->acqsig) &&
+			    (mode->frsig == 0 || ISSIGVALID(mode->frsig)))) {
 				DPRINTF(5, "error EINVAL\n");
 				return (EINVAL);
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?693c5b4f.c5ad.1268944a>