Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\module.c Create Date:2022-07-28 10:58:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:check_modinfo

Proto:static int check_modinfo(struct module *mod, struct load_info *info, int flags)

Type:int

Parameter:

TypeParameterName
struct module *mod
struct load_info *info
intflags
3110  modmagic = get_modinfo(info, "vermagic")
3113  If flags & MODULE_INIT_IGNORE_VERMAGIC Then modmagic = NULL
3117  If Not modmagic Then
3118  err = try_to_force_load(mod, "bad vermagic")
3119  If err Then Return err
3121  Else if Not same_magic(modmagic, vermagic, vers) Then
3122  pr_err("%s: version magic '%s' should be '%s'\n", name, modmagic, vermagic)
3124  Return -ENOEXEC
3127  If Not get_modinfo(info, "intree") Then
3128  If Not test_taint(TAINT_OOT_MODULE) Then pr_warn("%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  If get_modinfo(info, "staging") Then
3137  add_taint_module(mod, TAINT_CRAP, LOCKDEP_STILL_OK)
3138  pr_warn("%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  If err Then Return err
3147  set_license(mod, get_modinfo(info, "license"))
3149  Return 0
Caller
NameDescribe
layout_and_allocate