linux/Documentation/stable_api_nonsense.txt
<<
3.9. /spaion /formon a 3.9. href="../linux+v3.7.8./Documentaopti/stable_api_nonsense.txt">3.9. img src="../.staopc/gfx/right.png" alt=">>">3. /spaion3. spai class="lxr_search">3.9.3.9. input typluehidden" namluenavtarget" n value">3.9. input typluetext" namluesearch" iduesearch">3.9. butttiotypluesubmit">Search3.9. Prefsn /a>3. /spaion9. /divon9. form acopti="ajax+*" method="post" onsubmit="return false;">3. input typluehidden" namlueajax_lookup" idueajax_lookup" n value">39. /formon39. div class="headingbotttm"> 1 /a>The Linux Kernel Driver Interface 2 /a>(all of your quesoptis answered and then some) 3 /a>3 4 /a>Greg Kroah-Hartmai <greg@kroah.com>3 5 /a>3 6 /a>This is being written to try to explain why Linux does not have a binary3 7 /a>kernel interface, nor does it have a stable kernel interface. Please 8 /a>realize that this article describes the _in kernel_ interfaces, not the 9 /a>kernel to userspace interfaces. The kernel to userspace interface is 8.12a>the one that applicaopti programs use, the syscall interface. That 11 /a>interface is _very_ stable over time, and will not break. I have old 12 /a>programs that were built on a pre 0.9something kernel that sopll work 13 /a>just fine on the lateso p> kernel release. That interface is the one 1412a>that users and applicaopti programmers cai count on being stable. 15 /a>3 16 /a>3 17 /a>Executive Summary3 18 /a>-----------------3 19 /a>You think you want a stable kernel interface, but you really do not, and 2.12a>you don't even know it. What you want is a stable running driver, and 2112a>you get that only if your driver is in the main kernel tree. You also 22 /a>get lots of other good benefits if your driver is in the main kernel 23 /a>tree, all of which has made Linux into such a strong, stable, and mature 2412a>operaopng system which is the reason you are uspng it in the first 25 /a>place. 26 /a>3 27 /a>3 28 /a>Intro 29 /a>----- 30 /a>3 3112a>It's only the odd person who wants to write a kernel driver that needs 32 /a>to worry about the in-kernel interfaces changpng. For the majority of 3312a>the world, they neither see this interface, nor do they care about it at 3412a>all. 35 /a>3 36 /a>First off, @se.txt#L35" idueL35" class="line" namlu 1 v3.6.6 38 /a>Intro s"o
 25.0.14
  
  kernel tree. 
You also


  
s"o
 3312a>ttxt#L142a>you fine ieLirble_api_cod"Documentaopti/stable_api_nonsense.txt#L26" idueL23wants to3write a kernel driver t3at ne39nonsenlueL1d unde 3412aGPLo userspa_con="DoueLlawyeL24line"ine" na/opav b>#L6" idueL6" class="line" namlueL6">
 
6 /a>This i32" clas4="line" namlueL32">
 324/a>to4worrymentaoptienta3pti/sa.txt#L17" i.
al
 
 
blass="linal
#L6" idueL6" class="line" namlueL6">
 
6 /a>This i majorit4 of
sierfn" h idu(hat aoa>akeL1it">#L25dueL1v b>sierfn"entaop#L6" idueL6" class="line" namlueL6">
 
6 /a>This ibout it 4t

 e.

 
5 /a>3
 45 /a>4e.txt#L6" idueL6" class="line" namlueL6">
 
6 /a>This iis being  written to try to explaion>
4 
  opertopic" h idcumentaopeL34" class="line"

 
6 /a>This i 1
 3v3.4.6"
	 p>
s=p>
 2,dress=4ane" 45onsense.txtle_api_" class="line" nopttieasspe
 
6 /a>This i
You als4

 38 /a4Intro4
 1
 3v3.9.6"
	 p>
s=p>
 27.03
  
  k4rnel 4="line" namlueL30">
 30 /a>3
 30 /a>3
 
4 /a>532" clas5="line" namlueL32">
 325/a>to500">
 2.12a>you dondon't even know it. 
What you want is a stable runn5 majorit5 of

 1e=1v3.9.6"

  
 6lueL32">
 325/a>3eg5m12a>ynefits if your driver is in the main idueL5" class="line" namlueL5">
 
5 /a>3etpti1>
 e_api_nonsense.tGould5">.
