From: Daniel Borkmann <daniel@iogearbox.net>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: netdev@vger.kernel.org, oss-drivers@netronome.com,
alexei.starovoitov@gmail.com, kafai@fb.com
Subject: Re: [PATCH net] bpf: don't zero out the info struct in bpf_obj_get_info_by_fd()
Date: Wed, 26 Jul 2017 01:29:50 +0200 [thread overview]
Message-ID: <5977D46E.2070100@iogearbox.net> (raw)
In-Reply-To: <20170725161547.64d1cba5@cakuba.netronome.com>
On 07/26/2017 01:15 AM, Jakub Kicinski wrote:
> On Wed, 26 Jul 2017 00:59:49 +0200, Daniel Borkmann wrote:
>>> @@ -418,6 +420,8 @@ static void test_bpf_obj_id(void)
>>> nr_id_found++;
>>>
>>> err = bpf_obj_get_info_by_fd(prog_fd, &prog_info, &info_len);
>>> + prog_infos[i].jited_prog_insns = 0;
>>> + prog_infos[i].xlated_prog_insns = 0;
>>
>> Can you elaborate why this one above is needed?
>
> Ah, I removed the comment about it at the last minute. The check below
> compares the info we get here with info we got reading the programs in
> the earlier loop - using memcmp().
Yep, makes sense. I mistook it for 'length' given it is not NULL but 0,
but that is due to __aligned_u64. ;) Anyway, thanks for clarifying.
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
next prev parent reply other threads:[~2017-07-25 23:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 22:16 [PATCH net] bpf: don't zero out the info struct in bpf_obj_get_info_by_fd() Jakub Kicinski
2017-07-25 22:59 ` Daniel Borkmann
2017-07-25 23:15 ` Jakub Kicinski
2017-07-25 23:20 ` Jakub Kicinski
2017-07-25 23:29 ` Daniel Borkmann [this message]
2017-07-27 0:03 ` David Miller
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=5977D46E.2070100@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=alexei.starovoitov@gmail.com \
--cc=jakub.kicinski@netronome.com \
--cc=kafai@fb.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.