• Kees Cook's avatar
    module: Add module name to modinfo · 3e2e857f
    Kees Cook authored
    Accessing the mod structure (e.g. for mod->name) prior to having completed
    check_modstruct_version() can result in writing garbage to the error logs
    if the layout of the mod structure loaded from disk doesn't match the
    running kernel's mod structure layout. This kind of mismatch will become
    much more likely if a kernel is built with different randomization seed
    for the struct layout randomization plugin.
    
    Instead, add and use a new modinfo string for logging the module name.
    Signed-off-by: default avatarKees Cook <keescook@chromium.org>
    Signed-off-by: default avatarJessica Yu <jeyu@redhat.com>
    3e2e857f
modpost.c 66 KB