1 // SPDX-License-Identifier: GPL-2.0-only 2 /* Copyright (c) 2022 Benjamin Tissoires 3 */ 4 5 #include "vmlinux.h" 6 #include <bpf/bpf_helpers.h> 7 #include <bpf/bpf_tracing.h> 8 #include "hid_bpf_attach.h" 9 #include "hid_bpf_helpers.h" 10 11 SEC("syscall") 12 int attach_prog(struct attach_prog_args *ctx) 13 { 14 ctx->retval = hid_bpf_attach_prog(ctx->hid, 15 ctx->prog_fd, 16 0); 17 return 0; 18 } 19