netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tushar Dave <tushar.n.dave@oracle.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
	ast@kernel.org, shuah@kernel.org, netdev@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/bpf: Add bpf_probe_read_str to bpf_helpers.h
Date: Wed, 28 Feb 2018 13:28:16 -0800	[thread overview]
Message-ID: <f7ff30a7-888f-bb3c-b6b5-48c82d5b0c08@oracle.com> (raw)
In-Reply-To: <1d72361e-e8a7-38e0-16db-ade3f658ce92@iogearbox.net>



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@oracle.com>
> 
> 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@vger.kernel.org
> 
> Thanks,
> Daniel
> 

  reply	other threads:[~2018-02-28 21:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28  0:33 [PATCH] selftests/bpf: Add bpf_probe_read_str to bpf_helpers.h Tushar Dave
2018-02-28 16:57 ` Daniel Borkmann
2018-02-28 21:28   ` Tushar Dave [this message]
2018-02-28 21:31     ` Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7ff30a7-888f-bb3c-b6b5-48c82d5b0c08@oracle.com \
    --to=tushar.n.dave@oracle.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).