diff mbox series

splice07: Whitelist /proc/self/maps on pipe write

Message ID 20240129104327.10639-1-mdoucha@suse.cz
State Accepted
Headers show
Series splice07: Whitelist /proc/self/maps on pipe write | expand

Commit Message

Martin Doucha Jan. 29, 2024, 10:43 a.m. UTC
Just like with /dev/zero, splicing /proc/self/maps to writable pipe
is expected to pass. After generic splice() read emulation was removed,
it was reimplemented in commit b0072734ffaa ("tty, proc, kernfs, random:
Use copy_splice_read()")

Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
 testcases/kernel/syscalls/splice/splice07.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Petr Vorel Jan. 29, 2024, 10:54 a.m. UTC | #1
Hi Martin,

> Just like with /dev/zero, splicing /proc/self/maps to writable pipe
> is expected to pass. After generic splice() read emulation was removed,
> it was reimplemented in commit b0072734ffaa ("tty, proc, kernfs, random:
> Use copy_splice_read()")

Ah, very good catch, thank you. Kernel 6.5.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr
Cyril Hrubis Jan. 29, 2024, 3:04 p.m. UTC | #2
Hi!
Hopefully this is a last one...

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Petr Vorel Jan. 29, 2024, 4:36 p.m. UTC | #3
Hi Martin, Cyril,
> Hi!
> Hopefully this is a last one...

Great, merged.
Thank you both!

Kind regards,
Petr

> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/splice/splice07.c b/testcases/kernel/syscalls/splice/splice07.c
index 1fa13b3e6..9c23e0aac 100644
--- a/testcases/kernel/syscalls/splice/splice07.c
+++ b/testcases/kernel/syscalls/splice/splice07.c
@@ -40,6 +40,7 @@  static void check_splice(struct tst_fd *fd_in, struct tst_fd *fd_out)
 		/* While these combinations succeeed */
 		case TST_FD_DEV_ZERO:
 		case TST_FD_FILE:
+		case TST_FD_PROC_MAPS:
 		case TST_FD_MEMFD:
 			return;
 		/* And this complains about socket not being connected */