From: sashiko-bot@kernel.org
To: "Danish Khateeb" <danishkhateeb03@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH] selftests/tty: tiocsti: expect the privileged parent to succeed
Date: Wed, 21 Oct 2026 02:03:42 +0000 [thread overview]
Message-ID: <sashiko-outbox-179677@kernel.org> (raw)
In-Reply-To: <20261021020106.94174-1-danishkhateeb03@gmail.com>
> The FD passing tests open a pty in a child process, which may drop its
> privileges first, and pass the FD to the parent, which always has
> CAP_SYS_ADMIN. The child's own TIOCSTI is checked against
> .expected_success, and so is the parent's TIOCSTI on the passed FD.
>
> TIOCSTI checks the capabilities of the caller, not those of the process
> that opened the tty, so the parent always succeeds. Where the child has
> dropped its privileges and is expected to fail, the parent's check fails
> instead:
>
> # tty_tiocsti_test.c:620:test:Expected result (0) == variant->expected_success (-5)
> # tty_tiocsti_test.c:622:test:FD passing: expected error -5, got 0
> ...
> # FAILED: 13 / 16 tests passed.
>
> [ ... ]
>
> Fixes: 7553f5173ec3 ("selftests/tty: add TIOCSTI test suite")
> Link: https://lore.kernel.org/all/2025062327-shady-broadcast-237d@gregkh/
> Link: https://lore.kernel.org/all/20250624.3bb75890f0b0@gnoack.org/
> Signed-off-by: Danish Khateeb <danishkhateeb03@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261021020106.94174-1-danishkhateeb03@gmail.com?part=1
prev parent reply other threads:[~2026-10-21 2:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 2:01 [PATCH] selftests/tty: tiocsti: expect the privileged parent to succeed Danish Khateeb
2026-10-21 2:03 ` sashiko-bot [this message]
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=sashiko-outbox-179677@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=danishkhateeb03@gmail.com \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.