2.6.26 코어에서 "no symbol version for xxx"문제
2.6.26: 코드는 다음과 같습니다.
#ifdef CONFIG_MODVERSIONS
static int check_version(Elf_Shdr *sechdrs,
unsigned int versindex,
const char *symname,
struct module *mod,
const unsigned long *crc)
{
unsigned int i, num_versions;
struct modversion_info *versions;
/* Exporting module didn't supply crcs? OK, we're already tainted. */
if (!crc)
return 1;
/* No versions at all? modprobe --force does this. */
if (versindex == 0)
return try_to_force_load(mod, symname) == 0;
versions = (void *) sechdrs[versindex].sh_addr;
num_versions = sechdrs[versindex].sh_size
/ sizeof(struct modversion_info);
for (i = 0; i < num_versions; i++) {
if (strcmp(versions[i].name, symname) != 0)
continue;
if (versions[i].crc == *crc)
return 1;
DEBUGP("Found checksum %lX vs module %lX
",
*crc, versions[i].crc);
goto bad_version;
}
printk(KERN_WARNING "%s: no symbol version for %s
",
mod->name, symname);
return 0;
bad_version:
printk("%s: disagrees about version of symbol %s
",
mod->name, symname);
return 0;
}
static int try_to_force_load(struct module *mod, const char *symname)
{
#ifdef CONFIG_MODULE_FORCE_LOAD
if (!(tainted & TAINT_FORCED_MODULE))
printk("%s: no version for \"%s\" found: kernel tainted.
",
mod->name, symname);
add_taint_module(mod, TAINT_FORCED_MODULE);
return 0;
#else
return -ENOEXEC;
#endif
}
2.6.25:
#ifdef CONFIG_MODVERSIONS
static int check_version(Elf_Shdr *sechdrs,
unsigned int versindex,
const char *symname,
struct module *mod,
const unsigned long *crc)
{
unsigned int i, num_versions;
struct modversion_info *versions;
/* Exporting module didn't supply crcs? OK, we're already tainted. */
if (!crc)
return 1;
versions = (void *) sechdrs[versindex].sh_addr;
num_versions = sechdrs[versindex].sh_size
/ sizeof(struct modversion_info);
for (i = 0; i < num_versions; i++) {
if (strcmp(versions[i].name, symname) != 0)
continue;
if (versions[i].crc == *crc)
return 1;
printk("%s: disagrees about version of symbol %s
",
mod->name, symname);
DEBUGP("Found checksum %lX vs module %lX
",
*crc, versions[i].crc);
return 0;
}
/* Not in module's version table. OK, but that taints the kernel. */
if (!(tainted & TAINT_FORCED_MODULE))
printk("%s: no version for \"%s\" found: kernel tainted.
",
mod->name, symname);
add_taint_module(mod, TAINT_FORCED_MODULE);
return 1;
}
해결 방법: 1. 커널을 다시 컴파일하고 CONFIG 를 닫습니다.MODVERSIONS 옵션 2, 커널을 다시 컴파일하여 MODULE 열기FORCE_LOAD 옵션, 강제 로드 3, 복사 Module.symversion에서 내장 원본 디렉터리로 이동한 다음 내장 원본 디렉터리에서make prepare를 실행한 다음 모듈을 컴파일할 때 KERN 을 추가합니다DIR=/usr/src/linux 4, Module 코드를 수정하고/proc/kallsyms를 통해 주소를 얻으며 함수 포인터를 부여하여 참고 자료를 사용합니다.http://www.4front-tech.com/forum/viewtopic.php?p=10907&sid=43dc39cc92cbe35d27a4f89ec1208eb0 http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/1c724e019da71903 http://ubuntuforums.org/showthread.php?p=6119045
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.