From 9dbe0b8c8a5cb3cde44b498ab792a57c90c6d54d Mon Sep 17 00:00:00 2001 From: Grzegorz Nosek Date: Tue, 4 May 2021 14:20:12 +0000 Subject: [PATCH] Keep the license passed in bpf_attr This reverts half of commit 8918b9579cd5a3828df6c57652dd38ea92875b11. It makes eBPF work at all again, at least on Ubuntu 16.04 and 20.04 Signed-off-by: Grzegorz Nosek --- userspace/libscap/scap_bpf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/userspace/libscap/scap_bpf.c b/userspace/libscap/scap_bpf.c index 9af847e968..1e88d566a2 100644 --- a/userspace/libscap/scap_bpf.c +++ b/userspace/libscap/scap_bpf.c @@ -154,6 +154,7 @@ static int bpf_load_program(const struct bpf_insn *insns, attr.prog_type = type; attr.insn_cnt = (uint32_t) insns_cnt; attr.insns = (unsigned long) insns; + attr.license = (unsigned long) "GPL"; attr.log_buf = (unsigned long) NULL; attr.log_size = 0; attr.log_level = 0;