Re: [RFC PATCH bpf-next 2/2] selftests/bpf: Test __ksym externs with BTF

2020-07-21 Thread Hao Luo
Ack. Will have that in v2. Hao On Mon, Jul 20, 2020 at 7:37 PM Andrii Nakryiko wrote: > > On Mon, Jul 20, 2020 at 1:28 PM Hao Luo wrote: > > > > > > > > This should ideally look like a real global variable extern: > > > > > > extern const struct rq runqueues __ksym; > > > > > > > > > But that's

Re: [RFC PATCH bpf-next 2/2] selftests/bpf: Test __ksym externs with BTF

2020-07-20 Thread Andrii Nakryiko
On Mon, Jul 20, 2020 at 1:28 PM Hao Luo wrote: > > > > > This should ideally look like a real global variable extern: > > > > extern const struct rq runqueues __ksym; > > > > > > But that's the case for non-per-cpu variables. You didn't seem to > > address per-CPU variables in this patch set. How

Re: [RFC PATCH bpf-next 2/2] selftests/bpf: Test __ksym externs with BTF

2020-07-20 Thread Hao Luo
> > This should ideally look like a real global variable extern: > > extern const struct rq runqueues __ksym; > > > But that's the case for non-per-cpu variables. You didn't seem to > address per-CPU variables in this patch set. How did you intend to > handle that? We should look at a possible BPF

Re: [RFC PATCH bpf-next 2/2] selftests/bpf: Test __ksym externs with BTF

2020-07-19 Thread Andrii Nakryiko
On Wed, Jul 15, 2020 at 2:46 PM Hao Luo wrote: > > Extend ksyms.c selftest to make sure BTF enables direct loads of ksyms. > > Note that test is done against the kernel btf extended with kernel VARs. > > Signed-off-by: Hao Luo > --- > tools/testing/selftests/bpf/prog_tests/ksyms.c | 2 ++ > too

[RFC PATCH bpf-next 2/2] selftests/bpf: Test __ksym externs with BTF

2020-07-15 Thread Hao Luo
Extend ksyms.c selftest to make sure BTF enables direct loads of ksyms. Note that test is done against the kernel btf extended with kernel VARs. Signed-off-by: Hao Luo --- tools/testing/selftests/bpf/prog_tests/ksyms.c | 2 ++ tools/testing/selftests/bpf/progs/test_ksyms.c | 14 ++