map[SimplifiedCRepro:// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#ifndef __NR_bpf
#define __NR_bpf 321
#endif
uint64_t r[1] = {0xffffffffffffffff};
int main(void)
{
syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
const char* reason;
(void)reason;
intptr_t res = 0;
if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {}
// bpf$BPF_RAW_TRACEPOINT_OPEN arguments: [
// cmd: const = 0x11 (8 bytes)
// arg: ptr[in, bpf_raw_tracepoint] {
// bpf_raw_tracepoint {
// name: ptr[in, buffer] {
// buffer: {65 78 74 34 5f 64 61 5f 72 65 73 65 72 76 65 5f 73 70 61 63 65 00} (length 0x16)
// }
// prog_fd: fd_bpf_prog_raw_tracepoint (resource)
// pad: const = 0x0 (4 bytes)
// cookie: int64 = 0x0 (8 bytes)
// }
// }
// size: len = 0x10 (8 bytes)
// ]
// returns fd_perf_base
*(uint64_t*)0x200000000280 = 0x2000000001c0;
memcpy((void*)0x2000000001c0, "ext4_da_reserve_space\000", 22);
*(uint32_t*)0x200000000288 = -1;
*(uint32_t*)0x20000000028c = 0;
*(uint64_t*)0x200000000290 = 0;
syscall(__NR_bpf, /*cmd=*/0x11ul, /*arg=*/0x200000000280ul, /*size=*/0x10ul);
// openat$cgroup_ro arguments: [
// fd: fd_cgroup (resource)
// file: nil
// flags: const = 0x275a (4 bytes)
// mode: const = 0x0 (2 bytes)
// ]
// returns fd
syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0ul, /*flags=*/0x275a, /*mode=*/0);
// bpf$MAP_CREATE arguments: [
// cmd: const = 0x0 (8 bytes)
// arg: nil
// size: len = 0x0 (8 bytes)
// ]
// returns fd_bpf_map
syscall(__NR_bpf, /*cmd=*/0ul, /*arg=*/0ul, /*size=*/0ul);
// bpf$PROG_LOAD arguments: [
// cmd: const = 0x5 (8 bytes)
// arg: nil
// size: len = 0x0 (8 bytes)
// ]
// returns fd_bpf_prog
syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0ul, /*size=*/0ul);
// socket$inet_udp arguments: [
// domain: const = 0x2 (8 bytes)
// type: const = 0x2 (8 bytes)
// proto: const = 0x0 (4 bytes)
// ]
// returns sock_udp
syscall(__NR_socket, /*domain=*/2ul, /*type=*/2ul, /*proto=*/0);
// bpf$MAP_CREATE arguments: [
// cmd: const = 0x0 (8 bytes)
// arg: nil
// size: len = 0x0 (8 bytes)
// ]
// returns fd_bpf_map
syscall(__NR_bpf, /*cmd=*/0ul, /*arg=*/0ul, /*size=*/0ul);
// wait4 arguments: [
// pid: pid (resource)
// status: nil
// options: wait_options = 0x60000008 (8 bytes)
// ru: nil
// ]
syscall(__NR_wait4, /*pid=*/0, /*status=*/0ul, /*options=__WNOTHREAD|__WALL|WCONTINUED*/0x60000008ul, /*ru=*/0ul);
// socket$inet6 arguments: [
// domain: const = 0xa (8 bytes)
// type: socket_type = 0x800000000000002 (8 bytes)
// proto: int32 = 0x0 (4 bytes)
// ]
// returns sock_in6
syscall(__NR_socket, /*domain=*/0xaul, /*type=SOCK_DGRAM|0x800000000000000*/0x800000000000002ul, /*proto=*/0);
// bpf$BPF_RAW_TRACEPOINT_OPEN arguments: [
// cmd: const = 0x11 (8 bytes)
// arg: ptr[in, bpf_raw_tracepoint] {
// bpf_raw_tracepoint {
// name: nil
// prog_fd: fd_bpf_prog_raw_tracepoint (resource)
// pad: const = 0x0 (4 bytes)
// cookie: int64 = 0x0 (8 bytes)
// }
// }
// size: len = 0x18 (8 bytes)
// ]
// returns fd_perf_base
*(uint64_t*)0x200000000080 = 0;
*(uint32_t*)0x200000000088 = -1;
*(uint32_t*)0x20000000008c = 0;
*(uint64_t*)0x200000000090 = 0;
syscall(__NR_bpf, /*cmd=*/0x11ul, /*arg=*/0x200000000080ul, /*size=*/0x18ul);
// bpf$BPF_PROG_RAW_TRACEPOINT_LOAD arguments: [
// cmd: const = 0x5 (8 bytes)
// arg: ptr[in, bpf_prog_t[flags[bpf_raw_tracepoint_prog_types, int32], const[0, int32], const[0, int32], const[0, int32]]] {
// bpf_prog_t[flags[bpf_raw_tracepoint_prog_types, int32], const[0, int32], const[0, int32], const[0, int32]] {
// type: bpf_raw_tracepoint_prog_types = 0x11 (4 bytes)
// ninsn: bytesize8 = 0x4 (4 bytes)
// insns: ptr[inout, array[ANYUNION]] {
// array[ANYUNION] {
// union ANYUNION {
// ANYBLOB: buffer: {18 01 00 00 08 00 00 00 00 00 00 00 00 00 ea 04 85 00 00 00 6d 00 00 00 95} (length 0x19)
// }
// }
// }
// license: ptr[in, buffer] {
// buffer: {47 50 4c 00} (length 0x4)
// }
// loglev: int32 = 0x0 (4 bytes)
// logsize: len = 0x0 (4 bytes)
// log: nil
// kern_version: bpf_kern_version = 0x0 (4 bytes)
// flags: bpf_prog_load_flags = 0x0 (4 bytes)
// prog_name: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00} (length 0x10)
// prog_ifindex: ifindex (resource)
// expected_attach_type: const = 0x2 (4 bytes)
// btf_fd: fd_btf (resource)
// func_info_rec_size: const = 0x8 (4 bytes)
// func_info: nil
// func_info_cnt: len = 0x0 (4 bytes)
// line_info_rec_size: const = 0x10 (4 bytes)
// line_info: nil
// line_info_cnt: len = 0x0 (4 bytes)
// attach_btf_id: const = 0x0 (4 bytes)
// attach_prog_fd: const = 0x0 (4 bytes)
// core_relo_cnt: len = 0x0 (4 bytes)
// fd_array: nil
// core_relos: nil
// core_relo_rec_size: const = 0x10 (4 bytes)
// log_true_size: int32 = 0x0 (4 bytes)
// prog_token_fd: union _bpf_prog_t[flags[bpf_raw_tracepoint_prog_types, int32], const[0, int32], const[0, int32], const[0, int32]]_prog_token_fd_wrapper {
// void: buffer: {} (length 0x0)
// }
// pad: union _bpf_prog_t[flags[bpf_raw_tracepoint_prog_types, int32], const[0, int32], const[0, int32], const[0, int32]]_pad_wrapper {
// value: const = 0x0 (4 bytes)
// }
// }
// }
// size: len = 0x80 (8 bytes)
// ]
// returns fd_bpf_prog_raw_tracepoint
*(uint32_t*)0x200000000200 = 0x11;
*(uint32_t*)0x200000000204 = 4;
*(uint64_t*)0x200000000208 = 0x2000000002c0;
memcpy((void*)0x2000000002c0, "\x18\x01\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\x04\x85\x00\x00\x00\x6d\x00\x00\x00\x95", 25);
*(uint64_t*)0x200000000210 = 0x200000000100;
memcpy((void*)0x200000000100, "GPL\000", 4);
*(uint32_t*)0x200000000218 = 0;
*(uint32_t*)0x20000000021c = 0;
*(uint64_t*)0x200000000220 = 0;
*(uint32_t*)0x200000000228 = 0;
*(uint32_t*)0x20000000022c = 0;
memset((void*)0x200000000230, 0, 16);
*(uint32_t*)0x200000000240 = 0;
*(uint32_t*)0x200000000244 = 2;
*(uint32_t*)0x200000000248 = -1;
*(uint32_t*)0x20000000024c = 8;
*(uint64_t*)0x200000000250 = 0;
*(uint32_t*)0x200000000258 = 0;
*(uint32_t*)0x20000000025c = 0x10;
*(uint64_t*)0x200000000260 = 0;
*(uint32_t*)0x200000000268 = 0;
*(uint32_t*)0x20000000026c = 0;
*(uint32_t*)0x200000000270 = 0;
*(uint32_t*)0x200000000274 = 0;
*(uint64_t*)0x200000000278 = 0;
*(uint64_t*)0x200000000280 = 0;
*(uint32_t*)0x200000000288 = 0x10;
*(uint32_t*)0x20000000028c = 0;
*(uint32_t*)0x200000000290 = 0;
res = syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x200000000200ul, /*size=*/0x80ul);
if (res != -1)
r[0] = res;
// bpf$BPF_RAW_TRACEPOINT_OPEN arguments: [
// cmd: const = 0x11 (8 bytes)
// arg: ptr[in, bpf_raw_tracepoint] {
// bpf_raw_tracepoint {
// name: ptr[in, buffer] {
// buffer: {6d 6d 5f 70 61 67 65 5f 61 6c 6c 6f 63 00} (length 0xe)
// }
// prog_fd: fd_bpf_prog_raw_tracepoint (resource)
// pad: const = 0x0 (4 bytes)
// cookie: int64 = 0x0 (8 bytes)
// }
// }
// size: len = 0x10 (8 bytes)
// ]
// returns fd_perf_base
*(uint64_t*)0x200000000200 = 0x200000000140;
memcpy((void*)0x200000000140, "mm_page_alloc\000", 14);
*(uint32_t*)0x200000000208 = r[0];
*(uint32_t*)0x20000000020c = 0;
*(uint64_t*)0x200000000210 = 0;
syscall(__NR_bpf, /*cmd=*/0x11ul, /*arg=*/0x200000000200ul, /*size=*/0x10ul);
return 0;
}
]