OSDN Git Service

module: merge remnants of setup_load_info() to elf validation
authorLuis Chamberlain <mcgrof@kernel.org>
Sun, 19 Mar 2023 21:35:41 +0000 (14:35 -0700)
committerLuis Chamberlain <mcgrof@kernel.org>
Fri, 24 Mar 2023 18:33:08 +0000 (11:33 -0700)
commit3d40bb903ed1f654707d34bdd61ee2c332000e4b
tree1e699e99326e12441d5eca0773f11683597d5810
parent1bb49db9919a4d4186cba288930e7026d8f7ec96
module: merge remnants of setup_load_info() to elf validation

The setup_load_info() was actually had ELF validation checks of its
own. To later cache useful variables as an secondary step just means
looping again over the ELF sections we just validated. We can simply
keep tabs of the key sections of interest as we validate the module
ELF section in one swoop, so do that and merge the two routines
together.

Expand a bit on the documentation / intent / goals.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
kernel/module/main.c