bpf: do not use structured initialization for bpf_attr
authorLuca Boccassi <bluca@debian.org>
Sun, 10 Jan 2021 15:36:31 +0000 (15:36 +0000)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 Feb 2021 13:52:53 +0000 (14:52 +0100)
commit95ee2c6b481b7a1f953cb720c35df568b7a6cb70
treedb28832c15e76d16bb351c670ae5a15059475247
parent3dcf950663f906db8a9baa465bd2ac384e832a46
bpf: do not use structured initialization for bpf_attr

It looks like zero'ing the struct is not enough, and with some level
of optimizations there is still non-zero padding left over.
Switch to member-by-member initialization. Also convert all remaining
bpf_attr variables in other files.

(cherry picked from commit 9ca600e2bfacc52a65c89f3485723b2c27394e55)
src/core/bpf-firewall.c
src/shared/bpf-program.c
src/test/test-bpf-firewall.c