#include "xlat/bpf_map_update_elem_flags.h"
static int
-bpf_map_create(struct tcb *tcp, const long addr, unsigned int size)
+bpf_map_create(struct tcb *const tcp, const kernel_ulong_t addr,
+ unsigned int size)
{
struct {
uint32_t map_type, key_size, value_size, max_entries;
}
static void
-bpf_map_update_elem(struct tcb *tcp, const long addr, unsigned int size)
+bpf_map_update_elem(struct tcb *const tcp, const kernel_ulong_t addr,
+ unsigned int size)
{
struct {
uint32_t map_fd;
}
static void
-bpf_map_delete_elem(struct tcb *tcp, const long addr, unsigned int size)
+bpf_map_delete_elem(struct tcb *const tcp, const kernel_ulong_t addr,
+ unsigned int size)
{
struct {
uint32_t map_fd;
}
static int
-bpf_map_io(struct tcb *tcp, const long addr, unsigned int size, const char *text)
+bpf_map_io(struct tcb *const tcp, const kernel_ulong_t addr, unsigned int size,
+ const char *const text)
{
struct bpf_io_elem_struct {
uint32_t map_fd;
}
static int
-bpf_prog_load(struct tcb *tcp, const long addr, unsigned int size)
+bpf_prog_load(struct tcb *const tcp, const kernel_ulong_t addr,
+ unsigned int size)
{
struct {
uint32_t prog_type, insn_cnt;
printxval(bpf_prog_types, attr.prog_type, "BPF_PROG_TYPE_???");
tprintf(", insn_cnt=%u, insns=%#" PRIx64 ", license=",
attr.insn_cnt, attr.insns);
- printstr(tcp, attr.license, -1);
+ printstr(tcp, attr.license);
tprintf(", log_level=%u, log_size=%u, log_buf=%#" PRIx64 ", kern_version=%u}",
attr.log_level, attr.log_size, attr.log_buf, attr.kern_version);
SYS_FUNC(bpf)
{
- const int cmd = tcp->u_arg[0];
- const long addr = tcp->u_arg[1];
+ const unsigned int cmd = tcp->u_arg[0];
+ const kernel_ulong_t addr = tcp->u_arg[1];
const unsigned int size = tcp->u_arg[2];
int rc = RVAL_DECODED;