* [LTP] [RFC PATCH 1/1] readahead01: Pass also on memfd secret
@ 2024-01-18 19:13 Petr Vorel
2024-01-19 6:57 ` Li Wang
2024-01-19 15:33 ` Jan Kara
0 siblings, 2 replies; 4+ messages in thread
From: Petr Vorel @ 2024-01-18 19:13 UTC (permalink / raw)
To: ltp; +Cc: Dominique Leuenberger
It fixes failure on 6.6 kernels:
TFAIL: readahead() on memfd secret succeeded
Fixes: ecf81d729 ("syscalls: readahead01: Make use of tst_fd")
Reported-by: Dominique Leuenberger <dimstar@opensuse.org>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi,
I wonder if this is a bug or just changed functionality.
I also tested on 5.14 SLES and 5.10 Debian and both TCONF due ENOSYS:
tst_fd.c:260: TCONF: Skipping memfd secret: ENOSYS (38)
Kind regards,
Petr
testcases/kernel/syscalls/readahead/readahead01.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/readahead/readahead01.c b/testcases/kernel/syscalls/readahead/readahead01.c
index e86a73e3e..a1f313605 100644
--- a/testcases/kernel/syscalls/readahead/readahead01.c
+++ b/testcases/kernel/syscalls/readahead/readahead01.c
@@ -51,6 +51,7 @@ static void test_invalid_fd(struct tst_fd *fd)
/* These succeed */
case TST_FD_FILE:
case TST_FD_MEMFD:
+ case TST_FD_MEMFD_SECRET:
case TST_FD_PROC_MAPS:
return;
default:
--
2.43.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] [RFC PATCH 1/1] readahead01: Pass also on memfd secret
2024-01-18 19:13 [LTP] [RFC PATCH 1/1] readahead01: Pass also on memfd secret Petr Vorel
@ 2024-01-19 6:57 ` Li Wang
2024-01-19 15:33 ` Jan Kara
1 sibling, 0 replies; 4+ messages in thread
From: Li Wang @ 2024-01-19 6:57 UTC (permalink / raw)
To: Petr Vorel; +Cc: Dominique Leuenberger, ltp
Hi Petr, All,
I'm not sure but one point I guess that should be similar to 'TST_FD_MEMFD'
since the file is RAM-based so readahead() is not needed.
Your patch looks good, however, I was unable to get the clue in kernel code
to prove that.
On Fri, Jan 19, 2024 at 3:14 AM Petr Vorel <pvorel@suse.cz> wrote:
> It fixes failure on 6.6 kernels:
>
> TFAIL: readahead() on memfd secret succeeded
>
> Fixes: ecf81d729 ("syscalls: readahead01: Make use of tst_fd")
> Reported-by: Dominique Leuenberger <dimstar@opensuse.org>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Hi,
>
> I wonder if this is a bug or just changed functionality.
>
> I also tested on 5.14 SLES and 5.10 Debian and both TCONF due ENOSYS:
>
> tst_fd.c:260: TCONF: Skipping memfd secret: ENOSYS (38)
>
> Kind regards,
> Petr
>
> testcases/kernel/syscalls/readahead/readahead01.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/testcases/kernel/syscalls/readahead/readahead01.c
> b/testcases/kernel/syscalls/readahead/readahead01.c
> index e86a73e3e..a1f313605 100644
> --- a/testcases/kernel/syscalls/readahead/readahead01.c
> +++ b/testcases/kernel/syscalls/readahead/readahead01.c
> @@ -51,6 +51,7 @@ static void test_invalid_fd(struct tst_fd *fd)
> /* These succeed */
> case TST_FD_FILE:
> case TST_FD_MEMFD:
> + case TST_FD_MEMFD_SECRET:
> case TST_FD_PROC_MAPS:
> return;
> default:
> --
> 2.43.0
>
>
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [RFC PATCH 1/1] readahead01: Pass also on memfd secret
2024-01-18 19:13 [LTP] [RFC PATCH 1/1] readahead01: Pass also on memfd secret Petr Vorel
2024-01-19 6:57 ` Li Wang
@ 2024-01-19 15:33 ` Jan Kara
2024-01-21 19:35 ` Petr Vorel
1 sibling, 1 reply; 4+ messages in thread
From: Jan Kara @ 2024-01-19 15:33 UTC (permalink / raw)
To: Petr Vorel; +Cc: Dominique Leuenberger, ltp
On Thu 18-01-24 20:13:53, Petr Vorel wrote:
> It fixes failure on 6.6 kernels:
>
> TFAIL: readahead() on memfd secret succeeded
>
> Fixes: ecf81d729 ("syscalls: readahead01: Make use of tst_fd")
> Reported-by: Dominique Leuenberger <dimstar@opensuse.org>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
Yes, memfd secret is standard tmpfs file in principle so readahead(2)
succeeds. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> Hi,
>
> I wonder if this is a bug or just changed functionality.
>
> I also tested on 5.14 SLES and 5.10 Debian and both TCONF due ENOSYS:
>
> tst_fd.c:260: TCONF: Skipping memfd secret: ENOSYS (38)
>
> Kind regards,
> Petr
>
> testcases/kernel/syscalls/readahead/readahead01.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/testcases/kernel/syscalls/readahead/readahead01.c b/testcases/kernel/syscalls/readahead/readahead01.c
> index e86a73e3e..a1f313605 100644
> --- a/testcases/kernel/syscalls/readahead/readahead01.c
> +++ b/testcases/kernel/syscalls/readahead/readahead01.c
> @@ -51,6 +51,7 @@ static void test_invalid_fd(struct tst_fd *fd)
> /* These succeed */
> case TST_FD_FILE:
> case TST_FD_MEMFD:
> + case TST_FD_MEMFD_SECRET:
> case TST_FD_PROC_MAPS:
> return;
> default:
> --
> 2.43.0
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [RFC PATCH 1/1] readahead01: Pass also on memfd secret
2024-01-19 15:33 ` Jan Kara
@ 2024-01-21 19:35 ` Petr Vorel
0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2024-01-21 19:35 UTC (permalink / raw)
To: Jan Kara; +Cc: Dominique Leuenberger, ltp
Hi all,
...
> Yes, memfd secret is standard tmpfs file in principle so readahead(2)
> succeeds. Feel free to add:
Jan, thanks a lot for having a look!
Fix merged.
Kind regards,
Petr
> Reviewed-by: Jan Kara <jack@suse.cz>
> Honza
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-21 19:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-18 19:13 [LTP] [RFC PATCH 1/1] readahead01: Pass also on memfd secret Petr Vorel
2024-01-19 6:57 ` Li Wang
2024-01-19 15:33 ` Jan Kara
2024-01-21 19:35 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox