From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] Disable io_uring fd in ioctl_pidfd01 for selinux
Date: Tue, 29 Jul 2025 18:17:43 +0200 [thread overview]
Message-ID: <aIj0Jyn9cq9JVNbI@yuki.lan> (raw)
In-Reply-To: <20250729084720.GA13357@pevik>
Hi!
> > > We also have same failure for memfd_secret case in this test:
>
> > > ioctl_pidfd01.c:37: TINFO: memfd secret -> ...
> > > ioctl_pidfd01.c:28: TFAIL: ioctl(memfd secret, PIDFD_GET_INFO, info) expected EINVAL, EBADF, ENOTTY: EACCES (13)
>
> > > If we are opting for skipping the tests when selinux is enforcing mode,
> > > this also needs to be skipped.
>
> > In this case we will probably need to disable the test for SELinux
> > enforcing.
>
> Well, all tests (ioctl_pidfd01.c, this ioctl_pidfd01.c, mount08.c) are testing
> with TST_EXP_FAIL_ARR(), i.e. negative tests. Wouldn't be better to just expect
> a different errno? At least this is what I suggested to mount08.c [1].
I'm not that sure about how to fix this. Disabling tests preventively
just because selinux is enforcing does not sound convincing to me. I
would expect that it all depends on the particular configuration of the
rules on the system.
Maybe it would make sense to inject additional errno EACESS to the
TST_EXP_FAIL() automatically if we detect that selinux is enforcing.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-07-29 16:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-29 8:06 [LTP] [PATCH] Disable io_uring fd in ioctl_pidfd01 for selinux Andrea Cervesato
2025-07-29 8:32 ` Avinesh Kumar
2025-07-29 8:34 ` Andrea Cervesato via ltp
2025-07-29 8:47 ` Petr Vorel
2025-07-29 9:38 ` Andrea Cervesato via ltp
2025-07-29 16:17 ` Cyril Hrubis [this message]
2025-07-29 16:48 ` Andrea Cervesato via ltp
2025-07-30 10:40 ` Wei Gao via ltp
2025-07-30 6:35 ` Andrea Cervesato via ltp
2025-07-30 8:17 ` 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=aIj0Jyn9cq9JVNbI@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/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