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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 02/28/2018 08:57 AM, Daniel Borkmann wrote:
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 <tushar.n.dave@xxxxxxxxxx>

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?
Okay, I will send new patch along with new sample or add usage of
bpf_probe_read_str() in one of our exiting sample :)

Thanks.
-Tushar
PS: adding correct mail-list this time linux-kselftest@xxxxxxxxxxxxxxx

Thanks,
Daniel

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux