bpf: Fix fds_example SIGSEGV error
authorWenbo Zhang <ethercflow@gmail.com>
Fri, 10 Jul 2020 09:20:35 +0000 (05:20 -0400)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 10 Jul 2020 21:25:25 +0000 (23:25 +0200)
commiteef8a42d6ce087d1c81c960ae0d14f955b742feb
treecb2deede30a7bd2f068726f62d7678c319a62366
parent5c3320d7fece4612d4a413aa3c8e82cdb5b49fcb
bpf: Fix fds_example SIGSEGV error

The `BPF_LOG_BUF_SIZE`'s value is `UINT32_MAX >> 8`, so define an array
with it on stack caused an overflow.

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200710092035.28919-1-ethercflow@gmail.com
samples/bpf/fds_example.c