Zack's Kernel News

Zack's Kernel News

© Linux Magazine Exclusive

© Linux Magazine Exclusive

Article from Issue 91/2008

 

 

The Linux kernel mailing list comprises the core of Linux development activities. Traffic volumes are immense, often reaching ten thousand messages in a given week, and keeping up to date with the entire scope of development is a virtually impossible task for one person. One of the few brave souls to take on this task is Zack Brown.

Our regular monthly column keeps you abreast of the latest discussions and decisions, selected and summarized by Zack. Zack has been publishing a weekly online digest, the Kernel Traffic newsletter for over five years now. Even reading Kernel Traffic alone can be a time consuming task.

Linux Magazine now provides you with the quintessence of Linux Kernel activities, straight from the horse's mouth.

Status of the 2.2 Kernel

Back in August 2007, Xose Vazquez Perez asked about the status of the 2.2 kernel tree and noted that version 2.2.26 had been released way back on February 25, 2004. On the other hand, the latest release candidate for 2.2.27 was from January 12, 2005. Willy Tarreau replied that any new release of the 2.2 kernel tree might lead users to believe that it was usable. However, he pointed out that, by now, a lot of security fixes have not gone into that tree, and it is simply too far out of date to continue to maintain.

Xose accepted this explanation at the time, but recently he followed up, suggesting that the 2.2 kernel be removed from the front page of kernel.org. If it is so out of date that no one should use it or patch it, he argued, it clearly shouldn't be advertised on kernel.org. This seems to make some sense; however, at the time of this writing, the 2.2. kernel is still listed on kernel.org with the rest of the kernel trees.

Cute Way to Schedule Code Removal

Matthew Wilcox had a nifty idea to save Andrew Morton a little headache. The current list of kernel features that are scheduled for removal is kept in a single file called feature-removal-schedule.txt. As part of innocently going about their business, kernel hackers who want to schedule a feature for removal have naturally added their items to the bottom of that file. The problem is that everyone then submits their changes to that file as a patch, so all the patches conflict with each other because they are all attempting to add different text at the same place in the file. As a result, Andrew has apparently been resolving these conflicts by hand, which is annoying for him.

Matthew's idea for helping Andrew is to trick the kernel patching tools into inadvertently doing the right thing. For example, the diff tool produces a patch that contains lines of context around the patches it produces so that the patch tool can apply a patch at the proper location in a file. The diff tool also keeps track of the "before and after" state of the part of the file being modified, but because the changes Matthew is talking about are only adding text, the "before" state is empty.

Given this, his idea is to put a simple separator, like "————", between entries and, most importantly, at the bottom of the file. By doing this, the diff tool will not only have no "before" state for its patch, but it will also only have this generic separator to provide context for its patches. As Matthew points out, this will cause the patch tool to insert each new entry randomly between any two adjoining entries in the file.

That's a neat trick, and it's nice when a neat trick can save somebody time. Ironically, the git tool would not make the same mistake as diff and patch, but because Andrew doesn't yet use git for this side of his kernel work, this little solution can slip through the cracks and just work.

New General Debugging Code

Thomas Gleixner has proposed a cool new debugging infrastructure for the kernel. His idea is to keep a hashed list of kernel objects and perform sanity checks on them whenever they are touched or memory is freed so that red flags are identified before a bug can cause kernel panic or other bad consequences. These sanity checks wouldn't find all bugs, but when they did throw a red flag, it would almost certainly be because they detected a legitimate bug somewhere.Thomas's plan would be to keep the debug code in the kernel, where it could be enabled easily. The kernel wouldn't run with the debug code enabled by default because that would slow the whole system down.

Initial support for Thomas's work was good, and Greg Kroah-Hartman suggested some additional sanity checks. Andi Kleen also suggested incorporating the features of an old patch by Chris Mason, in which a background thread would allocate memory, mark it, and then check periodically to see whether it had been corrupted. Because the memory would only be used for testing, any code that corrupted it would not necessarily cause an immediate problem for the running system, so detecting the corruption would give the user precious debug information that could be stored in logs before any potential problem.

It's very likely that Thomas's work will be accepted into the kernel at some point, and it will probably continue to be extended by these and other suggestions.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Kernel News

     

  • ZACK'S KERNEL NEWS

    The Linux kernel mailing list comprises the core of Linux development activities. Traffic volumes are immense, often reaching ten thousand messages in a given week, and keeping up to date with the entire scope of development is a virtually impossible task for one person. One of the few brave souls to take on this task is Zack Brown. Our regular monthly column keeps you abreast of the latest discussions and decisions, selected and summarized by Zack. Zack has been publishing a weekly online digest, the Kernel Traffic news letter for over five years now. Even reading Kernel Traffic alone can be a time consuming task. Linux Magazine now provides you with the quintessence of Linux Kernel activities, straight from the horse’s mouth.

  • Zack's Kernel News

    Chronicler Zack Brown reports on the latest news, views, dilemmas, and developments within the Linux kernel community.

  • Kernel News

    Chronicler Zack Brown reports on the latest news, views, dilemmas, and developments within the Linux kernel community.

  • ZACK'S KERNEL NEWS
comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News