Leüthetem? Legalább legyen egy kis flame is, lévén nem értek a programozáshoz:
"Depending on the version of the C compiler you use, different kernel data structures will contain different alignment of structures, and possibly include different functions in different ways (putting functions inline or not.) The individual function organization isn't that important, but the different data structure padding is very important."
Ez megkerülhető mappinggal, vagy merev struktúrák használatával. Igen, mindkettő szopás, de az előbbi esetében tök mindegy mi, hova kerül a memóriába, az utóbbinál, meg biztos, hogy minden, mindig ugyanoda kerül a memóriában.
"Depending on what kernel build options you select, a wide range of different things can be assumed by the kernel:"
" different structures can contain different fields"
Miéééért?
" Some functions may not be implemented at all, (i.e. some locks compile away to nothing for non-SMP builds.)"
Ez esetben talán okos lenne dummy implementáció.
" Parameter passing of variables from function to function can be done in different ways (the CONFIG_REGPARM option controls this.)"
Az egységes API háttere ott kezdődik, hogy az ilyen dolgok fixálva vannak.
" Memory within the kernel can be aligned in different ways, depending on the build options."
Ez feltétlenül szükséges, vagy csak a szokásos fejlesztői onanizálás?
"Linux runs on a wide range of different processor architectures. There is no way that binary drivers from one architecture will run on another architecture properly."
Szvsz, erre megoldás a dedikált architektúra kijelölése, és a többi architektúra kernel szintű bináris fordítóval való támogatása. Ronda, erőforrásigényes, de a gyártó imádnák, mert csakis egy architektúrán kell fordítani és tesztelni a kódot. De, akkor már mehetne a kernel fejleszttés egy virtuális architektúrán is.
"Now a number of these issues can be addressed by simply compiling your module for the exact specific kernel configuration, using the same exact C compiler that the kernel was built with. This is sufficient if you want to provide a module for a specific release version of a specific Linux distribution. But multiply that single build by the number of different Linux distributions and the number of different supported releases of the Linux distribution and you quickly have a nightmare of different build options on different releases. Also realize that each Linux distribution release contains a number of different kernels, all tuned to different hardware types (different processor types and different options), so for even a single release you will need to create multiple versions of your module.
Trust me, you will go insane over time if you try to support this kind of release, I learned this the hard way a long time ago... "
Pont ez a lényege a stabil APInak. Megfelelő definícióval és implementáció esetén sem a kernelnek, sem a modulnak nem kell tudnia, hogy mivel és milyen opciókkal volt a másik fordítva. A legnagyobb hátrány, hogy megköveteli a fejlesztőket, hogy egy adott infrastruktúra mentén legyen a fejlesztés, és ne lehessen quick&dirty, félig, negyedéig implementált modulokkal az adott eszköz támogatásának a látszatát kelteni. Ez pillanatok alatt lefelezné a támogatott hardverek számát, de nem kéne a mezei usernek fél éjszakát molyolnia, hogy rájöjjön, miért nem megy amúgy alap funkció a gépén. (Lásd: open-source broadcom modulok és az encrytion key esete)
"Linux kernel development is continuous and at a rapid pace, never stopping to slow down. As such, the kernel developers find bugs in current interfaces, or figure out a better way to do things. If they do that, they then fix the current interfaces to work better. When they do so, function names may change, structures may grow or shrink, and function parameters may be reworked. If this happens, all of the instances of where this interface is used within the kernel are fixed up at the same time, ensuring that everything continues to work properly.
As a specific examples of this, the in-kernel USB interfaces have undergone at least three different reworks over the lifetime of this subsystem. These reworks were done to address a number of different issues:
A change from a synchronous model of data streams to an asynchronous one. This reduced the complexity of a number of drivers and increased the throughput of all USB drivers such that we are now running almost all USB devices at their maximum speed possible.
A change was made in the way data packets were allocated from the USB core by USB drivers so that all drivers now needed to provide more information to the USB core to fix a number of documented deadlocks.
"
Bullshit. Faszán megmagyarázza a tervezés teljes hiányát és még meg is veregeti a fejlesztők vállát. Ezek a reimplementációk jól jellemzik az egész open-source fejlesztési modellt. Igen látáványos changelogokat eredményez, csak épp a használhatóságot csapja agyon.
"This is in stark contrast to a number of closed source operating systems which have had to maintain their older USB interfaces over time. This provides the ability for new developers to accidentally use the old interfaces and do things in improper ways, causing the stability of the operating system to suffer."
Újabb bullshit. Ezt ugyanis kompatibilitásnak hívják. Egy zárt forrású fejlesztő cég nem égethet fel minden hidat a hátamögött annak megfelelően, hogy a cégvezető milyen hangokat hall éppen. Ugyancsak előfordulhat, hogy az új fejlesztő szeretné, ha az alkalmazása régebbi OS-eken is futna. Pont ezeknek a fejlesztőknek az életét könnyíti meg a gyártó.
"In both of these instances, all developers agreed that these were important changes that needed to be made, and they were made, with relatively little pain. If Linux had to ensure that it preserve a stable source interface, a new interface would have been created, and the older, broken one would have had to be maintained over time, leading to extra work for the USB developers. Since all Linux USB developers do their work on their own time, asking programmers to do extra work for no gain, for free, is not a possibility."
Azért csak kibújik a szög a zsákból. Ugye egy új, fényes kód polírozása mindig nagyobb dicsőség, mint egy régi karbantartása.
"Security issues are also a very important for Linux. When a security issue is found, it is fixed in a very short amount of time. A number of times this has caused internal kernel interfaces to be reworked to prevent the security problem from occurring. When this happens, all drivers that use the interfaces were also fixed at the same time, ensuring that the security problem was fixed and could not come back at some future time accidentally. If the internal interfaces were not allowed to change, fixing this kind of security problem and insuring that it could not happen again would not be possible.
"
A tervezés vajon mi? Vajon hány security issue ezek közül, ami a hiányos tervezés következménye? Nem egyszerűbb elkerülni ezeket, ha már a tervezéskor figyelembe vannak véve? Egen, csakhogy a hello.c után nem lehetne hirtelen, mindenki kernel hacker...
Végül az ideologizálás:
" The quality of the driver will rise as the maintenance costs (to the original developer) will decrease."
Ez kétséges.
" Other developers will add features to your driver."
Vagy épp kivesznek, különféle ideológiák mentén.
" Other people will find and fix bugs in your driver."
Vagy épp elcseszik.
" Other people will find tuning opportunities in your driver."
Amitől aztán működésképtelenné válik.
" Other people will update the driver for you when external interface changes require it."
Lásd fennt.
" The driver automatically gets shipped in all Linux distributions without having to ask the distros to add it."
Ezzel megszűnik a lehetőség, hogy csakis olyan formában kerüljön a driver a kernelben ami biztosítja a teljes működőképességét.
--
"Maradt még 2 kB-om. Teszek bele egy TCP-IP stacket és egy bootlogót. "