가끔 insmod를 하면 커널 버전이 달라서 업로드가 안될때가 있습니다.
이때 이 커널 버전(버전이라기 보다는 이름이 쭉 있고 끝에 버전이 붙어있는것 같습니다)를 결정짓는게 컴파일시에 커널의 디렉토리명인가요? 내가 사용하고 싶어하는 모듈의 커널 버전과 현재 커널버전을 어떻게 매칭시키게 되는건가요?
/sbin/modinfo 명령으로 커널 모듈의 정보를 보면 vermagic이 있습니다. 커널에서 모듈을 불러올 때는 단순히 커널 버전을 보는 게 아니라 vermagic을 참고합니다. 제 데비안 unstable 기준으로 vermagic은 커널 버전, SMP 여부, 세부 아키텍처를 포함하고 있었습니다. vermagic이 달라지면 로드를 거부합니다. 강제로 로드할 수도 있지만 추천하지는 않습니다.
vermagic은 커널 버전 및 설정에 따라서 달라집니다.
---- 절취선 ----http://blog.peremen.name
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
/sbin/modinfo 명령으로
/sbin/modinfo 명령으로 커널 모듈의 정보를 보면 vermagic이 있습니다. 커널에서 모듈을 불러올 때는 단순히 커널 버전을 보는 게 아니라 vermagic을 참고합니다. 제 데비안 unstable 기준으로 vermagic은 커널 버전, SMP 여부, 세부 아키텍처를 포함하고 있었습니다. vermagic이 달라지면 로드를 거부합니다. 강제로 로드할 수도 있지만 추천하지는 않습니다.
vermagic은 커널 버전 및 설정에 따라서 달라집니다.
---- 절취선 ----
http://blog.peremen.name
댓글 달기