github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/test/io_uring (about) 1 # Create an io_uring instance 2 3 r0 = syz_io_uring_setup(0xF00, &AUTO={0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, "000000000000000000000000", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}, &AUTO=<r1=>0x0, &AUTO=<r2=>0x0) 4 5 # Set IORING_CQ_EVENTFD_DISABLED. Has no side-effect for the test, 6 # only tests syz_memcpy_off(). 7 8 syz_memcpy_off$IO_URING_METADATA_FLAGS(r1, 0x114, &AUTO=0x1, 0x0, AUTO) 9 10 # Write an openat2 operation to the submission queue 11 12 syz_io_uring_submit(r1, r2, &AUTO=@IORING_OP_OPENAT2={AUTO, 0x0, AUTO, 0xffffffffffffff9c, &AUTO={0x42, 0x0, 0x0}, &AUTO='./file1\x00', AUTO, AUTO, 0x12345, {AUTO, 0x0, "0000000000000000000000000000000000000000"}}) 13 14 # Notify the kernel about the submission and wait until completion 15 16 io_uring_enter(r0, 0x1, 0x1, 0x1, 0x0, 0x0) 17 18 # Get the resulting fd from the completion queue 19 20 r3 = syz_io_uring_complete(r1) 21 22 # Close the file 23 24 close(r3)