linux-stable/tools
Eduard Zingerman 59dc9767ce bpftool: Print newline before '}' for struct with padding only fields
[ Upstream commit 44a726c3f2 ]

btf_dump_emit_struct_def attempts to print empty structures at a
single line, e.g. `struct empty {}`. However, it has to account for a
case when there are no regular but some padding fields in the struct.
In such case `vlen` would be zero, but size would be non-zero.

E.g. here is struct bpf_timer from vmlinux.h before this patch:

 struct bpf_timer {
 	long: 64;
	long: 64;};

And after this patch:

 struct bpf_dynptr {
 	long: 64;
	long: 64;
 };

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221001104425.415768-1-eddyz87@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-20 12:10:24 +02:00
..
accounting
arch parisc: Align parisc MADV_XXX constants with all other architectures 2023-01-14 10:16:51 +01:00
bootconfig bootconfig: Fix testcase to increase max node 2023-04-05 11:23:34 +02:00
bpf bpftool: profile online CPUs instead of possible 2023-03-11 16:39:25 +01:00
build tools build: Switch to new openssl API for test-libcrypto 2022-08-25 11:38:01 +02:00
cgroup tools/cgroup/slabinfo.py: updated to work on current kernel 2021-05-07 11:04:31 +02:00
debugging
edid
firewire
firmware
gpio tools: gpio: fix -c option of gpio-event-mon 2023-02-01 08:23:26 +01:00
hv
iio tools/iio/iio_utils:fix memory leak 2023-03-11 16:40:17 +01:00
include tools headers UAPI: Sync openat2.h with the kernel sources 2023-01-04 11:39:17 +01:00
io_uring
kvm/kvm_stat tools/kvm_stat: fix display of error when multiple processes are found 2022-08-11 13:06:45 +02:00
laptop
leds
lib bpftool: Print newline before '}' for struct with padding only fields 2023-04-20 12:10:24 +02:00
memory-model
objtool objtool: Fix memory leak in create_static_call_sections() 2023-03-11 16:40:08 +01:00
pci
pcmcia
perf perf tools: Fix auto-complete on aarch64 2023-03-11 16:39:40 +01:00
power tools/power turbostat: Fix /dev/cpu_dma_latency warnings 2023-04-05 11:23:46 +02:00
scripts tools: Allow proper CC/CXX/... override with LLVM=1 in Makefile.include 2021-07-31 08:16:10 +02:00
spi
testing selftests: intel_pstate: ftime() is deprecated 2023-04-20 12:10:24 +02:00
thermal/tmon tools/thermal: Fix possible path truncations 2022-08-21 15:16:12 +02:00
time
usb usb: testusb: Fix for showing the connection speed 2021-10-09 14:40:56 +02:00
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-02-22 12:55:53 +01:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:23:57 +01:00
wmi
Makefile