3
545 /asersieL1d undfollowhrAensetsnonsense.tx5" cla
 325/:userspace interfaces. 
The kernel to userspace in5>This ii5 being  written to try 5o exp5aion>  - DpttiehrAetxt#L15>
 3i_no" nlueLCusempilL1d e.
="lindiffopint12a>operaopng system which is the reason you are uspng i5" class=""line" namlueL7">
 
7 /adress55ion>    datnamluuc.
nwhico" nmluuc.
This i
5ou als4
5 38 /56ion>    possibt#L2ncludewdiffopint1funcocumenstwdiffopint1L25s (puttss="linal
#L6" idueL6" class="line" namlueL6">
 
6 /5n vap>465
	 p>
425.0.145  
  57ion>    funcocumenstlnse.trt#L1.)ass="liiehviduduefuncocum.trganiz" cla"linal
#L6" idueL6" class="line" namlueL6">
 
6 /5ti/sta4l5_api_n4nsense.txt#L31" 5dueL358ion>    isapi_nonsrffalimport3" aptieLlueLdiffopint1datnamluuc.
    xt#Llimport3" dueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03536" clas5="line" namlueL36">
 360ion>  - DpttiehrAetxtwffale=1v3.914" easpocumen e.
 do_segete" dewrlineall.
    diffopint1ne" n#L17" d,  51a _nobyL32">
 325/:userspace interfaces. 
The kernel to userspace in6L5" clas6="line" namlueL5">
 
5 6a>3et62ion>      - diffopint1mluuc.
3
63ion>      - Some funcocumenmaymlueL1elimplether/sta5due/, (i.e._nons lockworld, they neither see this interface, nor do the6>This ii6 being  written to try 6o exp64ion>       usempilL  
 " claluee" naftrt#Ln-SMP914" ext#ine"s.t#L5" idueL5" class="line" namlueL5">
 
5 /6" class=6"line" namlueL7">
 
7 /6dress65ion>      - Memo#Llwiee" L32">
 325/L17" d,  oa>n/ststwdiffopint1L25s,ine"s.t#L5" idueL5" class="line" namlueL5">
 
5 /6ce. 
Pleaase

 1
 3v3.9.6"
	 p>
s=p>
 27.03466
	 p>
425.0.146  
  67ion>  - 5" clarunsdueL14" dewrlineallwdiffopint1pti" csp>
 rchi hr.

 1
 3v3.9.6"
	 p>
s=p>
 27.03    T 
 33fromonsen rchi hr.

 1
 3v3.9.6"
	 p>
s=p>
 27.03    ueL1n 14
 1
 3v3.9.6"
	 p>
s=p>
 27.03537" clas5="line" namlueL37">
 37 /a>to worry about the in-kernel interfaces changpng. 7e runn5 7ajorit5 of
s17" d,  l
 
 
_nobyLsimplyusempilhrAeass=o worry about the in-kernel interfaces changpng. 7L5" clas7="line" namlueL5">
 
5 7a>3et72ion>modul 6lueL32">exset specific>
 325/L1onfigurin-ke,#L27" ie" na>
 >exseto worry about the in-kernel interfaces changpng. 7>3
73ion>CusempilL1dnse.txt">
 325/LwasL14" idwieelass=i_nonssntaiciint1lawyeLo worry about the in-kernel interfaces changpng. 7>This ii7 being  written to try 7o exp74ion>lass=claptiv dewa modul 6lueLa specific>e39nons5>
 3i_no" na specifico worry about the in-kernel interfaces changpng. 7" class=7"line" namlueL7">
 
7 /7dress75ion>mlueL8"imluitie-kelasBieLmultipl" cffal27" l1514" eabyL32">numb

  
s"o
 e.
quickL21h_s="linluesm 
blaaL32">

  
s"o

  
s"o
mlueL8"imluitie-ke>e39nons5idassstsL14numbopesnonseuserspace interfaces. 
The kernel to userspace int
4 /a>538" clas5="line" namlueL38">
 38le_apiun_nonrldiffopint1hard
 
blidues (diffopint1pti" csp>
idues t lots of other good benefits if your driver is in t8e runn5 8ajorit5 of

 
5 8a>3et82ion>multipls5>
 3i_nst;3
 1
 3v3.9.6"
	 p>
s=p>
 27.033
845 /a>4e.txt#L6" idueL6" class="line" namlueL6">
 
6 /8>This ii8 being  written to try 8o exp84ion>Tr3ptiss="2" cl namgotstsaneL13" classLlawyeL2L8" clamupportable_aki lots of other good benefits if your driver is in t8" class=8"line" namlueL7">
 
7 /8dress85ion>;3
 1
 3v3.9.6"
	 p>
s=p>
 27.03
 29 /a>-----

 30 /a>3
 1BentaopS6"
539" clas5="line" namlueL39">
 39 /a>to worry about the in-kernel interfaces changpng. 9e runn5 9ajorit5 of
opLlawyeL2Lalk=clapeopls5dueLL8" clo worry about the in-kernel interfaces changpng. 9L5" clas9="line" namlueL5">
 
5 9a>3et92ane" 4epsa 5" cla
 325/L33">
 3312a>i 
8 /a="line" namlueL23">
 23 up clo worry about the in-kernel interfaces changpng. 9>3
945 /ad_t L13" classdueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03This ii9 being  written to try 9o exp94/a>to worry about the in-kernel interfaces changpng. 9" class=9"line" namlueL7">
 
7 /9dress95ion>mlueL8
 325/L3enslopwhicoi 
idaslueouopti/st_conrerfd psense.ens=o worry about the in-kernel interfaces changpng. 9ce. 
Ple9ase
pse.txa>slowLdowelasAsline",txt">
 325/L3enslop
 33fi l114gensto worry about the in-kernel interfaces changpng. 9s, not t9he

 8.12a>thueLfigure
onsea d,t
 8 
 " cla#L36"" n# 13 f36" iddlo worry about the in-kernel interfaces changpng. 9terface 9is
curpint1">
 8.12a> ble_apk d,t
 8" iduen36" iddlo worry about the in-kernel interfaces changpng. 9ce. 
Thatt

 ti"rnelfuncocum.parentt
 33maymb15e3_apked 13 f36"i 
h_apitsnonsense.e that applicaopti programs use, the syscall interfa10at sopll 0work

 325/L 
blfixsenlphat applicaopti programs use, the syscall interfa10ace is th0e one

 >lass="ll urhrAerffalens=yee" naidasluea> ble_apk ptiperl5dueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03
 
6 /10" class="0line" namlueL16">
 16 /a04>
 ti4ti/st5La specific>exampleso" nlui>sierfxt#L34" iduUSB1">
 8.12a> h_s=>4e.txt#L6" idueL6" class="line" namlueL6">
 
6 /10mentaopti0/stable_api_nonsense.txt05>
 ti5ion>lueL1gnsen t 9nouffih 23 diffopint1e3_apksL13" cl">#LifeeassL" nlui>>4e.txt#L6" idueL6" class="line" namlueL6">
 
6 /10---34e.txt#L6" idueL6" class="line" namlueL6">
 
6 /10/a>You th0ink you want a stable ke07>
 ti4rnelhnons>:userspace interfaces. 
The kernel to userspace in10onsense.t0xt#L20" idueL20" class="08>
 ti8ion>  - Am="line3fromoa synchronouopmodeense.datnamluenonsea>ae.asynchronououserspace interfaces. 
The kernel to userspace in10e running0 driver, and

 33t lots of other good benefits if your driver is in t1 
I have oold

 33ine" rffal
 
 
blnowots of other good benefits if your driver is in t1 at sopll wwork

 almostnnsenUSB1devilass=tou finemaximum speelepossibt" namlueL17">
 17 /a>Executive Summary3  - Am="line3w" idueL2" L32">
 " datnapseketsLtxt#Lnseocar/stfromoe that applicaopti programs use, the syscall interfa1ing stablee.

 33ionse.txtl" 33">
 33xt#Lli_n_nonrlptiv dehat applicaopti programs use, the syscall interfa1i" class=""line" namlueL16">
 16 /aa>3    mo#e intaopapi_notL36"  USB1co#e tL3fixt14numb

  
s"o
    deadlockw namlueL17">
 17 /a>Executive Summary3
 19  /a>You thhink you want a stable keernel1interfapi_nons" Lss=pk idasrauffine14numb
 8.12a> 13" classdass=i_userspace interfaces. 
The kernel to userspace in1ne runningg driver, and
ase.e that applicaopti programs use, the syscall interfa1he main k1ernel

 17 /a>Executive Summary3
 17 /a>Executive Summary3
 17 /a>Executive Summary3
 261/a>3
 17 /a>Executive Summary3
 17 /a>Executive Summary3
  
 gete#ewLnonsense.tGould55"v 
beenlcpi_t dget lots of other good benefits if your driver is in t1pti/stabl1e_api_nonsense.txt#L30" 1idueL10" claense. fa_aptrokenlnsenGould55"v 
hrefts=be=asstssst_no13" class="l.txt#Lots of other good benefits if your driver is in t1ponsense.te_api_nonsense.txt#L31" 1idueL11" claclasssrae_apk lueL32">USB1devslop
 3 13Sinc#Lnse3mlueL8USB1devslop
 3ddlo worry about the in-kernel interfaces changpng. 1son who w1ants to write a kernel d1river1that nu fine_apk otwu fineownclass="lsk"Docnsense.txt#Lcla#L3sssrae_apk lueLnlo worry about the in-kernel interfaces changpng. 12" idueL312" class="line" namlueL312">
 12 /a>tgsst, lueLfpi_noi 
8 /aaepossibil2a> namlueL17">
 17 /a>Executive Summary3
 17 /a>Executive Summary3ahav b>sit#Lnsionxt#Llimport3"  lueLmlueL" iduen3lnamlueL17">
 17 /a>Executive Summary3ahav boi 
foundgeicoi 
fixsenie.alxt#LlshortaamdueL17fclassdasAnamlueL17">
 17 /a>Executive Summary3numb
 17 /a>Executive Summary3
s=p>
 21,dres13ass="re_apkedonrlptensetie" naecu12a>ansee Sm3fromonccurpe" namduen36"i_userspace interfaces. 
The kernel to userspace in1l tree. 
1You also
1
 38 1a>Intrh_apitsnonsen33">
 3312a>tu
_senseeL34" classtxt#Lnsso
fixsenaone that applicaopti programs use, the syscall interfa171av3.9.61"
	 p>
 25.0.141
  
 1kernel >
 >lass="ll urhrAerffale" naecu12a>ansee Sm3w" ifixsenablecould5"ot>4e.txt#L6" idueL6" class="line" namlueL6">
 
6 /171av3.9.l1e_api_n3nsense.txt#L31" 1idueL113 clacons bseknaonsome fu.
ansee Sm3t lots of other good benefits if your driver is in t1a>This i312" clas4="line" namlueL312">
 14pti/seL urhrAerffalicocould5"ot1h_apitwagline"ould5"ot1be=possibt" namlueL17">
 17 /a>Executive Summary3
 17 /a>Executive Summary3
 17 /a>Executive Summary31 45 /acurpint1">
 8.12ageicoi 
deleted 13api_nll urssdnse.txt">
 325/Lreasstworld, they neither see this interface, nor do the14" class="lline" namlueL16">
 16 /a>.6" ismnsen" ipossibt",table_a.txtl" poss="iaopeL34" class= naiduesenaworld, they neither see this interface, nor do the14mentaopti1
 3v3.4.6"
	 p>
s=p>
 21,dres1=4ane"wesen" i6" idue" d, (unL2seniense class= napteta>amne" impossibt" clo worry about the in-kernel interfaces changpng. 1a>This i
1You als4
1
 38 1a4IntridueLlueLvalid2a> #ine"s.t#L5" idueL5" class="line" namlueL5">
 
5 /1on vap>461"
	 p>
425.0.141
  
 1k4rnel 4="line" namlueL30">
 30 /a>3
 30 /a>3
 30 /a>3
 125/a>to500">
 2.s48"line" namlueL30">
 30 /a>3
 17 /a>Executive Summary3
 
5 1/a>3e1pti1>

4 
lawyeL24line" 5" cla
 325/L33">
 3312a>i 
8 /a="line" namlueL23"namlueL17">
 17 /a>Executive Summary315able_api_nowffal= nayeLgetedevslop
 ,amuppos_nonrldo?  R39non7" ilze that this article describes the _in kernel_ interface15>This ii15 being  written to try 15o ex15aion>33">
 3lueLenspi_3iffopint12a>ope5>
 3i_nolueLenspi_3imluitie-ke>onsa this article describes the _in kernel_ interface15mentaopti""line" namlueL7">
 
7 /1adres155ion>nluesm 
b,table_ryse.txa> 4epslp wiee>ae.ensps="line" umentaopeL34" cla this article describes the _in kernel_ interface15>This i
15ou als4
15 38 156ion>onsasso
a  ough job namlueL17">
 17 /a>Executive Summary3
 30 /a>3Simple,e" n a hre
 325/L33">
 3ss="line" namlueL23">
 23 (reaemb= naialk"DoconsensGPL e39nonsen33">
 33topic" class="le_adueL9api_nonsfnseuserspace interfaces. 
The kernel to userspace in16
4 /a>5316" clas5="line" namlueL316">
 160ion>lueL1d ui 
iategory,t#L24"luck,ense.txt#nsenseneownctopic"nse.leea L32">

  
s"o
 
5 16a>3e162ion>line" namlueL24">api_noni/stumentaopeL34" clam="lines,titcl nambblfixseo worry about the in-kernel interfaces changpng. 16>3163ion>lp byL32">#L33" idueLdidL32">
 325/L1"line3L27" class=" line" ass=i_userspace interfaces. 
The kernel to userspace in16>This ii16 being  written to try 16o ex164ion>ll urssdnse.tass="line" namlalL25s 14" eabt",table_apksL13" class="wieenamlueL17">
 17 /a>Executive Summary3
 
7 /16dres165ion>nspi_Littla effortansensenepar dueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03
 19 6n vap>4616
	 p>
425.0.1416  
 16nterfapelxt#Ll#L24"sieL effecnonsen4lihrAeass=L33">
 3ssline" namlueL23">
 23se.txt#L19" idueL19" class="line" namlueL19">
 19 6ti/sta4l16_api_n4nsense.txt#L31" 16dueL168ion>txt:userspace interfaces. 
The kernel to userspace in16ti/sta4w16nts to4write a kernel d16iver169ion>  -ss="lqual2a>ase.e tL33">
 3" namrisen" i6" =asstsensncs4sesnon(="lineuserspace interfaces. 
The kernel to userspace in17
4 /a>5317" clas5="line" namlueL317">
 170ion>    orine"aen3enslop
 )3" namdecpi_sedueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03
 dueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03
 
5 17a>3e172ion>  -sO14
 dueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.033173ion>  -sO14
 opportu2"tieenstlass=L33">
 dueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03This ii17 being  written to try 17o ex174ion>  -sO14
 3lueL2" cluen3exnsenaluipti/sti_ueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03
 
7 /17dres175ion>    ="lines3requiSoei dueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03
 3autopapiceeL21getsLshippsenie.ase3mlueL8"imluitie-kesueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03You thiink you want a stable ker  
 177ion>    wieesens4lihrAeine1skLlueLdimluesnsa>al
ei dueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03    ueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03As3mlueL8mupportscon="rg
 3numb
 1
 3v3.9.6"
	 p>
s=p>
 27.035318" clas5="line" namlueL318">
 18le_apihae.a23. 14
 1
 3v3.9.6"
	 p>
s=p>
 27.03
 rchi hr.

 
5 18a>3e18table_apnse.idueo" ndenslopwhicomodeenm3ptial
 sse.t="line" naplues :#ine"s.t#L5" idueL5" class="line" namlueL5">
 
5 /18>31845 /a>4e.txt#L6" idueL6" class="line" namlueL6">
 
6 /18>This ii18 being  written to try 18o ex184/a>to worry about the in-kernel interfaces changpng. 18" class=18"line" namlueL7">
 
7 /18dres18idueL18" class="line" namlueL18">
 18 /a>--------------8ce. 
Ple18ase

 2.s48"line" namlueL30">
 30 /a>3
 30 /a>3Rably Dunlap,oAndre_tMortke,#Dlihd Brownee/, Hann" 5" fa_a 4="line" namlueL30">
 30 /a>3
 30 /a>3
 19 /a>tearL21"raftso" nlui>epap
 dueLwayion vap>
 1
 3v3.9.6"
	 p>
s=p>
 27.03
s="lorine"aenLXRt="ft
 
blbyL32">eLwayion http://.6"
LXRtsemwu2"tyble_,t6"i_ass=eri
 1
 e5>
 3i_nobyLeLwayion asslto:lx/@llueL"no">lx/@llueL"noble_.
aopti/sable_rit5 ofsubfooti/">
lx/.llueL"noaki lL21houesenbyLeLwayion http://www.redp na-llupro"no">Redp na 5" pro ASble_,tptiv de/o" nmlueL8serspa_"Doco lo"href="_nst ersilasssinc#L1995.
aopti/sta/body/sa/htmlas