mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-22 20:52:27 +00:00

This solves several problems: - host usually have outdates headers, so previously we need to define missing consts - host may not have some headers at all - generation depends on linux distribution and version - some of the consts cannot be defined at all (e.g. ioctls that use struct arguments)
85 lines
2.2 KiB
Plaintext
85 lines
2.2 KiB
Plaintext
# Copyright 2015 syzkaller project authors. All rights reserved.
|
|
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
|
|
|
include <linux/bpf.h>
|
|
|
|
bpf$MAP_CREATE(cmd const[BPF_MAP_CREATE], arg ptr[in, bpf_map_create_arg], size len[arg]) fd[bpf_map]
|
|
bpf$MAP_LOOKUP_ELEM(cmd const[BPF_MAP_LOOKUP_ELEM], arg ptr[in, bpf_map_lookup_arg], size len[arg])
|
|
bpf$MAP_UPDATE_ELEM(cmd const[BPF_MAP_UPDATE_ELEM], arg ptr[in, bpf_map_update_arg], size len[arg])
|
|
bpf$MAP_DELETE_ELEM(cmd const[BPF_MAP_DELETE_ELEM], arg ptr[in, bpf_map_delete_arg], size len[arg])
|
|
bpf$MAP_GET_NEXT_KEY(cmd const[BPF_MAP_GET_NEXT_KEY], arg ptr[in, bpf_map_get_next_arg], size len[arg])
|
|
bpf$PROG_LOAD(cmd const[BPF_PROG_LOAD], arg ptr[in, bpf_prog], size len[arg]) fd[bpf_prog]
|
|
bpf$OBJ_PIN_MAP(cmd const[BPF_OBJ_PIN], arg ptr[in, bpf_obj_pin_map], size len[arg])
|
|
bpf$OBJ_PIN_PROG(cmd const[BPF_OBJ_PIN], arg ptr[in, bpf_obj_pin_prog], size len[arg])
|
|
bpf$OBJ_GET_MAP(cmd const[BPF_OBJ_GET], arg ptr[in, bpf_obj_get], size len[arg]) fd[bpf_map]
|
|
bpf$OBJ_GET_PROG(cmd const[BPF_OBJ_GET], arg ptr[in, bpf_obj_get], size len[arg]) fd[bpf_prog]
|
|
|
|
bpf_map_create_arg {
|
|
type flags[bpf_map_type, int32]
|
|
ksize int32
|
|
vsize int32
|
|
max int32
|
|
}
|
|
|
|
bpf_map_lookup_arg {
|
|
map fd[bpf_map]
|
|
key buffer[in]
|
|
val buffer[out]
|
|
}
|
|
|
|
bpf_map_update_arg {
|
|
map fd[bpf_map]
|
|
key buffer[in]
|
|
val buffer[in]
|
|
flags flags[bpf_map_flags, int64]
|
|
}
|
|
|
|
bpf_map_delete_arg {
|
|
map fd[bpf_map]
|
|
key buffer[in]
|
|
}
|
|
|
|
bpf_map_get_next_arg {
|
|
map fd[bpf_map]
|
|
key buffer[in]
|
|
next buffer[out]
|
|
}
|
|
|
|
bpf_prog {
|
|
type flags[bpf_prog_type, int32]
|
|
ninsn len[insns, int32]
|
|
insns ptr[in, array[bpf_insn]]
|
|
license string
|
|
loglev int32
|
|
logsize len[log, int32]
|
|
log buffer[out]
|
|
kver int32
|
|
}
|
|
|
|
bpf_insn {
|
|
code int8
|
|
dst int8
|
|
src int8
|
|
off int16
|
|
imm int32
|
|
}
|
|
|
|
bpf_obj_pin_map {
|
|
path filename
|
|
fd fd[bpf_map]
|
|
}
|
|
|
|
bpf_obj_pin_prog {
|
|
path filename
|
|
fd fd[bpf_prog]
|
|
}
|
|
|
|
bpf_obj_get {
|
|
path filename
|
|
fd const[0, int32]
|
|
}
|
|
|
|
bpf_map_type = BPF_MAP_TYPE_HASH, BPF_MAP_TYPE_ARRAY, BPF_MAP_TYPE_PROG_ARRAY, BPF_MAP_TYPE_PERF_EVENT_ARRAY
|
|
bpf_map_flags = BPF_ANY, BPF_NOEXIST, BPF_EXIST
|
|
bpf_prog_type = BPF_PROG_TYPE_SOCKET_FILTER, BPF_PROG_TYPE_KPROBE, BPF_PROG_TYPE_SCHED_CLS, BPF_PROG_TYPE_SCHED_ACT
|