Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1577012

Re: [PATCH net-next v3 04/11] bpf: Use bpf_load_program() from the library

From Mickaël Salaün <mic@digikod.net>
Newsgroups linux.kernel
Subject Re: [PATCH net-next v3 04/11] bpf: Use bpf_load_program() from the library
Date 2017-02-08 21:10 +0100
Message-ID <t8GIW-4OC-23@gated-at.bofh.it> (permalink)
References <t8lO9-8hG-3@gated-at.bofh.it> <t8lOa-8hG-31@gated-at.bofh.it> <t8GpA-4sD-25@gated-at.bofh.it> <t8Gzg-4w9-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 08/02/2017 20:46, Arnaldo Carvalho de Melo wrote:
> Em Tue, Feb 07, 2017 at 03:17:43PM -0800, Alexei Starovoitov escreveu:
>> On 2/7/17 1:44 PM, Mickaël Salaün wrote:
>>> -	union bpf_attr attr;
>>> +	union bpf_attr attr = {};
>>>
>>> -	bzero(&attr, sizeof(attr));
>>
>> I think somebody mentioned that there are compilers out there
>> that don't do it correctly, hence it was done with explicit bzero.
>> Arnaldo, Wang, do you remember the details?
> 
> https://www.spinics.net/lists/netdev/msg411144.html
> 
> But this was when some named initializers are used in a union with
> unnamed members like 'union bpf_attr', unsure if this would break with
> the above case where no named initializers are being used.
> 
> Having that said, the above is gratuitous, the code that is being
> replaced is not related to the patch at hand, and conceptually the end
> result should be the same.
> 
> So, please, just leave it as is, i.e. using bzero() and make your patch
> a bit smaller, remember, small is good, smaller is even better ;-)
> 
> - Arnaldo
> 

Right, I'll do it.

Thanks

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH net-next v3 04/11] bpf: Use bpf_load_program() from the library Mickaël Salaün <mic@digikod.net> - 2017-02-07 22:50 +0100
  Re: [PATCH net-next v3 04/11] bpf: Use bpf_load_program() from the  library Arnaldo Carvalho de Melo <acme@redhat.com> - 2017-02-08 20:50 +0100
  Re: [PATCH net-next v3 04/11] bpf: Use bpf_load_program() from the  library Arnaldo Carvalho de Melo <acme@redhat.com> - 2017-02-08 21:00 +0100
    Re: [PATCH net-next v3 04/11] bpf: Use bpf_load_program() from the  library Mickaël Salaün <mic@digikod.net> - 2017-02-08 21:10 +0100

csiph-web