All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Günther Noack" <gnoack3000@gmail.com>
To: Jared Finder <jared@finder.org>
Cc: "Alejandro Colomar" <alx.manpages@gmail.com>,
	linux-man@vger.kernel.org, "Hanno Böck" <hanno@hboeck.de>,
	"Jann Horn" <jannh@google.com>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	jwilk@jwilk.net
Subject: Re: [PATCH man 1/1] TIOCLINUX.2const: Document TIOCL_SETSEL selection modes
Date: Sun, 23 Feb 2025 20:15:00 +0100	[thread overview]
Message-ID: <20250223.63620ae43aca@gnoack.org> (raw)
In-Reply-To: <11238d813065baceaf2a8b84e24eedb8@finder.org>

Hi!

Thanks for the review!

On Sun, Feb 23, 2025 at 08:35:16AM -0800, Jared Finder wrote:
> On 2025-02-23 01:13, Günther Noack wrote:
> > diff --git a/man/man2const/TIOCLINUX.2const
> > b/man/man2const/TIOCLINUX.2const
> > index c0acdd0ea..27758584e 100644
> > --- a/man/man2const/TIOCLINUX.2const
> > +++ b/man/man2const/TIOCLINUX.2const
> > @@ -65,11 +65,49 @@ are the ending
> >  column and row.
> >  (Upper left corner is row=column=1.)
> >  .I sel_mode
> > -is 0 for character-by-character selection,
> > -1 for word-by-word selection,
> > -or 2 for line-by-line selection.
> > -The indicated screen characters are highlighted and saved
> > -in a kernel buffer.
> > +may be one of the following operations:
> > +.RS
> > +.TP
> > +.B TIOCL_SELCHAR
> > +Select character-by-character.
> > +The indicated screen characters are highlighted
> > +and saved in a kernel buffer.
> > +.TP
> > +.B TIOCL_SELWORD
> > +Select word-by-word.
> > +The indicated screen characters are highlighted
> > +and saved in a kernel buffer.
> > +.TP
> > +.B TIOCL_SELLINE
> > +Select line-by-line.
> > +The indicated screen characters are highlighted
> > +and saved in a kernel buffer.
> > +.TP
> > +.B TIOCL_SELPOINTER
> > +Show the pointer at position
> > +.RI ( xe ", " ye ).
> > +.TP
> 
> Wouldn't it be appropriate to call out here that this specific code is not
> intended to be protected by CAP_SYS_ADMIN?

Yes, it would, and that's the intention and what this change is
preparing for.  This commit describes the "selection modes" (without
touching on the CAP_SYS_ADMIN topic) and a follow-up commit should
move the CAP_SYS_ADMIN remark into the sections for the individual
selection modes.

I intentionally postponed the CAP_SYS_ADMIN part of the change until
the time when the semantics are finalized in the kernel, because I did
not want to risk calling the slightly broken intermediate logic to
anyone's attention (where TIOCL_SELMOUSEREPORT requires CAP_SYS_ADMIN,
but only as long as one of the lower four bits of the sel_mode are
set) - that behavior was unintentional and I don't want to promote
that further than necessary. ;-)

So yes, I'll send another small patch once we have a fix on the kernel
side which is merged.

–Günther

  reply	other threads:[~2025-02-23 19:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-23  9:13 [PATCH man 0/1] TIOCLINUX.2const: Document TIOCL_SETSEL selection modes Günther Noack
2025-02-23  9:13 ` [PATCH man 1/1] " Günther Noack
2025-02-23 16:35   ` Jared Finder
2025-02-23 19:15     ` Günther Noack [this message]
2025-02-23 19:36   ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250223.63620ae43aca@gnoack.org \
    --to=gnoack3000@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=hanno@hboeck.de \
    --cc=jannh@google.com \
    --cc=jared@finder.org \
    --cc=jirislaby@kernel.org \
    --cc=jwilk@jwilk.net \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.