Skip to content

Commit

Permalink
workaround to pass the verifier
Browse files Browse the repository at this point in the history
squash this!

Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
  • Loading branch information
mtardy committed Dec 19, 2023
1 parent 5576e66 commit 796a65d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bpf/process/bpf_process_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
#define MAX_BUF_LEN 256

struct buffer_heap_map_value {
unsigned char buf[MAX_BUF_LEN];
// Buffer is twice the needed size because of the verifier. In prepend_name
// unit tests, the verifier figures out that 255 is enough and that the
// buffer_offset will not overflow, but in the real use-case it looks like
// it's forgetting about that.
unsigned char buf[MAX_BUF_LEN * 2];
};

struct {
Expand Down

0 comments on commit 796a65d

Please sign in to comment.