/* If we have extended version info, rely on it */ if (info->index.vers_ext_crc) {
for_each_modversion_info_ext(version_ext, info) { if (strcmp(version_ext.name, symname) != 0) continue; if (*version_ext.crc == *crc) return 1;
pr_debug("Found checksum %X vs module %X\n",
*crc, *version_ext.crc); goto bad_version;
}
pr_warn_once("%s: no extended symbol version for %s\n",
info->name, symname); return 1;
}
/* No versions at all? modprobe --force does this. */ if (versindex == 0) return try_to_force_load(mod, symname) == 0;
/* * Since this should be found in kernel (which can't be removed), no * locking is necessary. Regardless use a RCU read section to keep * lockdep happy.
*/
scoped_guard(rcu)
have_symbol = find_symbol(&fsa);
BUG_ON(!have_symbol);
/* First part is kernel version, which we ignore if module has crcs. */ int same_magic(constchar *amagic, constchar *bmagic, bool has_crcs)
{ if (has_crcs) {
amagic += strcspn(amagic, " ");
bmagic += strcspn(bmagic, " ");
} return strcmp(amagic, bmagic) == 0;
}
/* * Both of these fields are needed for this to be useful * Any future fields should be initialized to NULL if absent.
*/ if (crc_idx == 0 || name_idx == 0) {
start->remaining = 0; return;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.