函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\module.c Create Date:2022-07-27 11:59:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:check_modinfo

函数原型:static int check_modinfo(struct module *mod, struct load_info *info, int flags)

返回类型:int

参数:

类型参数名称
struct module *mod
struct load_info *info
intflags
3110  modmagic等于get_modinfo(info, "vermagic")
3113  如果flags按位与MODULE_INIT_IGNORE_VERMAGICmodmagic = NULL
3117  如果非modmagic
3118  err等于try_to_force_load(mod, "bad vermagic")
3119  如果err则返回:err
3121  否则如果非same_magic(modmagic, vermagic, vers)则
3122  打印错误信息("%s: version magic '%s' should be '%s'\n", name, modmagic, vermagic)
3124  返回:负ENOEXEC
3127  如果非get_modinfo(info, "intree")则
3128  如果非test_taint(TAINT_OOT_MODULE)则打印警告信息("%s: loading out-of-tree module taints kernel.\n", Unique handle for this module )
3131  add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK)
3134  check_modinfo_retpoline(mod, info)
3136  如果get_modinfo(info, "staging")则
3137  add_taint_module(mod, TAINT_CRAP, LOCKDEP_STILL_OK)
3138  打印警告信息("%s: module is from the staging directory, the quality is unknown, you have been warned.\n", Unique handle for this module )
3142  err等于check_modinfo_livepatch(mod, info)
3143  如果err则返回:err
3147  set_license(mod, get_modinfo(info, "license"))
3149  返回:0
调用者
名称描述
layout_and_allocate