]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Keep module's btf_data_size intact after load
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 3 Dec 2020 20:46:22 +0000 (12:46 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 4 Dec 2020 01:38:20 +0000 (17:38 -0800)
commit3244d6ee01b52122a95e695b4c2866a398980362
tree34b719c69071e4b17daf35bf48c42263176c82e8
parent96e70c5a0ef263dae696cef1cbdec723d951b782
bpf: Keep module's btf_data_size intact after load

Having real btf_data_size stored in struct module is benefitial to quickly
determine which kernel modules have associated BTF object and which don't.
There is no harm in keeping this info, as opposed to keeping invalid pointer.

Fixes: a5b690c3b0b7 ("bpf: Sanitize BTF data pointer after module is loaded")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20201203204634.1325171-3-andrii@kernel.org
kernel/module.c