Modules updates for v5.12

Summary of modules changes for the 5.12 merge window:

- Retire EXPORT_UNUSED_SYMBOL() and EXPORT_SYMBOL_GPL_FUTURE(). These export
  types were introduced between 2006 - 2008. All the of the unused symbols have
  been long removed and gpl future symbols were converted to gpl quite a long
  time ago, and I don't believe these export types have been used ever since.
  So, I think it should be safe to retire those export types now. (Christoph Hellwig)

- Refactor and clean up some aged code cruft in the module loader (Christoph Hellwig)

- Build {,module_}kallsyms_on_each_symbol only when livepatching is enabled, as
  it is the only caller (Christoph Hellwig)

- Unexport find_module() and module_mutex and fix the last module
  callers to not rely on these anymore. Make module_mutex internal to
  the module loader. (Christoph Hellwig)

- Harden ELF checks on module load and validate ELF structures before checking
  the module signature (Frank van der Linden)

- Fix undefined symbol warning for clang (Fangrui Song)

- Fix smatch warning (Dan Carpenter)

Signed-off-by: Jessica Yu <jeyu@kernel.org>
module: potential uninitialized return in module_kallsyms_on_each_symbol()

Smatch complains that:

	kernel/module.c:4472 module_kallsyms_on_each_symbol()
        error: uninitialized symbol 'ret'.

This warning looks like it could be correct if the &modules list is
empty.

Fixes: 013c1667cf78 ("kallsyms: refactor {,module_}kallsyms_on_each_symbol")
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
1 file changed