libbpf: Clarify kernel type use with USER variants of CORE reading macros
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 8 Jan 2021 19:44:08 +0000 (11:44 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 8 Jan 2021 22:06:03 +0000 (14:06 -0800)
commite22d7f05e445165e58feddb4e40cc9c0f94453bc
tree44c46af75ccfcbb3f2b5e82628ab2840f61e65d9
parent9a8120a8d7eb872da43e61d598c226f0d6b7ce5f
libbpf: Clarify kernel type use with USER variants of CORE reading macros

Add comments clarifying that USER variants of CO-RE reading macro are still
only going to work with kernel types, defined in kernel or kernel module BTF.
This should help preventing invalid use of those macro to read user-defined
types (which doesn't work with CO-RE).

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210108194408.3468860-1-andrii@kernel.org
tools/lib/bpf/bpf_core_read.h