[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4dbf9968-d94f-75d5-6043-6f173aa3c01e@iogearbox.net>
Date: Thu, 28 Mar 2019 17:30:13 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: "Daniel T. Lee" <danieltimlee@...il.com>,
Alexei Starovoitov <ast@...nel.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH v2 2/2] samples, selftests/bpf: add NULL check for
ksym_search
On 03/27/2019 03:45 PM, Daniel T. Lee wrote:
> Since, ksym_search added with verification logic for symbols existence,
> it could return NULL when the kernel symbols are not loaded.
>
> This commit will add NULL check logic after ksym_search.
>
> Signed-off-by: Daniel T. Lee <danieltimlee@...il.com>
> ---
> Changes in v2:
> - Added NULL check for selftests/bpf/prog_tests/get_stack_raw_tp.c
>
> samples/bpf/offwaketime_user.c | 5 +++++
> samples/bpf/sampleip_user.c | 5 +++++
> samples/bpf/trace_event_user.c | 5 +++++
> tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c | 4 ++--
> 4 files changed, 17 insertions(+), 2 deletions(-)
Still not all occurrences from samples covered:
$ git grep -n ksym_search samples/bpf/
samples/bpf/offwaketime_user.c:30: sym = ksym_search(addr);
samples/bpf/sampleip_user.c:111: sym = ksym_search(counts[i].ip);
samples/bpf/spintest_user.c:39: sym = ksym_search(value);
samples/bpf/trace_event_user.c:36: sym = ksym_search(addr);
Powered by blists - more mailing lists