bpf: Add missing header to the library
Subsystems (6)
PATCH 1/7 bpf: Add missing header to the library
Including stddef.h is needed to define size_t.
--- tools/lib/bpf/bpf.h | 1 + 1 file changed, 1 insertion(+)
tools/lib/bpf/bpf.h +1 -0
@@ -22,6 +22,7 @@#define __BPF_BPF_H#include <linux/bpf.h> +#include <stddef.h> int bpf_create_map (enum bpf_map_type map_type,int key_size,int value_size,int max_entries,__u32 map_flags);
Signature · 1 line
2.11.0
PATCH 2/7 samples/bpf: Ignore already processed ELF sections
Add a missing check for the map fixup loop.
--- samples/bpf/bpf_load.c | 2 ++ 1 file changed, 2 insertions(+)
samples/bpf/bpf_load.c +2 -0
@@ -328,6 +328,8 @@ int load_bpf_file(char *path)/* load programs that need map fixup (relocations) */ for (i =1 ; i < ehdr.e_shnum; i++) { +if (processed_sec[i]) +continue ;if (get_sec (elf, i, &ehdr, &shname, &shdr, &data))continue ;
Signature · 1 line
2.11.0
PATCH 3/7 samples/bpf: Reset global variables
In reply to Mickaël SalaünBefore loading a new ELF, clean previous kernel version, license and processed sections.
--- samples/bpf/bpf_load.c | 5 +++++ 1 file changed, 5 insertions(+)
samples/bpf/bpf_load.c +5 -0
@@ -277,6 +277,11 @@ int load_bpf_file(char *path)Elf_Data *data, *data_prog, *symbols =NULL ;char *shname, *shname_prog; +/* reset global variables */ + kern_version =0 ; +memset (license,0 ,sizeof (license)); +memset (processed_sec,0 ,sizeof (processed_sec)); +if (elf_version (EV_CURRENT ) ==EV_NONE )return 1 ;
Signature · 1 line
2.11.0
PATCH 4/7 tools: Sync {,tools/}include/uapi/linux/bpf.h
In reply to Mickaël SalaünThe tools version of this header is out of date; update it to the latest version from kernel header.
--- tools/include/uapi/linux/bpf.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
tools/include/uapi/linux/bpf.h +22 -1
@@ -63,6 +63,12 @@ struct bpf_insn {__s32 imm;/* signed immediate constant */ }; +/* Key of an a BPF_MAP_TYPE_LPM_TRIE entry */ +struct bpf_lpm_trie_key { +__u32 prefixlen;/* up to 32 for AF_INET, 128 for AF_INET6 */ +__u8 data[0 ];/* Arbitrary size */ +}; +/* BPF syscall commands, see bpf(2) man-page for details. */ enum bpf_cmd {BPF_MAP_CREATE ,
@@ -89,6 +95,7 @@ enum bpf_map_type {BPF_MAP_TYPE_CGROUP_ARRAY ,BPF_MAP_TYPE_LRU_HASH ,BPF_MAP_TYPE_LRU_PERCPU_HASH , + BPF_MAP_TYPE_LPM_TRIE, }; enum bpf_prog_type {
@@ -430,6 +437,18 @@ union bpf_attr {* @xdp_md: pointer to xdp_md * @delta: An positive/negative integer to be added to xdp_md.data * Return: 0 on success or negative on error +* +* int bpf_probe_read_str(void *dst, int size, const void *unsafe_ptr) +* Copy a NUL terminated string from unsafe address. In case the string +* length is smaller than size, the target is not padded with further NUL +* bytes. In case the string length is larger than size, just count-1 +* bytes are copied and the last byte is set to NUL. +* @dst: destination address +* @size: maximum number of bytes to copy, including the trailing NUL +* @unsafe_ptr: unsafe address +* Return: +* > 0 length of the string including the trailing NUL on success +* < 0 error */ #define __BPF_FUNC_MAPPER (FN ) \ FN(unspec), \
@@ -476,7 +495,8 @@ union bpf_attr {FN (set_hash_invalid), \FN (get_numa_node_id), \FN (skb_change_head), \ -FN (xdp_adjust_head), +FN (xdp_adjust_head), \ +FN (probe_read_str),/* integer value in 'imm' field of BPF_CALL instruction selects which helper * function eBPF program intends to call
@@ -502,6 +522,7 @@ enum bpf_func_id {/* BPF_FUNC_l4_csum_replace flags. */ #define BPF_F_PSEUDO_HDR (1ULL << 4)#define BPF_F_MARK_MANGLED_0 (1ULL << 5) +#define BPF_F_MARK_ENFORCE (1ULL << 6)/* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */ #define BPF_F_INGRESS (1ULL << 0)
Signature · 1 line
2.11.0
PATCH 5/7 bpf: Simplify bpf_load_program() error handling in the library
In reply to Mickaël SalaünDo not call a second time bpf(2) when a program load failed.
--- tools/lib/bpf/bpf.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)
tools/lib/bpf/bpf.c +6 -12
@@ -73,7 +73,6 @@ int bpf_load_program(enum bpf_prog_type type, struct bpf_insn *insns, size_t insns_cnt, char *license, __u32 kern_version, char *log_buf, size_t log_buf_sz) { - int fd; union bpf_attr attr;bzero (&attr,sizeof (attr));
@@ -81,20 +80,15 @@ int bpf_load_program(enum bpf_prog_type type, struct bpf_insn *insns, attr.insn_cnt = (__u32 )insns_cnt; attr.insns =ptr_to_u64 (insns); attr.license =ptr_to_u64 (license); - attr.log_buf =ptr_to_u64 (NULL ); - attr.log_size =0 ; - attr.log_level =0 ; + attr.log_buf =ptr_to_u64 (log_buf); + attr.log_size = log_buf_sz; attr.kern_version = kern_version; - fd =sys_bpf (BPF_PROG_LOAD , &attr,sizeof (attr)); -if (fd >=0 || !log_buf || !log_buf_sz) -return fd; +if (log_buf && log_buf_sz >0 ) { + attr.log_level =1 ; + log_buf[0 ] =0 ; + } -/* Try again with log */ - attr.log_buf =ptr_to_u64 (log_buf); - attr.log_size = log_buf_sz; - attr.log_level =1 ; - log_buf[0 ] =0 ;return sys_bpf (BPF_PROG_LOAD , &attr,sizeof (attr)); }
Signature · 1 line
2.11.0
PATCH 6/7 bpf: Use the bpf_load_program() from the library
In reply to Mickaël SalaünReplace bpf_prog_load() with bpf_load_program() calls.
Use the tools include directory instead of the installed one to allow builds from other kernels.
--- tools/testing/selftests/bpf/Makefile | 6 +++++- tools/testing/selftests/bpf/bpf_sys.h | 21 --------------------- tools/testing/selftests/bpf/test_tag.c | 6 ++++-- tools/testing/selftests/bpf/test_verifier.c | 8 +++++--- 4 files changed, 14 insertions(+), 27 deletions(-)
tools/testing/selftests/bpf/Makefile +5 -1
@@ -1,12 +1,16 @@ -CFLAGS += -Wall -O2 -I../../../../usr/include +CFLAGS += -Wall -O2 -I../../../include/uapi -I../../../lib test_objs = test_verifier test_tag test_maps test_lru_map test_lpm_map TEST_PROGS := $(test_objs) test_kmod.sh TEST_FILES := $(test_objs) +LIBBPF := ../../../lib/bpf/bpf.o all: $(test_objs) +test_verifier: $(LIBBPF) +test_tag: $(LIBBPF) + include ../lib.mk clean:
tools/testing/selftests/bpf/bpf_sys.h +0 -21
@@ -84,25 +84,4 @@ static inline int bpf_map_create(enum bpf_map_type type, uint32_t size_key, return bpf(BPF_MAP_CREATE, &attr, sizeof(attr)); } -static inline int bpf_prog_load (enum bpf_prog_type type, -const struct bpf_insn *insns,size_t size_insns, -const char *license,char *log,size_t size_log) -{ -union bpf_attr attr = {}; - - attr.prog_type = type; - attr.insns =bpf_ptr_to_u64 (insns); - attr.insn_cnt = size_insns /sizeof (struct bpf_insn ); - attr.license =bpf_ptr_to_u64 (license); - -if (size_log >0 ) { - attr.log_buf =bpf_ptr_to_u64 (log); - attr.log_size = size_log; - attr.log_level =1 ; - log[0 ] =0 ; - } - -return bpf (BPF_PROG_LOAD , &attr,sizeof (attr)); -} -#endif /* __BPF_SYS__ */
tools/testing/selftests/bpf/test_tag.c +4 -2
@@ -16,6 +16,8 @@#include <linux/bpf.h> #include <linux/if_alg.h> +#include <bpf/bpf.h> +#include "../../../include/linux/filter.h" #include "bpf_sys.h"
@@ -55,8 +57,8 @@ static int bpf_try_load_prog(int insns, int fd_map,int fd_prog;bpf_filler (insns, fd_map); - fd_prog =bpf_prog_load (BPF_PROG_TYPE_SCHED_CLS , prog, insns * -sizeof (struct bpf_insn ),"" ,NULL ,0 ); + fd_prog =bpf_load_program (BPF_PROG_TYPE_SCHED_CLS , prog, insns,"" ,0 , +NULL ,0 );assert (fd_prog >0 );if (fd_map >0 )bpf_filler (insns,0 );
tools/testing/selftests/bpf/test_verifier.c +5 -3
@@ -23,6 +23,8 @@#include <linux/bpf_perf_event.h> #include <linux/bpf.h> +#include <bpf/bpf.h> +#include "../../../include/linux/filter.h" #include "bpf_sys.h"
@@ -4456,9 +4458,9 @@ static void do_test_single(struct bpf_test *test, bool unpriv,do_test_fixup (test, prog, &fd_f1, &fd_f2, &fd_f3); - fd_prog =bpf_prog_load (prog_type ? :BPF_PROG_TYPE_SOCKET_FILTER , - prog, prog_len *sizeof (struct bpf_insn ), -"GPL" , bpf_vlog,sizeof (bpf_vlog)); + fd_prog =bpf_load_program (prog_type ? :BPF_PROG_TYPE_SOCKET_FILTER , + prog, prog_len,"GPL" ,0 , bpf_vlog, +sizeof (bpf_vlog)); expected_ret = unpriv && test->result_unpriv !=UNDEF ? test->result_unpriv : test->result;
Signature · 1 line
2.11.0
PATCH 7/7 bpf: Always test unprivileged programs
In reply to Mickaël SalaünIf selftests are run as root, then execute the unprivileged checks as well. This switch from 240 to 364 tests.
The test numbers are suffixed with "/u" when executed as unprivileged or with "/p" when executed as privileged.
The geteuid() check is replaced with a capability check.
Handling capabilities require the libcap dependency.
--- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/test_verifier.c | 68 ++++++++++++++++++++++++++--- 2 files changed, 64 insertions(+), 6 deletions(-)
tools/testing/selftests/bpf/Makefile +1 -1
@@ -1,4 +1,4 @@ -CFLAGS += -Wall -O2 -I../../../include/uapi -I../../../lib +CFLAGS += -Wall -O2 -lcap -I../../../include/uapi -I../../../lib test_objs = test_verifier test_tag test_maps test_lru_map test_lpm_map
tools/testing/selftests/bpf/test_verifier.c +63 -5
93 lines not on this page · raw message
Signature · 1 line
2.11.0
Daniel Borkmann
maintainerRe: [PATCH net-next v1 6/7] bpf: Use the bpf_load_program() from the library
In reply to Mickaël SalaünQuoted 9 lines · Mickaël Salaün
Replace
bpf_prog_load()withbpf_load_program()calls.Use the tools include directory instead of the installed one to allow builds from other kernels.
Signed-off-by Mickaël Salaün <[email protected]>Cc Alexei Starovoitov <[email protected]>Cc Daniel Borkmann <[email protected]>Cc Shuah Khan <[email protected]>
Quoted 6 lines
--- tools/testing/selftests/bpf/Makefile | 6 +++++- tools/testing/selftests/bpf/bpf_sys.h | 21 --------------------- tools/testing/selftests/bpf/test_tag.c | 6 ++++-- tools/testing/selftests/bpf/test_verifier.c | 8 +++++--- 4 files changed, 14 insertions(+), 27 deletions(-)
No objections, but if so, can't we add the remaining missing pieces to bpf lib, so we can remove bpf_sys.h altogether?
Thanks,
Daniel
Re: [PATCH net-next v1 7/7] bpf: Always test unprivileged programs
In reply to Mickaël SalaünQuoted 6 lines · Mickaël Salaün
If selftests are run as root, then execute the unprivileged checks as well. This switch from 240 to 364 tests.
The test numbers are suffixed with "/u" when executed as unprivileged or with "/p" when executed as privileged.
Quoted 8 lines
The
geteuid()check is replaced with a capability check.Handling capabilities require the libcap dependency.
Signed-off-by Mickaël Salaün <[email protected]>Cc Alexei Starovoitov <[email protected]>Cc Daniel Borkmann <[email protected]>Cc Shuah Khan <[email protected]>
Very useful! Could probably also go as stand-alone to net-next, but how you prefer.
Re: [PATCH net-next v1 7/7] bpf: Always test unprivileged programs
In reply to Mickaël SalaünQuoted 7 lines · Mickaël Salaün
tools/testing/selftests/bpf/test_verifier.c +5
-2-if (unpriv && test->prog_type) -continue ; +if (!test->prog_type) { +if (!unpriv) +set_admin (false); +printf ("#%d/u %s " , i, test->descr); +do_test_single (test, true, &passes, &errors);
tools/testing/selftests/bpf/test_verifier.c static int do_test(bool unpriv, unsigned int from, unsigned int to) · line 4573
Quoted 10 lines
tools/testing/selftests/bpf/test_verifier.c +7
-2+if (!unpriv) +set_admin (true); + } -printf ("#%d %s " , i, test->descr); -do_test_single (test, unpriv, &passes, &errors); +if (!unpriv) { +printf ("#%d/p %s " , i, test->descr); +do_test_single (test, false, &passes, &errors); + }
great idea.
as far as other patches.. we need to figure out how to avoid conflicts between net-next and Arnaldo's tree where Joe's patches went.
Mickael,
can you see some way of splitting the patch set between trees? Like above test_verfier.c improvement needs to go into net-next. The rest can go via perf
Re: [PATCH net-next v1 6/7] bpf: Use the bpf_load_program() from the library
In reply to Daniel BorkmannQuoted 17 lines · Daniel Borkmann
Quoted 9 lines · Mickaël Salaün
Replace
bpf_prog_load()withbpf_load_program()calls.Use the tools include directory instead of the installed one to allow builds from other kernels.
Signed-off-by Mickaël Salaün <[email protected]>Cc Alexei Starovoitov <[email protected]>Cc Daniel Borkmann <[email protected]>Cc Shuah Khan <[email protected]>Quoted 6 lines
--- tools/testing/selftests/bpf/Makefile | 6 +++++- tools/testing/selftests/bpf/bpf_sys.h | 21 --------------------- tools/testing/selftests/bpf/test_tag.c | 6 ++++-- tools/testing/selftests/bpf/test_verifier.c | 8 +++++--- 4 files changed, 14 insertions(+), 27 deletions(-)
Quoted 6 lines
No objections, but if so, can't we add the remaining missing pieces to bpf lib, so we can remove
bpf_sys.haltogether?Thanks,
Daniel
OK, I'll send a new patch replacing bpf_sys.h entirely.
Mickaël
Daniel Borkmann
maintainerRe: [PATCH net-next v1 6/7] bpf: Use the bpf_load_program() from the library
Quoted 18 lines · Mickaël Salaün
Quoted 17 lines · Daniel Borkmann
Quoted 15 lines · Mickaël Salaün
Replace
bpf_prog_load()withbpf_load_program()calls.Use the tools include directory instead of the installed one to allow builds from other kernels.
Signed-off-by Mickaël Salaün <[email protected]>Cc Alexei Starovoitov <[email protected]>Cc Daniel Borkmann <[email protected]>Cc Shuah Khan <[email protected]>--- tools/testing/selftests/bpf/Makefile | 6 +++++- tools/testing/selftests/bpf/bpf_sys.h | 21 --------------------- tools/testing/selftests/bpf/test_tag.c | 6 ++++-- tools/testing/selftests/bpf/test_verifier.c | 8 +++++--- 4 files changed, 14 insertions(+), 27 deletions(-)
Quoted 4 lines
Quoted 2 lines
No objections, but if so, can't we add the remaining missing pieces to bpf lib, so we can remove
bpf_sys.haltogether?OK, I'll send a new patch replacing
bpf_sys.hentirely.
Sounds great, thanks!
Re: [PATCH net-next v1 7/7] bpf: Always test unprivileged programs
In reply to Alexei StarovoitovQuoted 19 lines · Alexei Starovoitov
Quoted 7 lines · Mickaël Salaün
tools/testing/selftests/bpf/test_verifier.c +5
-2-if (unpriv && test->prog_type) -continue ; +if (!test->prog_type) { +if (!unpriv) +set_admin (false); +printf ("#%d/u %s " , i, test->descr); +do_test_single (test, true, &passes, &errors);tools/testing/selftests/bpf/test_verifier.c static int do_test(bool unpriv, unsigned int from, unsigned int to) · line 4573
Quoted 10 lines
tools/testing/selftests/bpf/test_verifier.c +7
-2+if (!unpriv) +set_admin (true); + } -printf ("#%d %s " , i, test->descr); -do_test_single (test, unpriv, &passes, &errors); +if (!unpriv) { +printf ("#%d/p %s " , i, test->descr); +do_test_single (test, false, &passes, &errors); + }
Quoted 5 lines
great idea.
as far as other patches.. we need to figure out how to avoid conflicts between net-next and Arnaldo's tree where Joe's patches went.
A merge between this series and Arnaldo's tree works fine. The only dependency is between patches 6 and 7.
Quoted 7 lines
Mickael,
can you see some way of splitting the patch set between trees? Like abovetest_verfier.cimprovement needs to go into net-next. The rest can go via perf
OK, I'll send a first series with the patches from 1 to 5 for the perf tree and a second series with the 6th and 7th patches (touching tools/testing/selftests/bpf only) to net-next.
Re: [PATCH net-next v1 4/7] tools: Sync {,tools/}include/uapi/linux/bpf.h
In reply to Mickaël SalaünThis patch only make sense in net-next, however.
Quoted 75 lines · Mickaël Salaün
The tools version of this header is out of date; update it to the latest version from kernel header.
Signed-off-by Mickaël Salaün <[email protected]>Cc Alexei Starovoitov <[email protected]>Cc Arnaldo Carvalho de Melo <[email protected]>Cc Daniel Borkmann <[email protected]>Cc David S. Miller <[email protected]>--- tools/include/uapi/linux/bpf.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)tools/include/uapi/linux/bpf.h +22
-1@@ -63,6 +63,12 @@ struct bpf_insn {__s32 imm;/* signed immediate constant */ }; +/* Key of an a BPF_MAP_TYPE_LPM_TRIE entry */ +struct bpf_lpm_trie_key { +__u32 prefixlen;/* up to 32 for AF_INET, 128 for AF_INET6 */ +__u8 data[0 ];/* Arbitrary size */ +}; +/* BPF syscall commands, see bpf(2) man-page for details. */ enum bpf_cmd {BPF_MAP_CREATE ,@@ -89,6 +95,7 @@ enum bpf_map_type {BPF_MAP_TYPE_CGROUP_ARRAY ,BPF_MAP_TYPE_LRU_HASH ,BPF_MAP_TYPE_LRU_PERCPU_HASH , + BPF_MAP_TYPE_LPM_TRIE, }; enum bpf_prog_type {@@ -430,6 +437,18 @@ union bpf_attr {* @xdp_md: pointer to xdp_md * @delta: An positive/negative integer to be added to xdp_md.data * Return: 0 on success or negative on error +* +* int bpf_probe_read_str(void *dst, int size, const void *unsafe_ptr) +* Copy a NUL terminated string from unsafe address. In case the string +* length is smaller than size, the target is not padded with further NUL +* bytes. In case the string length is larger than size, just count-1 +* bytes are copied and the last byte is set to NUL. +* @dst: destination address +* @size: maximum number of bytes to copy, including the trailing NUL +* @unsafe_ptr: unsafe address +* Return: +* > 0 length of the string including the trailing NUL on success +* < 0 error */ #define __BPF_FUNC_MAPPER (FN ) \ FN(unspec), \@@ -476,7 +495,8 @@ union bpf_attr {FN (set_hash_invalid), \FN (get_numa_node_id), \FN (skb_change_head), \ -FN (xdp_adjust_head), +FN (xdp_adjust_head), \ +FN (probe_read_str),/* integer value in 'imm' field of BPF_CALL instruction selects which helper * function eBPF program intends to call @@ -502,6 +522,7 @@ enum bpf_func_id {/* BPF_FUNC_l4_csum_replace flags. */ #define BPF_F_PSEUDO_HDR (1ULL << 4)#define BPF_F_MARK_MANGLED_0 (1ULL << 5) +#define BPF_F_MARK_ENFORCE (1ULL << 6)/* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */ #define BPF_F_INGRESS (1ULL << 0)
Re: [PATCH net-next v1 6/7] bpf: Use the bpf_load_program() from the library
In reply to Daniel BorkmannQuoted 20 lines · Daniel Borkmann
Quoted 19 lines · Mickaël Salaün
Quoted 18 lines · Daniel Borkmann
Quoted 16 lines · Mickaël Salaün
Replace
bpf_prog_load()withbpf_load_program()calls.Use the tools include directory instead of the installed one to allow builds from other kernels.
Signed-off-by Mickaël Salaün <[email protected]>Cc Alexei Starovoitov <[email protected]>Cc Daniel Borkmann <[email protected]>Cc Shuah Khan <[email protected]>--- tools/testing/selftests/bpf/Makefile | 6 +++++- tools/testing/selftests/bpf/bpf_sys.h | 21 --------------------- tools/testing/selftests/bpf/test_tag.c | 6 ++++-- tools/testing/selftests/bpf/test_verifier.c | 8 +++++--- 4 files changed, 14 insertions(+), 27 deletions(-)
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
No objections, but if so, can't we add the remaining missing pieces to bpf lib, so we can remove
bpf_sys.haltogether?OK, I'll send a new patch replacing
bpf_sys.hentirely.Sounds great, thanks!
Do you prefer a big patch or one for each replaced function?
Daniel Borkmann
maintainerRe: [PATCH net-next v1 6/7] bpf: Use the bpf_load_program() from the library
Quoted 21 lines · Mickaël Salaün
Quoted 20 lines · Daniel Borkmann
Quoted 19 lines · Mickaël Salaün
Quoted 18 lines · Daniel Borkmann
Quoted 16 lines · Mickaël Salaün
Replace
bpf_prog_load()withbpf_load_program()calls.Use the tools include directory instead of the installed one to allow builds from other kernels.
Signed-off-by Mickaël Salaün <[email protected]>Cc Alexei Starovoitov <[email protected]>Cc Daniel Borkmann <[email protected]>Cc Shuah Khan <[email protected]>--- tools/testing/selftests/bpf/Makefile | 6 +++++- tools/testing/selftests/bpf/bpf_sys.h | 21 --------------------- tools/testing/selftests/bpf/test_tag.c | 6 ++++-- tools/testing/selftests/bpf/test_verifier.c | 8 +++++--- 4 files changed, 14 insertions(+), 27 deletions(-)
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
No objections, but if so, can't we add the remaining missing pieces to bpf lib, so we can remove
bpf_sys.haltogether?OK, I'll send a new patch replacing
bpf_sys.hentirely.Sounds great, thanks!
Do you prefer a big patch or one for each replaced function?
I think it makes sense to split it into two: i) this patch as-is for the prog part, and ii) rest for maps.
Re: [PATCH net-next v1 6/7] bpf: Use the bpf_load_program() from the library
Quoted 25 lines · Daniel Borkmann
Quoted 24 lines · Mickaël Salaün
Quoted 23 lines · Daniel Borkmann
Quoted 22 lines · Mickaël Salaün
Quoted 20 lines · Daniel Borkmann
Quoted 9 lines · Mickaël Salaün
Replace
bpf_prog_load()withbpf_load_program()calls.Use the tools include directory instead of the installed one to allow builds from other kernels.
Signed-off-by Mickaël Salaün <[email protected]>Cc Alexei Starovoitov <[email protected]>Cc Daniel Borkmann <[email protected]>Cc Shuah Khan <[email protected]>Quoted 7 lines
--- tools/testing/selftests/bpf/Makefile | 6 +++++- tools/testing/selftests/bpf/bpf_sys.h | 21 --------------------- tools/testing/selftests/bpf/test_tag.c | 6 ++++-- tools/testing/selftests/bpf/test_verifier.c | 8 +++++--- 4 files changed, 14 insertions(+), 27 deletions(-)No objections, but if so, can't we add the remaining missing pieces to bpf lib, so we can remove
bpf_sys.haltogether?
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
OK, I'll send a new patch replacing
bpf_sys.hentirely.Sounds great, thanks!
Do you prefer a big patch or one for each replaced function?
I think it makes sense to split it into two: i) this patch as-is for the prog part, and ii) rest for maps.
Hum, I already split them to ease the review. I'm going to send this series now.