Merge tag 'for-linus-6.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-rpi.git] / samples / hid / hid_bpf_attach.bpf.c
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 }