From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/fanotify19: Add test cases for elevated reader privileges
Date: Wed, 14 Jul 2021 09:28:20 +0200 [thread overview]
Message-ID: <YO6SFGTvHJkAR5+9@pevik> (raw)
In-Reply-To: <20210713162450.34947-1-amir73il@gmail.com>
Hi Amir,
> Even when event reader has elevated privileges, the information provided
> in events is determined by the privileges of the user that created the
> fanotify group.
> Add test cases for unprivileged listener and privileged event reader.
> This is a regression test for kernel commit
> a8b98c808eab ("fanotify: fix permission model of unprivileged group")
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
> Hi Petr,
> Added test for a fix in v5.13-rc5.
Thanks for your patch, pushed!
Things I've found, not related to this patch:
TBROK when running with higher number of iterations:
./fanotify19 -i 30
...
fanotify19.c:224: TPASS: Received event: mask=2b, pid=11351 fd=-1
fanotify19.c:224: TPASS: Received event: mask=b, pid=11351 fd=-1
fanotify19.c:224: TPASS: Received event: mask=a, pid=11351 fd=-1
fanotify19.c:224: TPASS: Received event: mask=8, pid=11351 fd=-1
fanotify19.c:147: TINFO: Test #3 unprivileged lisneter, privileged reader - events by child
fanotify19.c:151: TINFO: Running as privileged user, revoking.
fanotify19.c:136: TBROK: Child process terminated incorrectly. Aborting
Summary:
passed 316
failed 0
broken 1
skipped 0
warnings 0
Could you have look into it?
very minor nit: checkpatch complains about minor issues. Although all but quoted
string split across lines are easily fixable we don't need to bother with it.
But could you please use checkpatch for new tests?
Also I'd personally join also strings which are below 100 chars, because it
helps to grep.
> @@ -248,6 +285,10 @@ static struct tst_test test = {
> .needs_root = 1,
> .mount_device = 1,
> .mntpoint = MOUNT_PATH,
> + .tags = (const struct tst_tag[]) {
> + {"linux-git", "a8b98c808eab"},
FYI we also support "linux-stable-git", but we mainly use it for stable branch
specific patches (something required just for stable), not for regular backports
of fixes.
Kind regards,
Petr
next prev parent reply other threads:[~2021-07-14 7:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 16:24 [LTP] [PATCH] syscalls/fanotify19: Add test cases for elevated reader privileges Amir Goldstein
2021-07-14 7:28 ` Petr Vorel [this message]
2021-07-14 18:15 ` Amir Goldstein
2021-07-15 6:52 ` Petr Vorel
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=YO6SFGTvHJkAR5+9@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox