linux/Documentation/BUG-HUNTING
<<
>>
Prefs
   1Table of contents
   2=================
   3
   4Last updated: 20 December 2005
   5
   6Contents
   7========
   8
   9- Introduction
  10- Devices not appearing
" n1n>   21=====1=====-" n1n>   31
   41Last 14	  >" n1x   51
   61Conte1ts
   71=====17==========
   81
   91- Int1oductAlways try nhtslcem 20kernel from0kernel.org andsbuild from0source. If you areocumentation/BUG-HUNTING#L2" id="L2" c class="2ine" name="L10">  10instm">s
   2======22f="Documentation/BUG-HUNTING#L9" id="L9" 2class="l2ine" name="L3">   32
 ideb/6'tocumentation/BUG-HUNTING#L9" id="L9" 2class="l2ine" name="L4">   42Last 24	  >give up. Report as much as you have foun> to nhtsr     52
   62Conte26f="Documentation/BUG-HUNTING#L9" id="L9" 2class="l2ine" name="L7">   72=====27====Before you urn fa a buD report rm">sREPOR="L9-#L9S.ocumentation/BUG-HUNTING#L2" id="L2" cclass="l2ine" name="L8">   82
   92- Int2oduct appearing
  10   23=====32f="DOfef=    < iricaused by udev. Check nhat fir 20before blam   3

   43Last 34f="Documentation/BUG-HUNTING#L9" id="L9" 3class="l3ine" name="L5">   53
   63Conte36==========
   73=====37f="Documentation/BUG-HUNTING#L9" id="L9" 3class="l3ine" name="L8">   83
   93- Int39f="Documentation/BUG-HUNTING#L4" id="L4" c class="4ine" name="L10">  10""""""""""""""""""""""""ocumentation/BUG-HUNTING#LL1" id="LL14class="l4ine" name="L2">   24=====42f="Documentation/BUG-HUNTING#L9" id="L9" 4class="l4ine" name="L3">   34
 tools with git makarif1n> thtsbuD iDocumentation/BUG-HUNTING#L7" id="L7" 4class="liine" name="L4">   4LLast 44f="Drepa hreible.ocumentation/BUG-HUNTING#L2" id="L2" 4class="l4ine" name="L5">   54
   64Conte46====Steps to do id:ocumentation/BUG-HUNTING#L6" id="L6" 4class="l4ine" name="L7">   74=====47	  >" start us   84
" rm">snhtsman pageifor git-bis   94- Int4oductiohave fuDocumentation/BUG-HUNTING#L10" id="L105 class="5ine" name="L10">  10   25=====52	  >""""""""""""""""""""""ocumentation/BUG-HUNTING#LL1" id="LL15class="l5ine" name="L3">   35
   45Last 54f="D[Sat Marnt2 10:32:33 PSTt1o96 KERNEL_#L4" OWTO lm@sgi.com0(Larry McVoy)]ocumentation/BUG-HUNTING#L4" id="L4" 5class="liine" name="L5">   5

   65Conte56====T  < irihow to nrack down a buD if you know ng
h   75=====57	  >It's a bruteiforce   85
   95- Int5oductYou need:ocumentation/BUG-HUNTING#L6" id="L6" 6 class="6ine" name="L10">  10   26=====62====        . All nhtskernel tar ts">s from0a revisibmithat worked to nhtocumentation/BUG-HUNTING#L6" id="L6" 6class="l6ine" name="L3">   36
   46Last 64f="Documentation/BUG-HUNTING#L9" id="L9" 6class="l6ine" name="L5">   56
   6CConte66f="Documentation/BUG-HUNTING#L9" id="L9" 6class="l6ine" name="L7">   76=====67====        . Rebuild a revisibmithat you believe works, install, andsverifyithat.ocumentation/BUG-HUNTING#L2" id="L2" 6class="l6ine" name="L8">   86
   96- Int69====          i
 thtsbuD.  I.e., suppose 1.3.28 didn't have thtsbuD,   10   27=====72====          betwet(t.50 ands.69, else nhtsmid poi
< betwet(t.28 ands.50.ocumentation/BUG-HUNTING#L7" id="L7" cclass="l7ine" name="L3">   37
 thtsbuD.  Youocumentation/BUG-HUNTING#L7" id="L7" cclass="l7ine" name="L4">   47Last 74====          can probably do better nha=    <    57
   67Conte76====        . Narrow ideb/wn to a urndir   7======77f="Documentation/BUG-HUNTING#L9" id="L9" 7class="l7ine" name="L8">   87
   97- Int79====              10s that cha=ged.  For each 
s:ocumentation/BUG-HUNTING#L6" id="L6" 8class="l8ine" name="L2">   28=====82f="Documentation/BUG-HUNTING#L9" id="L9" 8class="l8ine" name="L3">   38
   48Last 84====                as "dir.63".ocumentation/BUG-HUNTING#L9" id="L9" 8class="l8ine" name="L5">   58
   68Conte86====                "dir.62" andsmv dir.63 dir"eime, tryocumentation/BUG-HUNTING#L9" id="L9" 8class="l8ine" name="L7">   78=====87f="Documentation/BUG-HUNTING#L9" id="L9" 8class="liine" name="L8">   8

   98- Int89====                        mv dir.63 dirocumentation/BUG-HUNTING#L9" id="L9" c class="9ine" name="L10">  10 dir -  10 '*.[oa]' -pri
< | xargs rm -focumentation/BUG-HUNTING#L9" id="L9" c class="9ine" name="L1"  
  v2.6927.2791f="Documentation/BUG-HUNTING#L9" id="L9" 9class="l9ine" name="L2">   29=====92====                And nht(trebuild and reem 2.  Assum   39
   49Last 94====                iso cemsnhtscha=ge to a dir   59
   69Conte96====                Problems: cha=ges insom">er ts">s mayihave occurred; I'veocumentation/BUG-HUNTING#L6" id="L6" 9class="l9ine" name="L7">   79=====97====                foun> insmy case nhadenhty weoneself explanasory - you mayocumentation/BUG-HUNTING#LL1" id="LL19class="l9ine" name="L8">   89
   9-- Int99f="Documentation/BUG-HUNTING#L4" id="L4" 10 class="liine" name="L10">  10-- De>--====        . Narrow ideb/wn to a ts">ocumentation/BUG-HUNTING#L4" id="L4" 10 class="l0ine" name="L1"  
  v2.6.01 De>-1f="Documentation/BUG-HUNTING#L9" id="L9" 10class="l10ine" name="L2">   2102 De>-2====          - You can insnhtsdir   3103 De>-3====            hop   4104 De>-4f="Documentation/BUG-HUNTING#L9" id="L9" 10class="l10ine" name="L5">   5105 De>-5====        . Narrow ideb/wn to a routintocumentation/BUG-HUNTING#L6" id="L6" 10class="l10ine" name="L6">   6106 De>-6f="Documentation/BUG-HUNTING#L9" id="L9" 10class="l10ine" name="L7">   7107 De>-7====          - You can   8108 De>-8====            a merged file that haDocumentation/BUG-HUNTING#L7" id="L7" 10class="l10ine" name="L9">   9109 De>-9f="Documentation/BUG-HUNTING#L4" id="L4" 1" class="lline" name="L10">  10>- De110====                #ifdef VER62ocumentation/BUG-HUNTING#L9" id="L9" 1" class="liine" name="L1"  
  v2.6.21 De>11====                routint()ocumentation/BUG-HUNTING#L6" id="L6" 1"class="l11ine" name="L2">   211====112====                {ocumentation/BUG-HUNTING#L6" id="L6" 1"class="l11ine" name="L3">   311
   411Last114====                }ocumentation/BUG-HUNTING#L9" id="L9" 1"class="l11ine" name="L5">   511
   611Cont116====                routint()ocumentation/BUG-HUNTING#L6" id="L6" 1"class="l11ine" name="L7">   711====117====                {ocumentation/BUG-HUNTING#L6" id="L6" 1"class="l11ine" name="L8">   811
   911- In119====                }ocumentation/BUG-HUNTING#L9" id="L9" 1c class="12ine" name="L10">  10   21=====122====            And nht(twalk nhroughsnhat file, ont routint at a time andocumentation/BUG-HUNTING#L9" id="L9" 12class="l12ine" name="L3">   312
   412Last124f="Documentation/BUG-HUNTING#L9" id="L9" 1cclass="l12ine" name="L5">   512
   612Cont126====                /* both routintssomone*/ocumentation/BUG-HUNTING#L9" id="L9" 1cclass="l12ine" name="L7">   712====127====                #un>ef VER62ocumentation/BUG-HUNTING#L9" id="L9" 1cclass="l12ine" name="L8">   812
   912- In129====            Tht(trecompile, reem 2, moveenhtsifdefs until you f1n> nhts
ntocumentation/BUG-HUNTING#L6" id="L6" 13 class="13ine" name="L10">  10   213====132f="DFinally, you takeeall nhtsinfoithat you have,skernel revisibms,sbuDocumentation/BUG-HUNTING#LL1" id="LL1"3class="l1iine" name="L3">   31

   413Last134f="Dthat off to whomever you believe issnhtsmai-HUL4"r 
   513
   613Cont136====work to narrow ideb/wn.ocumentation/BUG-HUNTING#L2" id="L2" 13class="l13ine" name="L7">   713====137f="Documentation/BUG-HUNTING#L9" id="L9" 13class="l13ine" name="L8">   813
   913- In139f="Documentation/BUG-HUNTING#L4" id="L4" 1c class="14ine" name="L10">  10s to L/Dos and nht oth"r kernel hackerrifor describbruteiforce   214====142f="Dit doesswork and it lets non-hackerrihelp tsx buDs.  And it iricoolocumentation/BUG-HUNTING#L9" id="L9" 14class="l14ine" name="L3">   314
   41LLast144f="Ddo with .endor suppliedsr     514
   614Cont146====n1x   714====147==========
   814
   914- In14oductNobody irigi  10   215====152	  >To debuD a kernel, use objdump and ue="ifor nhtshex offset from0nhtscrashocumentation/BUG-HUNTING#L9" id="L9" 15class="l15ine" name="L3">   315
   415Last154f="Dwill see nhtsnamembl"ra hdeifor nhtsroutint shown,    51

   615Cont156====insnhtskernel hack   715====157f="Documentation/BUG-HUNTING#L9" id="L9" 15class="l15ine" name="L8">   815
   915- In159f="Documentation/BUG-HUNTING#L4" id="L4" 16 class="16ine" name="L10">  10s.ocumentation/BUG-HUNTING#L9" id="L9" 16class="l16ine" name="L2">   216====162f="Documentation/BUG-HUNTING#L9" id="L9" 16class="l16ine" name="L3">   316
   416Last164f="De.g. crash dump outiddeas shown by Dave Miller.ocumentation/BUG-HUNTING#L2" id="L2" 16class="l16ine" name="L5">   516
   61CCont166f="D	   716====167====	   816
   916- In169====	  10   217====172====	   317
   417Last174====	   517
   617Cont176f="D	   71=====177f="D	   817
   917- In179====	  10   218====182====	   318
   418Last184====	   518
   618Cont186f="D	   718====187f="D	   81

   918- In189f="D	  10   219====192f="D	   319
   419Last194====In   519
   619Cont196====CONFIG_DE#L6_INFO ententd, you can   719====197====OOPS:ocumentation/BUG-HUNTING#L6" id="L6" 19class="l19ine" name="L8">   819
   91-- In199f="DsEIP:    0060:[<c021e50e	  10abl" form:ocumentation/BUG-HUNTING#L6" id="L6" 20class="l20ine" name="L2">   2202 De202f="Documentation/BUG-HUNTING#L9" id="L9" 20class="l20ine" name="L3">   3203 De2-3====  gdbsvml/Dococumentation/BUG-HUNTING#L9" id="L9" 20class="l20ine" name="L4">   4204 De204====  (gdb) l *0xc021e50eocumentation/BUG-HUNTING#L9" id="L9" 205lass="l20ine" name="L5">   5205 De20ef="Documentation/BUG-HUNTING#L6" id="L6" 20class="l20ine" name="L6">   6206 De2-6f="DIf you b/6't have CONFIG_DE#L6_INFO ententd, you use nhtsfunef="Documentation/BUG-HUNTING#L10" id="L1020class="l20ine" name="L7">   7207 De2-7====offset from0nhtsOOPS:ocumentation/BUG-HUNTING#L6" id="L6" 20class="l20ine" name="L8">   8208 De20ef="Documentation/BUG-HUNTING#L9" id="L9" 20class="l20ine" name="L9">   9209 De209f="DsEIP iriat vt_ioctl+0xda8/0x1482ocumentation/BUG-HUNTING#L9" id="L9" 2" class="2line" name="L10">  10- De210f="Documentation/BUG-HUNTING#L6" id="L6" 2" class="2iine" name="L1"  
  v2.6221 De211f="DAnd recompileathe kernel with CONFIG_DE#L6_INFO ententd:ocumentation/BUG-HUNTING#L6" id="L6" 2"class="l21ine" name="L2">   221====212f="Documentation/BUG-HUNTING#L9" id="L9" 2"class="l21ine" name="L3">   321
   421Last214====  gdbsvml/Dococumentation/BUG-HUNTING#L9" id="L9" 2"class="l21ine" name="L5">   521
   621Cont216====  (gdb) l *(0x<address 
   721====217====or,eas /6necommandocumentation/BUG-HUNTING#L9" id="L9" 2"class="l21ine" name="L8">   821
   921- In219f="Documentation/BUG-HUNTING#L4" id="L4" 2c class="22ine" name="L10">  10   2======222f="D	   322
   422Last224f="D	   522
   622Cont226====   < shows nhtsproblem insnhts:jbd: module. You cansnhat module insgdbocumentation/BUG-HUNTING#L9" id="L9" 2cclass="l22ine" name="L7">   722====227====and list nhtsr     822
   922- In229====  (gdb) p log_wait_commitocumentation/BUG-HUNTING#L9" id="L9" 23 class="23ine" name="L10">  10   223====232====  (gdb) l *(log_wait_commit + 0xa3)ocumentation/BUG-HUNTING#L6" id="L6" 2cclass="l2iine" name="L3">   32

   423Last234f="Documentation/BUG-HUNTING#L9" id="L9" 23class="l23ine" name="L5">   523
   62/a>132ont136t. (Demuto   72/a>132===137initiaandebuild mayi=offb 20befyou etc. =owill see EIP  ori>s tbly gssignntentdocumentation/BUG-HUNTING#L9" id="29" 13clas2="l13ine" name="L8">   82/a>132   92/a>132 In139Oop=Thdeiwo="DOfs on hws noiso-HULdata-	  >instm">zer=" to wheve issdefaulithat.ocumentation/BUG-HUNTING#L2" id="24" 1c cla2s="14ine" name="L10">  12   22/a>142===142nel sosEIP /d absha hrerdly wlet youild you b/6let ng
   32/a>142   423L4st234f="Documentation/BUG-HUNTING#L9" id="L9" 14clas2="l14ine" name="L5">   52/a>142" rtation/BUG-HUNSou urthreP/d p ori> nhrouowerrihorembl"ra blyf="Documentation/BUG-HUNTING#L9" id="L9" 2t"L7" ="l14ine" name="L6">   62/a>142ont146ave ptHUL4"d.ocumentation/BUG-HUNTING#L9" id="2LL1"4clas2="l14ine" name="L7">   72/a>142===147
Tat nrig="DF LXR so="wlow bscopys"d.ocumenhttp://nel soff=ge.bl" nhtj/d s/lxe">LXR ait_unity=147sory, experion/BUlth"rrevisbsc"d.ocumenmailto:lxe@ to l/no">lxe@ to l/no=147.
lxe. to l/no Ha harhostcaused"d.ocumenhttp://www.redpdei- tonht/no">Redpdeiausenht AS=147soasysproua hruse L/ct="rltng h