[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170726.170319.672846958236203133.davem@davemloft.net>
Date: Wed, 26 Jul 2017 17:03:19 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jakub.kicinski@...ronome.com
Cc: netdev@...r.kernel.org, daniel@...earbox.net,
oss-drivers@...ronome.com, alexei.starovoitov@...il.com,
kafai@...com
Subject: Re: [PATCH net] bpf: don't zero out the info struct in
bpf_obj_get_info_by_fd()
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
Date: Tue, 25 Jul 2017 15:16:12 -0700
> The buffer passed to bpf_obj_get_info_by_fd() should be initialized
> to zeros. Kernel will enforce that to guarantee we can safely extend
> info structures in the future.
>
> Making the bpf_obj_get_info_by_fd() call in libbpf perform the zeroing
> is problematic, however, since some members of the info structures
> may need to be initialized by the callers (for instance pointers
> to buffers to which kernel is to dump translated and jited images).
>
> Remove the zeroing and fix up the in-tree callers before any kernel
> has been released with this code.
>
> As Daniel points out this seems to be the intended operation anyway,
> since commit 95b9afd3987f ("bpf: Test for bpf ID") is itself setting
> the buffer pointers before calling bpf_obj_get_info_by_fd().
>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
Applied, thanks Jakub.
Powered by blists - more mailing lists