aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module/kmod.c
diff options
context:
space:
mode:
authorLuis Chamberlain <mcgrof@kernel.org>2023-03-19 14:35:39 -0700
committerLuis Chamberlain <mcgrof@kernel.org>2023-03-24 11:33:08 -0700
commitc7ee8aebf6c0588c0aab76538aff395c3abf811c (patch)
treeda8378b7e0eb83dc9cba8e95c40b7cc3f63e82b8 /kernel/module/kmod.c
parentmodule: add sanity check for ELF module section (diff)
downloadlinux-c7ee8aebf6c0588c0aab76538aff395c3abf811c.tar.gz
linux-c7ee8aebf6c0588c0aab76538aff395c3abf811c.zip
module: add stop-grap sanity check on module memcpy()
The integrity of the struct module we load is important, and although our ELF validator already checks that the module section must match struct module, add a stop-gap check before we memcpy() the final minted module. This also makes those inspecting the code what the goal is. While at it, clarify the goal behind updating the sh_addr address. The current comment is pretty misleading. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module/kmod.c')
0 files changed, 0 insertions, 0 deletions