• Luis Chamberlain's avatar
    module: add stop-grap sanity check on module memcpy() · c7ee8aeb
    Luis Chamberlain authored
    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: default avatarLuis Chamberlain <mcgrof@kernel.org>
    c7ee8aeb
main.c 80.6 KB