From cf73e5aa79cc6f6e147a5df55bad52f30706a5c3 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 13 Feb 2024 11:50:48 +0200 Subject: can pass UID via map from userland to BPF part --- maps.bpf.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'maps.bpf.h') diff --git a/maps.bpf.h b/maps.bpf.h index 355bba6..bb44627 100644 --- a/maps.bpf.h +++ b/maps.bpf.h @@ -4,6 +4,18 @@ #define MAX_FILENAME_LENGTH 256 #define MAX_PROGNAME_LENGTH 16 +struct config { + int x; + char y; +}; + +struct { + __uint(type, BPF_MAP_TYPE_HASH); + __type(key, u32); + __type(value, struct config); + __uint(max_entries, 1 << 24); +} config_map SEC(".maps"); + struct open_event { __s32 fd; __s32 op_id; -- cgit v1.2.3