aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/bin/export-to-postgresql-record
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2020-03-05 05:12:16 -0600
committerKalle Valo <kvalo@codeaurora.org>2020-03-23 19:13:28 +0200
commit8622a0e5a499e99aeee4df66eacfb25830c57388 (patch)
tree14025c78ab934b548abe1eb41e95254bfd0b6fb1 /tools/perf/scripts/python/bin/export-to-postgresql-record
parentbrcmfmac: Replace zero-length array with flexible-array member (diff)
downloadlinux-8622a0e5a499e99aeee4df66eacfb25830c57388.tar.gz
linux-8622a0e5a499e99aeee4df66eacfb25830c57388.zip
zd1211rw: Replace zero-length array with flexible-array member
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200305111216.GA24982@embeddedor
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-record')
0 files changed, 0 insertions, 0 deletions
linux/commit/tools/bpf/bpftool/gen.c?id=159ecc002b5f55f9c58de533551a2ee552861185&follow=1'>bpftool: Fix compilation warning on shadowed variablePaul Chaignon1-1/+1 2019-12-16libbpf: Fix build by renaming variablesPrashant Bhole1-6/+6 2019-12-15selftests/bpf: Add flexible array relocation testsAndrii Nakryiko6-4/+56 2019-12-15libbpf: Support flexible arrays in CO-REAndrii Nakryiko1-5/+29 2019-12-15selftests/bpf: Add tests for libbpf-provided externsAndrii Nakryiko4-1/+283 2019-12-15bpftool: Generate externs datasec in BPF skeletonAndrii Nakryiko2-5/+9 2019-12-15libbpf: Support libbpf-provided extern variablesAndrii Nakryiko8-66/+729 2019-12-15libbpf: Extract internal map names into constantsAndrii Nakryiko1-9/+14 2019-12-15bpftool: Add `gen skeleton` BASH completionsAndrii Nakryiko1-0/+11 2019-12-15selftests/bpf: Add test validating data section to struct convertion layoutAndrii Nakryiko2-0/+88 2019-12-15selftests/bpf: Convert few more selftest to skeletonsAndrii Nakryiko5-249/+149 2019-12-15selftests/bpf: Add BPF skeletons selftests and convert attach_probe.cAndrii Nakryiko4-133/+74 2019-12-15bpftool: Add skeleton codegen commandAndrii Nakryiko3-1/+554 2019-12-15libbpf: Add BPF object skeleton supportAndrii Nakryiko3-0/+205 2019-12-15libbpf: Reduce log level of supported section names dumpAndrii Nakryiko1-1/+1 2019-12-15libbpf: Postpone BTF ID finding for TRACING programs to load phaseAndrii Nakryiko1-19/+18 2019-12-15libbpf: Refactor global data map initializationAndrii Nakryiko1-38/+59 2019-12-15libbpf: Expose BPF program's function nameAndrii Nakryiko4-14/+36 2019-12-15libbpf: Expose BTF-to-C type declaration emitting APIAndrii Nakryiko3-26/+65 2019-12-15libbpf: Expose btf__align_of() APIAndrii Nakryiko4-41/+47 2019-12-15libbpf: Extract common user-facing helpersAndrii Nakryiko4-34/+44 2019-12-15libbpf: Add BPF_EMBED_OBJ macro for embedding BPF .o filesAndrii Nakryiko2-20/+38 2019-12-15libbpf: Move non-public APIs from libbpf.h to libbpf_internal.hAndrii Nakryiko3-17/+18 2019-12-15libbpf: Add generic bpf_program__attach()Andrii Nakryiko4-38/+153 2019-12-15libbpf: Don't require root for bpf_object__open()Andrii Nakryiko1-42/+41 2019-12-15libbpf: Fix readelf output parsing for FedoraThadeu Lima de Souza Cascardo1-0/+2 2019-12-15bpftool: Match maps by namePaul Chaignon4-88/+439 2019-12-15bpftool: Match programs by namePaul Chaignon5-18/+42 2019-12-15bpftool: Match several programs with same tagPaul Chaignon2-120/+268 2019-12-13selftests/bpf: Test wire_len/gso_segs in BPF_PROG_TEST_RUNStanislav Fomichev2-0/+7 2019-12-13bpf: Expose __sk_buff wire_len/gso_segs to BPF_PROG_TEST_RUNStanislav Fomichev1-1/+18 2019-12-13bpf, x86: Align dispatcher branch targets to 16BBjörn Töpel2-2/+30