linux-stable/kernel/module
Viktor Malik bd5314f8dd kallsyms, bpf: Move find_kallsyms_symbol_value out of internal header
Moving find_kallsyms_symbol_value from kernel/module/internal.h to
include/linux/module.h. The reason is that internal.h is not prepared to
be included when CONFIG_MODULES=n. find_kallsyms_symbol_value is used by
kernel/bpf/verifier.c and including internal.h from it (without modules)
leads into a compilation error:

  In file included from ../include/linux/container_of.h:5,
                   from ../include/linux/list.h:5,
                   from ../include/linux/timer.h:5,
                   from ../include/linux/workqueue.h:9,
                   from ../include/linux/bpf.h:10,
                   from ../include/linux/bpf-cgroup.h:5,
                   from ../kernel/bpf/verifier.c:7:
  ../kernel/bpf/../module/internal.h: In function 'mod_find':
  ../include/linux/container_of.h:20:54: error: invalid use of undefined type 'struct module'
     20 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
        |                                                      ^~
  [...]

This patch fixes the above error.

Fixes: 31bf1dbccf ("bpf: Fix attaching fentry/fexit/fmod_ret/lsm to modules")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Viktor Malik <vmalik@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/oe-kbuild-all/202303161404.OrmfCy09-lkp@intel.com/
Link: https://lore.kernel.org/bpf/20230317095601.386738-1-vmalik@redhat.com
2023-03-17 13:45:51 +01:00
..
debug_kmemleak.c
decompress.c module/decompress: Support zstd in-kernel decompression 2022-12-07 12:05:05 -08:00
internal.h kallsyms, bpf: Move find_kallsyms_symbol_value out of internal header 2023-03-17 13:45:51 +01:00
kallsyms.c livepatch: Improve the search performance of module_kallsyms_on_each_symbol() 2023-01-19 17:07:15 -08:00
Kconfig module/decompress: Support zstd in-kernel decompression 2022-12-07 12:05:05 -08:00
kdb.c
livepatch.c
main.c module: Use kstrtobool() instead of strtobool() 2023-01-25 14:07:21 -08:00
Makefile
procfs.c module: Modify module_flags() to accept show_state argument 2022-07-14 17:40:23 -07:00
signing.c
strict_rwx.c
sysfs.c module: remove redundant module_sysfs_initialized variable 2022-11-11 10:19:52 -08:00
tracking.c module: tracking: Keep a record of tainted unloaded modules only 2022-10-10 12:16:19 -07:00
tree_lookup.c
version.c