The Linux Kernel Hackers' Guide Has Changed Quite a Bit Since Its Original Conception Four Years Ago
Total Page:16
File Type:pdf, Size:1020Kb
The HyperNews Linux KHG Discussion Pages Linux Kernel Hackers' Guide Due to the fact that nearly every post to this site recently has been either by rude cracker- wannabes asking how to break into other people's systems or a request for basic technical support, posting to the KHG has been disabled, probably permanently. For now, you can read old posts, but you cannot send replies. In any case, there are now far better resources available. Go get the real thing! Alessandro Rubini wrote Linux Device Drivers, which is what the KHG could have been (maybe) but isn't. If you have a question and can't find the answer here, go get a copy of Linux Device Drivers and read it--chances are that when you are done, you will not need to ask a question here. Run, don't walk to get a copy of this book. The Linux Kernel Go read The Linux Kernel if you want an introduction to the Linux kernel that is better than the KHG. It is a great complement to Linux Device Drivers. Read it. Table of Contents Tour of the Linux Kernel This is a somewhat incomplete tour of the Linux Kernel, based on Linux 1.0.9 and the 1.1.x development series. Most of it is still relevant. Device Drivers The most common Linux kernel programming task is writing a new device driver. The great majority of the code in the kernel is new device drivers; between 1.2.13 and 2.0 the size of the source code more than doubled, and most of that was from adding device drivers. Filesystems Adding a filesystem to Linux doesn't have to involve magic... Linux Memory Management A few outdated documents, and one completely new one by David Miller on the Linux cache flush architecture. How System Calls Work on Linux/i86 Although this was written while Linux 0.99.2 was current, it still applies. A few filenames may need updating. find is your friend--just respond with the changes and they will be added. Other Sources of Information The KHG is just one collection of information about the Linux kernel. There are others! Membership and Subscription At the bottom of the page, you will notice two hyperlinks (among several others): Subscribe and Members. Using the KHG to its fullest involves these two hyperlinks, even though you are not required to be a member to read these pages and post responses. Membership HyperNews membership is site-wide. That is, you only need to sign up and become a member once for the entire KHG. It doesn't take much to be a member. Each member is identified by a unique name, which can either be a nickname or an email address. We suggest using your email address; that way it will be unique and easy to remember. On the other hand, you may want to choose a nickname if you expect to be changing your email address at any time. We also want your real name, email address, and home page (if you have one). You can give us your phone and address if you want. You will be asked to choose a password. You can change any of these items at any time by clicking on the Membership hyperlink again. Subscription Subscribing to a page puts you on a mailing list to be sent notification of any new responses to the page to which you are subscribed. You subscribe separately to each page in which you are interested by clicking the Subscription link on the page to which you want to subscribe. You are also subscribed, by default, to pages that you write. When you subscribe to a page, you subscribe to that page and all of its responses. Contributing Please respond to these pages if you have something to add. Think of posting a response rather like posting to an email list, except that an editor might occasionally come along to clean things up and/or put them in the main documents' bodies. So if you would post it to an email list in a similar discussion, it is probably appropriate to post here. In order to make reading these pages a pleasure for everyone, any incomprehensible, unrelated, outdated, abusive, or other completely unnecessary post may be removed by an administrator. So if you have a message that would be inappropriate on a mailing list, it's probably also inappropriate here. The administrators have the final say on what's appropriate. We don't expect this to become an issue... About the new KHG The Linux Kernel Hackers' Guide has changed quite a bit since its original conception four years ago. I struggled along with the help of many other hackers to produce a document that lived primarily on paper, and was intended to document the kernel in much the same way that a program's user guide is intended to document the program for users. It was less successful than most user guides, for a number of reasons: ● I was working on it part time, and was otherwise busy. ● The Linux kernel is a moving target. ● I am not personally capable of documenting the entire Linux kernel. ● I became far too concerned with making the typesetting pretty, getting bogged down in details and making the document typographically noisy at the same time. I floundered around, trying to be helpful, and made at least one right decision: most of the people who needed to read the old KHG needed to write device drivers, and the most fully-developed part of the KHG was the device driver section. There is a clear need for further development of the KHG, and it's clear that my making it a monolithic document stood in the way of progress. The KHG is now a series of more or less independent web pages, with places for readers to leave comments and corrections that can be incorporated in the document at the maintainer's leisure--and are available to readers before they are incorporated. The KHG is now completely web-based. There will be no official paper version. You need kernel source code nearby to read the KHG anyway, and I want to shift the emphasis from officially documenting the Linux kernel to being a learning resource about the Linux kernel--one that may well be useful to other people who want to document one part or another of the Linux kernel more fully, as well as to people who just want to hack the kernel. Enjoy! Copyright (C) 1996,1997 Michael K. Johnson, [email protected] Messages 349. Loading shared objects - How? by Wesley Terpstra 342. How can I see the current kernel configuration? by Melwin 1. My mouse no work in X windows by alfonso santana 340. The crash(1M) command in Linux? by Dmitry 338. Where can I gen detailed info on VM86 by Sebastien Plante 335. How to print floating point numbers from the kernel? by [email protected] 333. PS/2 Mouse Operating in Remote Mode by Andrei Racz 331. basic module by [email protected] 329. How to check if the user is local? by [email protected] 328. Ldt & Privileges by Ganesh 326. skb queues by Rahul Singh 323. Page locking (for DMA) and process termination? by Espen Skoglund 322. SMP code by [email protected] 319. Porting GC: Difficulties with pthreads by Talin 314. Linux for "Besta - 88"? by Dmitry 1. MVME147 Linux by Edward Tulupnikov 313. /proc/locks by Marco Morandini 310. syscall by [email protected] 308. How to run a bigger kernel ? by Kyung D. Ryu 300. Linux Terminal Device Driver by Nils Appeldoorn 1. Terminal DD by Doug McNash 297. DMA to user allocated buffer ? by Chris Read 1. allocator-example in A.Rubini's book by Thomas Sefzick 293. Patching problems by Maryam 1. Untitled by [email protected] 290. Ethernet Collision by jerome bonnet 1. Ethernet collisions by Juha Laine 289. Segmentation in Linux by Andrew Sampson 288. How can the kernel copy directly data from one process to another process? by Jürgen Zeller 1. Use the /Proc file system by [email protected] 286. Remapping Memory Buffer using vmalloc/vma_nopage by Brian W. Taylor 1. Fixed.... strncpy to blame by Brian W. Taylor 283. Does memory area assigned by "vmalloc()" get swapped to disk? by Saurabh Desai 1. Lock the pages in memory by [email protected] -> How about assigning a fixed size array...does it get swapped too? by saurabh desai 282. Creative Lab's DVD Encore by Brandon 274. TCP sliding window by Olivier 273. Packets and default route versus direct route by Steve Resnick 269. IPv6 description - QoS Implementation - 2 IP Queues by wehrle 2. See the kernel IPv4 implementation documentation by Juha Laine 268. writing to user file directly from kernel space, How can it be done? by Johan 267. how can i increase the number of processes running? by ElmerFudd 261. How do I change the amount of time a process is allowed before it is pre-empted? by [email protected] 260. Network device stops after a while by Andrew Ordin 1. Untitled by Andrew 259. Does MMAP work with Redhat 4.2? by Guy 1. Yes, it works just fine. by Michael K. Johnson 3. What about mprotect? by Sengan Baring-Gould 2. It Works! Thanks! by Guy 256. multitasking by Dennis J Perkins 1. Answer by David Welch -> multitasking by Dennis J Perkins -> answer by David Welch 247.