]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Support flexible arrays in CO-RE
authorAndrii Nakryiko <andriin@fb.com>
Sun, 15 Dec 2019 07:08:43 +0000 (23:08 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 16 Dec 2019 00:53:50 +0000 (16:53 -0800)
commit60ac62f2b031107c4b9b9a43a70a78bfa789c452
tree0841268af64cfe610cc4bad434f6dd7d43ebb3a9
parentc598467b568c7ad727bb9ed90100abfb1dba43d1
libbpf: Support flexible arrays in CO-RE

Some data stuctures in kernel are defined with either zero-sized array or
flexible (dimensionless) array at the end of a struct. Actual data of such
array follows in memory immediately after the end of that struct, forming its
variable-sized "body" of elements. Support such access pattern in CO-RE
relocation handling.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20191215070844.1014385-2-andriin@fb.com
tools/lib/bpf/libbpf.c