Thread (4 messages) 4 messages, 2 authors, 2018-02-28

Re: [PATCH] selftests/bpf: Add bpf_probe_read_str to bpf_helpers.h

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2018-02-28 16:58:04
Also in: lkml

Hi Tushar,

On 02/28/2018 01:33 AM, Tushar Dave wrote:
Using bpf_probe_read_str() from samples/bpf causes compiler warning.
e.g.
warning: implicit declaration of function 'bpf_probe_read_str' is invalid in C99
      [-Wimplicit-function-declaration]
        num = bpf_probe_read_str(buf, sizeof(buf), ctx->di);
              ^
1 warning generated.

Add bpf_probe_read_str() to bpf_helpers.h so it can be used by
samples/bpf programs.

Signed-off-by: Tushar Dave <redacted>
In general no objections to it, but it would need an in-tree
user first:

$ git grep -n bpf_probe_read_str tools/
tools/include/uapi/linux/bpf.h:596: * int bpf_probe_read_str(void *dst, int size, const void *unsafe_ptr)
$

Why not adding this along with a sample?

Thanks,
Daniel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help