diff options
| author | Ian Rogers <[email protected]> | 2023-10-07 04:44:38 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2023-10-09 16:36:51 +0000 |
| commit | 23671f4dfd10b48b4a2fee4768886f0d8ec55b7e (patch) | |
| tree | f7ceaabf5fa48283752f94b512f06ca24e5ff282 /tools/testing/selftests/bpf/progs/recvmsg_unix_prog.c | |
| parent | selftests/bpf: Test pinning bpf timer to a core (diff) | |
| download | kernel-23671f4dfd10b48b4a2fee4768886f0d8ec55b7e.tar.gz kernel-23671f4dfd10b48b4a2fee4768886f0d8ec55b7e.zip | |
bpftool: Align output skeleton ELF code
libbpf accesses the ELF data requiring at least 8 byte alignment,
however, the data is generated into a C string that doesn't guarantee
alignment. Fix this by assigning to an aligned char array. Use sizeof
on the array, less one for the \0 terminator, rather than generating a
constant.
Fixes: a6cc6b34b93e ("bpftool: Provide a helper method for accessing skeleton's embedded ELF data")
Signed-off-by: Ian Rogers <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Reviewed-by: Alan Maguire <[email protected]>
Acked-by: Quentin Monnet <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/progs/recvmsg_unix_prog.c')
0 files changed, 0 insertions, 0 deletions
