linux/tools
Jakub Kicinski d777b2ddbe bpf: don't zero out the info struct in bpf_obj_get_info_by_fd()
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 95b9afd398 ("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@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-26 17:02:52 -07:00
..
accounting tools: move accounting tool from Documentation 2016-09-23 13:07:15 -06:00
arch tools/include: Sync kernel ABI headers with tooling headers 2017-05-24 09:00:21 +02:00
build kbuild: simplify silent build (-s) detection 2017-06-06 09:01:12 +09:00
cgroup
firewire
gpio gpio-hammer: fix make consumer_label suitable to work on gpio-nails 2017-01-26 16:29:09 +01:00
hv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
iio iio: tools: generic_buffer: increase trigger length 2017-05-07 16:08:04 +01:00
include Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
kvm/kvm_stat tools/kvm_stat: add new interactive command 'b' 2017-06-27 16:44:50 +02:00
laptop tools: move laptops dslm tool from Documentation 2016-09-23 13:07:21 -06:00
leds tools/leds: Add led_hw_brightness_mon program 2017-02-14 22:20:23 +01:00
lguest Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 20:51:12 -07:00
lib bpf: don't zero out the info struct in bpf_obj_get_info_by_fd() 2017-07-26 17:02:52 -07:00
net tools: bpf_jit_disasm: Handle large images. 2017-06-14 15:03:22 -04:00
nfsd
objtool objtool: Fix sibling call detection logic 2017-07-08 10:29:48 +02:00
pci tools: PCI: Add sample test script to invoke pcitest 2017-04-28 10:23:20 -05:00
pcmcia tools: move pcmcia crc32hash tool from Documentation 2016-09-23 13:07:27 -06:00
perf mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic 2017-07-12 16:26:03 -07:00
power ACPI updates for v4.13-rc1 2017-07-04 14:16:49 -07:00
scripts kbuild: simplify silent build (-s) detection 2017-06-06 09:01:12 +09:00
spi spi: spidev_test: add option to continuously transfer data 2017-03-21 18:44:40 +00:00
testing bpf: don't zero out the info struct in bpf_obj_get_info_by_fd() 2017-07-26 17:02:52 -07:00
thermal/tmon
time
usb usb: changes for v4.13 merge window 2017-06-20 11:39:34 +08:00
virtio tools/virtio: fix spelling mistake: "wakeus" -> "wakeups" 2017-05-09 16:43:24 +03:00
vm tools/vm: add missing Makefile rules 2017-02-22 16:41:26 -08:00
Makefile tools: Add install make target for liblockdep 2017-06-05 09:28:08 +02:00