// https://syzkaller.appspot.com/bug?id=983ccdbdb296071b6379756b76f02e20372996e1 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=*/7ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); intptr_t res = 0; memcpy((void*)0x200001c0, "freezer.state\000", 14); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200001c0ul, /*flags=*/0x26e1ul, /*mode=*/0ul); if (res != -1) r[0] = res; *(uint64_t*)0x200005c0 = 1; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x4004662b, /*period=*/0x200005c0ul); memcpy((void*)0x200000c0, "memory.events\000", 14); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000c0ul, /*flags=*/0x26e1ul, /*mode=*/0ul); if (res != -1) r[1] = res; *(uint64_t*)0x20000180 = 0x4402; syscall(__NR_ioctl, /*fd=*/r[1], /*cmd=*/0x40086602, /*period=*/0x20000180ul); return 0; }