From cbca8e0f043495ea2332604d8ce066891710e861 Mon Sep 17 00:00:00 2001 From: Necip Fazil Yildiran Date: Wed, 29 Jul 2020 07:36:25 +0000 Subject: executor: added syz_io_uring_setup to wrap both setup and mmap It is hard for the fuzzer to generate correct programs using mmap calls with fuzzer-provided mmap length. This wrapper ensures correct length computation. --- sys/linux/test/io_uring | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'sys/linux/test/io_uring') diff --git a/sys/linux/test/io_uring b/sys/linux/test/io_uring index 3e28259d1..1d93c33e6 100644 --- a/sys/linux/test/io_uring +++ b/sys/linux/test/io_uring @@ -1,9 +1,5 @@ # Create an io_uring instance -r0 = io_uring_setup(0x1, &AUTO={0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0], [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}) - -# mmap the ring and the sqes -r1 = mmap$IORING_OFF_SQ_RING(&(0x7f00000a0000)=nil, 0x184, 0x3, 0x8001, r0, AUTO) -r2 = mmap$IORING_OFF_SQES(&(0x7f00000b0000)=nil, 0x40, 0x3, 0x8001, r0, AUTO) +r0 = syz_io_uring_setup(0x1, &AUTO={0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0], [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}, &(0x7f00000a0000)=nil, &(0x7f00000b0000)=nil, &AUTO=0x0, &AUTO=0x0) # Set IORING_CQ_EVENTFD_DISABLED. Has no side-effect for the test, # only tests syz_memcpy_off(). -- cgit mrf-deployment