Skip to content

Commit

Permalink
bpf: allow bpf helpers to be used into HID-BPF struct_ops
Browse files Browse the repository at this point in the history
Without this helpers like bpf_printk() or bpf_map_update() are not
available, making anything but change of bytes impossible to do.

Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-14-6ac6ade58329@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
  • Loading branch information
Benjamin Tissoires committed Jun 14, 2024
1 parent c94ae21 commit bd07475
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hid/bpf/hid_bpf_struct_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ static int hid_bpf_ops_btf_struct_access(struct bpf_verifier_log *log,
}

static const struct bpf_verifier_ops hid_bpf_verifier_ops = {
.get_func_proto = bpf_base_func_proto,
.is_valid_access = hid_bpf_ops_is_valid_access,
.btf_struct_access = hid_bpf_ops_btf_struct_access,
};
Expand Down

0 comments on commit bd07475

Please sign in to comment.