<?xml version="1.0" ?>

<kc>

<title>Kernel Traffic</title>

<author contact="mailto:zbrown@tumblerings.org">Zack Brown</author>

<issue num="65" date="01 May 2000 00:00:00 -0800" />

<intro>

<p>I'd like to thank all the people who emailed me about the semi-broken link
to the generic latest issue. It used to be <a
href="http://kt.zork.net/latest.html">http://kt.zork.net/latest.html</a>,
but changed recently to <a
href="http://kt.zork.net/kernel-traffic/latest.html">http://kt.zork.net/kernel-traffic/latest.html</a>.
Anyone bookmarking this link should update their bookmarks, as the old link
won't be maintained. I think I emailed everyone back who wrote to me about
this, but profuse apologies if I missed anyone. In any case, this is exactly
the kind of thing I'd like to hear about, and many thanks to all who wrote
in.</p>

<p>Special thanks also go to Patrick Erler, who pointed out that the
printer-friendly version still used colors for quoted text, which wouldn't
actually show up in the print-out. So I've changed the format of quoted text
in the printer-friendly version to be bold and italic, instead of dark red.
At the moment this is an imperfect solution because of the way the pages are
generated, so I'd appreciate any bug reports or other comments. In the
mean-time, thanks for the suggestion, Patrick!</p>

<p>Special thanks also go to Jerome Bertorelle and Chris Baker, who both
emailed me about the the notation described in <kcref subject="Asynch I/O
gets easily overloaded on 2.2.15 and 2.3.99"
startdate="10 Apr 2000 00:00:00 -0800"></kcref><!-- kt20000424_64.html#3 --> for measuring
the speed of algorithms. Jerome said to me:</p>

<quote who="Jerome Bertorelle">

<p>I have some precision on the O(...) notation
-- if you care ;-) It is due to the Russian mathematician Landau, and is
widely used in mathematics (function analysis). It comes in two flavor:</p>

<p><ul>

<li>o(f(n)) -- we pronounced it "little o" in French, I don't know the US
name. Briefly, a function f1 is said to belong to o(f2(n)) if the limit of
f1(n)/f2(n) is zero when n increases to infinity.</li>

<li>O(f(n)) -- we pronounce that "big O" around here. Same principle, but the
limit is an arbitrary, non null constant.</li>

</ul>
</p>

<p>What does it mean in practice -- applied to computer science?</p>

<p>A function that belongs to o(f(n)) has a cost which is negligible compared
to f when n gets large. A function that belongs to O(f(n)) has a cost which
is similar to f when n gets large enough.</p>

<p>Examples:</p>

<p><ul>

<li>functions in O(1) are constant time (or cost), independent of n;</li>

<li>functions in  O(n) have a linear cost with respect to n when n gets large;</li>

<li>O(n^2) is quadratic, etc.</li>

</ul>
</p>

<p>Note that this is true *for large values of n*, and that the constant
implied by the O(...) notation is *arbitrary*. So for small value of n, a
function which is O(n^2) might be much faster than an O(1) function.</p>

</quote>

</intro>

<stats posts="1038" size="4526" contrib="385" multiples="172" lastweek="145">

<person posts="33" size="160" who="Linda Walsh " />
<person posts="25" size="82" who="Alan Cox " />
<person posts="23" size="95" who="Rik van Riel " />
<person posts="23" size="77" who="Tigran Aivazian " />
<person posts="22" size="86" who="Manfred Spraul " />
<person posts="20" size="80" who="Andrea Arcangeli " />
<person posts="20" size="65" who="Jeff Garzik " />
<person posts="19" size="118" who="David Ford " />
<person posts="15" size="47" who="Stephen C. Tweedie " />
<person posts="13" size="45" who="" />
<person posts="12" size="45" who="Olaf Titz " />
<person posts="12" size="37" who="" />
<person posts="11" size="39" who="Pavel Machek " />
<person posts="11" size="38" who="Steve Dodd " />
<person posts="11" size="33" who="Alexander Viro " />
<person posts="10" size="41" who="Andrew Morton " />
<person posts="10" size="33" who="Richard Gooch " />
<person posts="9" size="133" who="Jeff V. Merkey " />
<person posts="9" size="46" who="jamal " />
<person posts="9" size="42" who="Jesse Pollard " />
<person posts="9" size="31" who="Horst von Brand " />
<person posts="9" size="30" who="Jamie Lokier " />
<person posts="8" size="26" who="Trond Myklebust " />
<person posts="8" size="26" who="Philip Blundell " />
<person posts="8" size="23" who="Robert Dinse " />
<person posts="7" size="53" who="Paul Barton-Davis " />
<person posts="7" size="34" who="Benno Senoner " />
<person posts="7" size="24" who="Keith Owens " />
<person posts="7" size="23" who="Jes Sorensen " />
<person posts="7" size="22" who="Mark Hahn " />
<person posts="7" size="22" who="Lech Szychowski " />
<person posts="7" size="18" who="David S. Miller " />
<person posts="6" size="60" who="Cesar Eduardo Barros " />
<person posts="6" size="46" who="bug1 " />
<person posts="6" size="31" who="Jan Harkes " />
<person posts="6" size="27" who="Jesse Pollard " />
<person posts="6" size="24" who="Horst von Brand " />
<person posts="6" size="23" who="Borislav Deianov " />
<person posts="6" size="23" who="Christoph Rohland " />
<person posts="6" size="23" who="Florian Weimer " />
<person posts="6" size="21" who="Mike Galbraith " />
<person posts="6" size="19" who="Guest section DW " />
<person posts="6" size="17" who="bert hubert " />
<person posts="6" size="16" who="Oliver Xymoron " />
<person posts="5" size="25" who="Theodore Y. Ts'o " />
<person posts="5" size="22" who="Rick van Rein " />
<person posts="5" size="20" who="Russell King " />
<person posts="5" size="18" who="Richard B. Johnson " />
<person posts="5" size="18" who="Jens Axboe " />
<person posts="5" size="14" who="Andre Hedrick " />
<person posts="5" size="14" who="Rusty Russell " />
<person posts="5" size="13" who="Jeremy Fitzhardinge " />
<person posts="5" size="12" who="Alan Curry " />
<person posts="4" size="27" who="Bill Wendling " />
<person posts="4" size="23" who="Ville Herva " />
<person posts="4" size="18" who="Evan DiBiase " />
<person posts="4" size="18" who="Khimenko Victor " />
<person posts="4" size="17" who=" (Kanoj Sarcar)" />
<person posts="4" size="15" who="Austin Schutz " />
<person posts="4" size="14" who="Vandoorselaere Yoann " />
<person posts="4" size="13" who="David Fix " />
<person posts="4" size="13" who="Joe " />
<person posts="4" size="13" who="Andre Hedrick " />
<person posts="4" size="13" who="Linus Torvalds " />
<person posts="4" size="13" who="Andi Kleen " />
<person posts="4" size="12" who="Adam K Kirchhoff " />
<person posts="4" size="12" who="Chris Wedgwood " />
<person posts="4" size="12" who="Chris Evans " />
<person posts="4" size="11" who="Albert D. Cahalan " />
<person posts="4" size="11" who="" />
<person posts="3" size="59" who="Karsten M. Self " />
<person posts="3" size="50" who="Petri Kaukasoina " />
<person posts="3" size="20" who="Erik van Asselt " />
<person posts="3" size="20" who="Robert L. Harris " />
<person posts="3" size="15" who="Henner Eisen " />
<person posts="3" size="14" who="Sascha Ziemann " />
<person posts="3" size="13" who="Ben Von Handorf " />
<person posts="3" size="13" who="Rickard Lind " />
<person posts="3" size="12" who="Paul Jakma " />
<person posts="3" size="11" who="Dave Jones " />
<person posts="3" size="11" who="Matthias Andree " />
<person posts="3" size="11" who="Doug Sisk " />
<person posts="3" size="11" who=" (Rogier Wolff)" />
<person posts="3" size="10" who="Maciej W. Rozycki " />
<person posts="3" size="10" who="Ulrich Drepper " />
<person posts="3" size="10" who="S. Baker " />
<person posts="3" size="10" who="" />
<person posts="3" size="10" who="" />
<person posts="3" size="9" who="Martin Josefsson " />
<person posts="3" size="9" who="Alex Buell " />
<person posts="3" size="9" who=" (Hans-Joachim Baader)" />
<person posts="3" size="9" who="Mario Vanoni " />
<person posts="3" size="9" who="Martijn van Oosterhout " />
<person posts="3" size="8" who="Ron Gage " />
<person posts="3" size="8" who="" />
<person posts="3" size="8" who="Kurt Roeckx " />
<person posts="3" size="7" who="Krisztian Flautner " />
<person posts="3" size="7" who="root " />
<person posts="2" size="70" who="Ian Peters " />
<person posts="2" size="32" who=" (Graham Stoney)" />
<person posts="2" size="29" who="" />
<person posts="2" size="22" who="Piotr Wilkin " />
<person posts="2" size="17" who="Thomas " />
<person posts="2" size="16" who="Joseph A. Martin " />
<person posts="2" size="14" who="van Grootheest " />
<person posts="2" size="14" who="Greg Baker " />
<person posts="2" size="13" who="Wakko Warner " />
<person posts="2" size="12" who="Jan Evert van Grootheest " />
<person posts="2" size="11" who="Anders Larsen " />
<person posts="2" size="10" who="=?ISO-8859-1?Q?G=E9rard_Roudier?= " />
<person posts="2" size="10" who="=?iso-8859-1?Q?Fran=E7ois_romieu?= " />
<person posts="2" size="10" who="Matthew Hanselman " />
<person posts="2" size="10" who="Lyle Coder " />
<person posts="2" size="10" who="Hans Reiser " />
<person posts="2" size="10" who=" (Linus Torvalds)" />
<person posts="2" size="9" who="Pierfrancesco Caci " />
<person posts="2" size="9" who="Juan J. Quintela " />
<person posts="2" size="9" who=" (H. Peter Anvin)" />
<person posts="2" size="8" who="Miguel Freitas " />
<person posts="2" size="8" who="Nerijus " />
<person posts="2" size="8" who="Michael K. Johnson " />
<person posts="2" size="8" who="Thomas Molina " />
<person posts="2" size="8" who="Paul Slootman " />
<person posts="2" size="8" who="Sean Hunter " />
<person posts="2" size="8" who="Admin Mailing Lists " />
<person posts="2" size="8" who="Michael T. Babcock " />
<person posts="2" size="7" who="Alexander Demenshin " />
<person posts="2" size="7" who="Mircea Damian " />
<person posts="2" size="7" who="Riley Williams " />
<person posts="2" size="7" who="" />
<person posts="2" size="7" who="Phil Brutsche " />
<person posts="2" size="7" who="Matthew Dharm " />
<person posts="2" size="7" who="" />
<person posts="2" size="7" who="Gong Su " />
<person posts="2" size="7" who="" />
<person posts="2" size="7" who="Daniel Kobras " />
<person posts="2" size="7" who="Anthony Jenkins " />
<person posts="2" size="7" who="Dan Merillat " />
<person posts="2" size="6" who="Jim Wray " />
<person posts="2" size="6" who="Peter Rival " />
<person posts="2" size="6" who=" (Stuart Lynne)" />
<person posts="2" size="6" who="Linda Walsh " />
<person posts="2" size="6" who="Garst R. Reese " />
<person posts="2" size="6" who="" />
<person posts="2" size="6" who="Miles Lane " />
<person posts="2" size="6" who="Paul Mackerras " />
<person posts="2" size="6" who="Alexander Oelzant " />
<person posts="2" size="6" who="Christoph Hellwig " />
<person posts="2" size="6" who="Bernhard Rosenkraenzer " />
<person posts="2" size="6" who="Matti Aarnio " />
<person posts="2" size="6" who="Peter Steiner " />
<person posts="2" size="6" who="Nick Clifford " />
<person posts="2" size="6" who="" />
<person posts="2" size="6" who="Tim Waugh " />
<person posts="2" size="6" who="Thomas Dodd " />
<person posts="2" size="6" who="G. Hugh Song " />
<person posts="2" size="6" who="Tabei Koji " />
<person posts="2" size="6" who="Bernard Sebastien " />
<person posts="2" size="6" who="Chris Mason " />
<person posts="2" size="6" who="Andre Johansen " />
<person posts="2" size="5" who="Manfred Spraul " />
<person posts="2" size="5" who="" />
<person posts="2" size="5" who="Cyrille Chepelov (home) " />
<person posts="2" size="5" who="Brian Gerst " />
<person posts="2" size="5" who="Scott Doty " />
<person posts="2" size="5" who="Joerg Pommnitz " />
<person posts="2" size="5" who="Olivier Galibert " />
<person posts="2" size="5" who="Frederick Barnes " />
<person posts="2" size="5" who="Fred Heitkamp " />
<person posts="2" size="5" who="Ralf Baechle " />
<person posts="2" size="5" who="Jean-Luc Pedneault " />
<person posts="2" size="5" who=" (Jaroslaw Miszkinis)" />
<person posts="1" size="88" who="Robert de Vries " />
<person posts="1" size="58" who="" />
<person posts="1" size="15" who="Rudolf Leitgeb " />
<person posts="1" size="15" who="Saso Trendafilov " />
<person posts="1" size="13" who="Javier Miguel Rodriguez " />
<person posts="1" size="13" who="Bernard Beauchamp " />
<person posts="1" size="11" who="Taylor C. Carpenter " />
<person posts="1" size="9" who="Peter Zaitsev " />
<person posts="1" size="9" who="Sukesh Garg " />
<person posts="1" size="8" who="Elmer Joandi " />
<person posts="1" size="8" who="Philippe Troin " />
<person posts="1" size="7" who="f5ibh " />
<person posts="1" size="7" who="Gerard Sharp " />
<person posts="1" size="6" who="Anders Henke " />
<person posts="1" size="6" who="John Summerfield " />
<person posts="1" size="6" who="Jonathan Brauer " />
<person posts="1" size="6" who="Manuel Estrada " />
<person posts="1" size="5" who="dean gaudet " />
<person posts="1" size="5" who="Brent M. Smith " />
<person posts="1" size="5" who="Bill Bumgarner " />
<person posts="1" size="5" who="Mel " />
<person posts="1" size="5" who="Eric Youngdale " />
<person posts="1" size="5" who="Adam C Powell IV " />
<person posts="1" size="4" who="Roderich Schupp " />
<person posts="1" size="4" who="Paul Schulz " />
<person posts="1" size="4" who="Roger Larsson " />
<person posts="1" size="4" who="Petr Vandrovec " />
<person posts="1" size="4" who="" />
<person posts="1" size="4" who="Pierre Etchemaite " />
<person posts="1" size="4" who="Romain Vignes " />
<person posts="1" size="4" who="Howard Chu " />
<person posts="1" size="4" who="Luuk van der Duim " />
<person posts="1" size="4" who="Kurt Garloff " />
<person posts="1" size="4" who="Aman Singla " />
<person posts="1" size="4" who="Richard Polton " />
<person posts="1" size="4" who="Jani Hakala " />
<person posts="1" size="4" who="Artur Skawina " />
<person posts="1" size="4" who="Anton Ivanov " />
<person posts="1" size="4" who="Tim N. van der Leeuw,,, " />
<person posts="1" size="4" who="Alexander Kulak " />
<person posts="1" size="4" who="Greg Baker " />
<person posts="1" size="4" who="=?big5?B?vEK+SsLX?= " />
<person posts="1" size="4" who="Giacomo Catenazzi " />
<person posts="1" size="4" who="Michal Jaegermann " />
<person posts="1" size="4" who="Keith Underwood " />
<person posts="1" size="4" who="Dominik Kubla " />
<person posts="1" size="4" who="Donald Becker " />
<person posts="1" size="4" who="Terence Murphy " />
<person posts="1" size="4" who="George Anzinger " />
<person posts="1" size="4" who="Harald Koenig " />
<person posts="1" size="4" who="James Mastros " />
<person posts="1" size="4" who="Cefiar " />
<person posts="1" size="4" who="Matt D. Robinson " />
<person posts="1" size="4" who="Andrew McNabb " />
<person posts="1" size="4" who="" />
<person posts="1" size="4" who="LeRoy Cressy " />
<person posts="1" size="3" who="Abramo Bagnara " />
<person posts="1" size="3" who="Espiritu, Civ Kenneth " />
<person posts="1" size="3" who="Paul Kimoto " />
<person posts="1" size="3" who="Pete Toscano " />
<person posts="1" size="3" who="Ron Flory " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Scott Little " />
<person posts="1" size="3" who="=?ISO-8859-1?Q?Ra=FAl?= =?ISO-8859-1?Q?N=FA=F1ez?= de Arenas" />
<person posts="1" size="3" who="Matt Aylward " />
<person posts="1" size="3" who="Kernel Updates " />
<person posts="1" size="3" who="Terry Katz " />
<person posts="1" size="3" who="Erik Mouw " />
<person posts="1" size="3" who="Douglas Gilbert " />
<person posts="1" size="3" who="Rafal Boni " />
<person posts="1" size="3" who="Enrico Weigelt " />
<person posts="1" size="3" who="addi_c_ted " />
<person posts="1" size="3" who="Giuliano Pochini " />
<person posts="1" size="3" who="Joel Jaeggli " />
<person posts="1" size="3" who="Stefan Monnier " />
<person posts="1" size="3" who="Achim Flammenkamp " />
<person posts="1" size="3" who="Dylan Ulis " />
<person posts="1" size="3" who="Stephen Rothwell " />
<person posts="1" size="3" who=" (Kai Henningsen)" />
<person posts="1" size="3" who="Gregory Zornetzer " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Data Corp Soluciones Informaticas " />
<person posts="1" size="3" who="Andrew van der Stock " />
<person posts="1" size="3" who="Michael Gerdts " />
<person posts="1" size="3" who="Rene Chaddock " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Robert Schiele " />
<person posts="1" size="3" who="Ph. Marek " />
<person posts="1" size="3" who=" (Arjan van de Ven)" />
<person posts="1" size="3" who="David Elliott " />
<person posts="1" size="3" who="Nicholas Waltham " />
<person posts="1" size="3" who="=?ISO-8859-1?Q? =C4=E5=AA=E1=B5=D3=A4l ?= " />
<person posts="1" size="3" who="H. Peter Anvin " />
<person posts="1" size="3" who="Paul Gammans " />
<person posts="1" size="3" who="Henrik Theiling " />
<person posts="1" size="3" who="Marc SCHAEFER " />
<person posts="1" size="3" who="Steven N. Hirsch " />
<person posts="1" size="3" who="Zdenek Kabelac " />
<person posts="1" size="3" who="Wai-Sun Chia " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="James Sutherland " />
<person posts="1" size="3" who="Peter Samuelson " />
<person posts="1" size="3" who="david " />
<person posts="1" size="3" who="David Hinds " />
<person posts="1" size="3" who="Andi Kleen " />
<person posts="1" size="3" who="Meinhard Schneider " />
<person posts="1" size="3" who="Raj, Ashok " />
<person posts="1" size="3" who="Richard Guenther " />
<person posts="1" size="3" who="Erik Mouw " />
<person posts="1" size="3" who="Daniel Stone " />
<person posts="1" size="3" who="Mike Taylor " />
<person posts="1" size="3" who="Dave Higgen " />
<person posts="1" size="3" who="Aaron Sethman " />
<person posts="1" size="3" who="Jonathan Case Nicklin " />
<person posts="1" size="3" who="Zdenek Kabelac " />
<person posts="1" size="3" who="Kui Gao " />
<person posts="1" size="3" who="David Hinds " />
<person posts="1" size="3" who="Mr. James W. Laferriere " />
<person posts="1" size="3" who="Michael Richardson " />
<person posts="1" size="3" who=" (Eric W. Biederman)" />
<person posts="1" size="3" who="Jim Fritz " />
<person posts="1" size="3" who="lars brinkhoff " />
<person posts="1" size="3" who="David Whysong " />
<person posts="1" size="3" who="Dan Browning " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Marcelo de Paula Bezerra " />
<person posts="1" size="3" who="=?iso-8859-1?Q?Andr=E9_Dahlqvist?= " />
<person posts="1" size="3" who="David D.W. Downey " />
<person posts="1" size="3" who="Ingo Molnar " />
<person posts="1" size="3" who="Riley Williams " />
<person posts="1" size="3" who="Peter T. Breuer " />
<person posts="1" size="3" who="Marc Mutz " />
<person posts="1" size="3" who="Oystein Viggen " />
<person posts="1" size="3" who="Chris Adams " />
<person posts="1" size="3" who="Andi Kleen " />
<person posts="1" size="3" who="Adam J. Richter " />
<person posts="1" size="3" who="Amit S. Kale " />
<person posts="1" size="3" who="George Bonser " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Jeff Moyer " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Tim Hockin " />
<person posts="1" size="3" who="Glynn Clements " />
<person posts="1" size="3" who="Florin Andrei " />
<person posts="1" size="3" who="Konrad Rosenbaum " />
<person posts="1" size="3" who="HAPPY HAPPY JOY JOY " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Chmouel Boudjnah " />
<person posts="1" size="2" who="Vinny " />
<person posts="1" size="2" who="Horst von Brand " />
<person posts="1" size="2" who="Daniel Tryba " />
<person posts="1" size="2" who="Florian Lohoff " />
<person posts="1" size="2" who="Paul Mackerras " />
<person posts="1" size="2" who="Philipp Matthias Hahn " />
<person posts="1" size="2" who="Matei Conovici " />
<person posts="1" size="2" who="Robert M. Love " />
<person posts="1" size="2" who="Matt Nelson " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="The Lost Wizard " />
<person posts="1" size="2" who="Justin Hopkins " />
<person posts="1" size="2" who="Louis E Garcia " />
<person posts="1" size="2" who="Stijn Jonker " />
<person posts="1" size="2" who="Matthew Vanecek " />
<person posts="1" size="2" who="Thierry Vignaud " />
<person posts="1" size="2" who="Eric Sandeen " />
<person posts="1" size="2" who="Eric Buddington " />
<person posts="1" size="2" who="Paul Laufer " />
<person posts="1" size="2" who="Allen Unueco " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Du Jun " />
<person posts="1" size="2" who="J. S. Connell " />
<person posts="1" size="2" who="Daniel C. Nurmi " />
<person posts="1" size="2" who="Pradish Mathews " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Alexander Koch " />
<person posts="1" size="2" who=" (Aaron Denney)" />
<person posts="1" size="2" who="Allen Unueco " />
<person posts="1" size="2" who="Tim Waugh " />
<person posts="1" size="2" who="David Weinehall " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Werner Cornelius " />
<person posts="1" size="2" who="Ari Pollak " />
<person posts="1" size="2" who="=?ISO-2022-JP?B?cy1hZG1haWx=?= " />
<person posts="1" size="2" who="Chris the Elder " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Thomas Sailer " />
<person posts="1" size="2" who="Faux Pas III " />
<person posts="1" size="2" who="B. James Phillippe " />
<person posts="1" size="2" who="Ingo Molnar " />
<person posts="1" size="2" who="A.Ramasamy " />
<person posts="1" size="2" who="mleross " />
<person posts="1" size="2" who="Nicholas M. Kirsch " />
<person posts="1" size="2" who="Daniel Roesen " />
<person posts="1" size="2" who="Adam Fritzler " />
<person posts="1" size="2" who="root " />
<person posts="1" size="2" who="Pekka Savola " />
<person posts="1" size="2" who="Fred Cohen " />
<person posts="1" size="2" who="Dan Kegel " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Shawn Cupples " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Bernhard Rosenkraenzer " />
<person posts="1" size="2" who="Hoang Manh Hung " />
<person posts="1" size="2" who="Frank Davis " />
<person posts="1" size="2" who="Shaun Savage " />
<person posts="1" size="2" who="Phillip K. Hornung " />
<person posts="1" size="2" who="Dormeyer, Volker " />
<person posts="1" size="2" who="Tiger " />
<person posts="1" size="2" who="Stephen Rothwell " />
<person posts="1" size="2" who="octave klaba " />
<person posts="1" size="2" who="roumengishe " />

</stats>

<section
  title="Loopback Device Broken In Latest Kernels"
  subject="PROBLEM: ls gets stuck in D state on 2.3.99pre4-5"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_02/msg00426.html"
  posts="32"
  startdate="11 Apr 2000 00:00:00 -0800"
  enddate="20 Apr 2000 00:00:00 -0800"
>
<topic>SMP</topic>

<mention>Mike Galbraith</mention>
<mention>Mircea Damian</mention>
<mention>David Ford</mention>
<mention>Theodore Y. Ts'o</mention>

<p>In the course of discussion, David Ford mentioned that loopback had been
broken since 2.3.3x; Mircea Damian asked if anyone would fix it, and David
gave the only reply, saying he didn't have time. Elsewhere, Peter T. Breuer
asked why Theodore Y. Ts'o didn't seem to be working on it, since it was his
driver; but there was no reply from Ted or anyone else. Elsewhere there was
some discussion of how to go about fixing it, and at some point Steve Dodd
asked Stephen C. Tweedie, <quote who="Steve Dodd">Do you have any hunch as
to what _is_ causing the loop device deadlocks?</quote> Stephen replied,
<quote who="Stephen C. Tweedie">No, but I know how I'd go about searching.
Use the SGI kdb debugger code. Once you hit the deadlock, break out into the
debugger. That not only lets you take a backtrace of whatever code is
executing at a given point in time, it also lets you take a backtrace of any
sleeping process. Run "btp &lt;pid&gt;" on any of the processes stuck on the
loop device and you'll soon find out where they are blocked at
least.</quote></p>

<p>Tigran Aivazian replied that KDB didn't seem to work on the latest kernels.
Stephen said he'd only tried it on the earlier 2.3 versions, but Tigran then
said:</p>

<quote who="Tigran Aivazian">

<p>just to let everyone know - I tried the
kdb-v1.1-2.3.48 from SGI <a
href="http://www.oss.sgi.com">www.oss.sgi.com</a> against 2.3.99-pre6-3 on
SMP and it works just fine (the modifications I had to make were trivial).</p>

<p>It definitely didn't work against 2.3.49-52 but that may have been a
different kernel bug triggered by kdb. (on a different SMP machine)</p>

</quote>

<p>Mike Galbraith asked what changes Tigran had actually made to get KDB working,
and Tigran posted a one-line patch to smp.c; there followed some criticism
of the patch (though everyone agreed it would work), but the discussion did
not return to the loopback device deadlocks.</p>

</section>

<section
  title="Proposal: LUID For Secure Auditing"
  subject="Proposal &quot;LUID&quot;"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_02/msg01287.html"
  posts="90"
  startdate="14 Apr 2000 00:00:00 -0800"
  enddate="19 Apr 2000 00:00:00 -0800"
>
<topic>Capabilities</topic>
<topic>Samba</topic>

<p>Linda Walsh proposed:</p>

<quote who="Linda Walsh">

<p>How do people feel about the following proposal:</p>

<p>Adding support for login user id (auditable user id).</p>

<p>
<ol>

<li>adding a variable "luid" to the uid_t line in the task struct</li>

<li>adding two system calls - 1 to 'set' and one to 'get' the value.</li>

<li>adding CAP_SET_LUID that allows setting setting the luid.</li>

</ol>
</p>

<p>Set points would be at 'login', cron/at (running as a user), r(sh,cp,login),
and s(sh,..?). Implementation at user level would probably be in a pam
library. This wouldn't change over exec's/forks nor would it change at with
'su' nor with SUID programs.</p>

<p>This id would be used to track a user from the point of access to the system
to their ending contact which is required for C2 (now CAPP)
auditing.</p>

</quote>

<p>A number of fairly short (and some longer) subthreads branched off from
Linda's post. Alan Cox gave his approval, <quote who="Alan Cox">I actually
implemented it for some experimental stuff I was doing (resource tracking).
Certainly doesnt bother me. It should be 'obvious' code.</quote></p>

<p>Elsewhere, Rik van Riel objected that user-land daemons like httpd,
sendmail, procmail, ftpd, and many others would be affected by this change,
and would require fixing. He added, <quote who="Rik van Riel">Unless
somebody volunteers to rewrite those daemons, it may be best to keep the
change transparent.</quote> But Linda pointed out, <quote who="Linda
Walsh">Httpd, sendmail and all the deamons you mention would be run with the
default system ID of 'init'. They are 'system' processes and as such, in a
'trusted' Computing base (TCB) they would not have a 'login' id associated
with them. ftpd/rtelnetd should theoretically be using 'pam' when they start
a login session. I've been told by someone else in my group, who is
analyzing these functions, that rtelnetd calls login (which uses pam). On my
system their are entries for both rlogin and ftpd and samba, etc in pam. So
none of the demons you mention would be affected.</quote></p>

<p>Rik had suggested using EUID instead, and now Jamie Lokier suggested, <quote
who="Jamie Lokier">why not just use the time-honoured "real user
id"?</quote> But Brandon S. Allbery replied, <quote who="Brandon S.
Allbery">I think you're misunderstanding; this is a "new idea" only for
Linux. LUIDs are part of CAPP, which used to be called "C2" security. IOW
it's an existing standard, and one that some places insist on.</quote> Jamie
asked:</p>

<quote who="Jamie Lokier">

<p>Ok, but what's the point?  There is a perfectly
functional "real user id", and since you have to audit daemons to ensure
LUID is properly tracked according to your preferred definition of
"session", why not just ensure that the ruid tracks the same way. I.e., just
use ruid and call it LUID for CAPP purposes.</p>

<p>If you're thinking about capabilities to restrict LUID changes to the select
few daemons (e.g. just "login" and then only via a physical console) --
well, once you've gone that far, the ruid isn't used for anything else. It's
available for use as the CAPP LUID :-)</p>

</quote>

<p>Brandon had the last word of the subthread, with:</p>

<quote who="Brandon S. Allbery">

<p>No. ruid changes over su; it has to, so
setuid programs do the right thing (if you su, you do not want setuid
programs to switch between their set uid and your original real uid). You
need a separate uid to track who you logged in as for security auditing.</p>

<p>Also, CAPP/C2 security auditing/logging doesn't work in terms of sessions.
LUID isn't set by login to enforce some kind of session mechanism, but
solely to indicate that some process which does something security-auditable
was ultimately initiated, directly or indirectly, by a user who
authenticated to the system as the user with that (l)uid. Cron also sets it
for cron jobs, because it's acting as a proxy to run things for the user
that installed the crontab.</p>

</quote>

<p>And as far as capabilities went, he concluded, <quote who="Brandon S.
Allbery">Capabilities also aren't related to luids. They're quite simple:
only a process with a "null" luid (for some suitable definition of "null"; 0
doesn't qualify if root is allowed to login) can change its luid. This is
part of the official CCAP/C2 definition of luid.</quote></p>

<p>There was quite a bit more discussion, divided between proponants,
exponents, and folks who didn't seem to know the full details of CCAP, but
who were interested in discussing it anyway. Eventually Linda posted this
explanation (quoted in full):</p>

<quote who="Linda Walsh">

<p>These are some basics from CAPP that may explain</p>

<blockquote>

<p>The Common Criteria (CC) Controlled Access Protection Profile, hereafter
called CAPP, specifies a set of security functional and assurance
requirements for Information Technology (IT) products. CAPP-conformant
products support access controls that are capable of enforcing access
limitations on individual users and data objects. CAPP-conformant products
also provide an audit capability which records the security-relevant events
which occur within the system. The CAPP provides for a level of protection
which is appropriate for an assumed non-hostile and well-managed user
community requiring protection against threats of inadvertent or casual
attempts to breach the system security. The profile is not intended to be
applicable to circumstances in which protection is required against
determined attempts by hostile and well funded attackers to breach system
security. The CAPP does not fully address the threats posed by malicious
system development or administrative personnel. CAPP-conformant products are
suitable for use in both commercial and government environments.</p>

<p>...</p>

<p>The CAPP is for a generalized environment with a moderate level of risk to
the assets. The assurance requirements and the minimum strength of function
were chosen to be consistent with that level of risk. The assurance level is
EAL 3 and the minimum strength of function is SOF-medium.</p>

<p>...</p>

<p>TERMS:</p>

<p>An _authorized_user_ is a user who has been properly identified and
authenticated. These users are con-sidered to be legitimate users of the
TOE.</p>

<p>An _authorized_administrator_ is an authorized user who has been granted the
authority to manage the TOE. These users are expected to use this authority
only in the manner prescribed by the guidance given them.</p>

<p>...</p>

<p>All individual users are assigned a unique identifier. This identifier
supports individual accountability. The TSF authenticates the claimed
identity of the user before allowing the user to perform any actions that
require TSF mediation, other than actions which aid an authorized user in
gaining access to the TOE.</p>

</blockquote>

<p>The LUID concept is meant to address the needs of a particular
multi-national security specification (the Common Criteria). The countries
that co-developed the Criteria are: the UK, France, Germany, Canada,
Netherlands and the US. It has been agreed that a CC system evaluated in 1
country will be accepted in the other 5 countries.</p>

<p>Find the complete document on page <a
href="http://www.radium.ncsc.mil/tpep/library/protection_profiles/index.html">http://www.radium.ncsc.mil/tpep/library/protection_profiles/index.html</a>.
The latest Common Criteria documents can be found at <a
href="http://commoncriteria.org">http://commoncriteria.org</a>.</p>

<p>It is my reading of the above that a CAPP system would not be attached to
the internet but only a local 'intranet' composed of other similarly
controlled systems.</p>

<p>This certainly isn't meant to be a be-all, end-all answer to security. This
is a first step for a well defined environment (like a corporate intranet.</p>

<p>A CAPP compliant system meets "Evaluation Assurance Level 3" which describes
(in exhaustive detail) the level of testing and proof of Assurance. It is
*not* a formal mathematical proof of correctness (EAL7). For more on EAL's,
see page <a
href="http://commoncriteria.org/docs/index.html">http://commoncriteria.org/docs/index.html</a>,
Document CCV2.1, Part 3.</p>

<p>CAPP compliant systems are thought to be the minimum security needed for
many commercial vendors and will be the minimum requirement DoD systems next
year. These are not firewall system and unlikely to be used out of an
'internal environment'.</p>

</quote>

<p>Brandon, who had supported the proposal in earlier posts, now responded with
these comments:</p>

<quote who="Brandon S. Allbery">

<p>Hm.  CAPP appears to have altered goals from
C2: C2 was to detect *internal* security breaches on an
assumed-externally-secure system, and indeed its auditing provisions are not
suitable for detection of external threats.</p>

<p>If CAPP truly targets external threats, then I think we should indeed bypass
it as a completely misdesigned system for such.</p>

</quote>

<p>Elsewhere in the same post:</p>

<quote who="Brandon S. Allbery">

<p>C2, from which CAPP is descended, explicitly
*does not cover* networked systems. Not even "intranet"-connected systems.
C2 would need a major reworking to even begin to address such.</p>

<p>I am starting to agree that CAPP is a trainwreck....</p>

<p>I will concede the point about LUIDs per se; it looks like CAPP has
generalized them somewhat. However, keep in mind that the more complex the
mapping of a user identity, the more suspect it is from an auditing
standpoint.</p>

</quote>

<p>The debate went on for awhile, with points on both sides.</p>

</section>

<section
  title="Status Of PPP Over Ethernet"
  subject="&gt;=pre5 OOPS on boot failure to open /dev/console"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg00090.html"
  posts="15"
  startdate="15 Apr 2000 00:00:00 -0800"
  enddate="20 Apr 2000 00:00:00 -0800"
>
<topic>Networking</topic>

<mention>Bert Hubert</mention>
<mention>Jens Axboe</mention>

<p>In the course of discussion, Bert Hubert asked about the status of PPP over
ethernet. Andrew Morton gave a link to a <a
href="http://www.wcug.wwu.edu/lists/netdev/200004/msg00035.html">netdev
mailing list post</a> and explained, <quote who="Andrew Morton">Michael
Ostrowski dropped a lump of nice-looking PPPoE code onto netdev last
week.</quote> Someone else added that the code Michael had posted would be
important for anyone trying to do "PPP over X". Jens Axboe was very happy to
hear that people were working on PPP over X, and Henner Eisen gave his take
on the situation:</p>

<quote who="Henner Eisen">

<p>The PPPOX code certainly seems to be a good
framework for PPPoE and similar, where some new and somewhat complex
ppp-specific encapsulation methods for ppp frames are needed. But for
tunneling ppp over existing protocols, where the additional ppp-related
encapsulation is simple, maybe another approach might be more appropriate.</p>

<p>I've started to implement ppp over the AF_X25 socket layer. Here, ppp frames
are carried directly inside the X.25 payload, without any additional
encapsulation headers. The RFCs for ppp over other protocols are frequently
similar (no additional ppp frame encapsulations or just some pad bytes). For
such protocols, the encapsulation of the ppp frames is trivial and the PPPOX
framework (which makes the task of implementing complex ppp encapsulations
schemes more easy), does not give any advantage. Instead, the hard problems
faced when interfacing such a protocol to ppp are the interactions with the
protocol internals. Existing network protocol stacks differ in various areas
(e.g. which parts of the protocol processing need process context, how can
ppp_channel flow control be interfaced to the carrier protocol's flow
control mechanism).</p>

<p>Thus, the design chosen is a library approach, providing services which make
interfacing of existing socket code to the ppp_generic code as well as to
generic tunnel network interfaces (e.g raw-IP on top of X.25 payload) easy.
It aims beeing re-usable for other protocol stacks.</p>

<p>Currently, I've just finished the design and some of the prototype coding,
but totally untested until now. Thus, I did not upload it yet. But If you
(or soembody else) is interested to have a look at the prototype code (I
don't know whether this or the PPPOX approach will be more appropriate for
your PPPoATM), please drop me a mail.</p>

</quote>

<p>There followed a bit of implementation discussion.</p>

</section>

<section
  title="Unexplained Memory Overuse In Development Kernels"
  subject="memory handling in pre5/pre6"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg00170.html"
  posts="45"
  startdate="16 Apr 2000 00:00:00 -0800"
  enddate="22 Apr 2000 00:00:00 -0800"
>

<mention>Andrea Arcangeli</mention>
<mention>Ulrich Drepper</mention>
<mention>Rik van Riel</mention>

<p>Ulrich Drepper and a lot of other people noticed that with 2.3.99-pre5 and
2.3.99-pre6-3, the system would use a lot more memory than with previous
versions. After a lot of "me too"s, Rik van Riel finally pointed out that
none of this mattered unless folks were also seeing an actual performance
hit. A lot of people sang out "yes!" and as Mark Hahn put it, <quote
who="Mark Hahn">MAJOR performance hit. on my machine, for instance, I wind
up with something like 240M of 256 being wasted by big data files that I'm
done with, and a nice, cyclic pattern of ~4k swapouts, followed immediately
by a long stream of swapins. throughput drops to around 40% of peak.</quote>
After this second batch of "me too"s, Rik posted a patch that he thought
might help. Several people reported no (or very little) improvement with the
patch, and Andrea Arcangelie also added that the code tried to fix
nonexistent problems and had bugs of its own. Rik and Andrea had fun with
their nerf baseball bats while debugging, but were unable to conclusively
identify the problem.</p>

</section>

<section
  title="Philosophy Of Backward Compatibility In The Kernel"
  subject="Fix for maestro in 2.3.99-preX"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg00204.html"
  posts="16"
  startdate="16 Apr 2000 00:00:00 -0800"
  enddate="18 Apr 2000 00:00:00 -0800"
>
<topic>Backward Compatibility</topic>
<topic>Sound: Maestro</topic>

<mention>Pavel Machek</mention>

<p>In the course of discussion, Pavel Machek suggested stripping 2.2
compatibility from the maestro driver; which in his opinion would allow the
code to be cleaned up properly. But Jes Sorensen objected:</p>

<quote who="Jes Sorensen">

<p>Some of us are trying to maintain drivers that are
being used both in 2.2.x and 2.3.x - having the compatibillity code stripped
out regularly from someone making a quick hack in the 2.3.x tree is a major
pain.</p>

<p>Dropping 1.2.x support is very reasonable and 2.0.x is certainly debatable,
but if an author is actively maintaining the code, it should be up to
him/her to decide.</p>

</quote>

<p>Jeff Garzik agreed, <quote who="Jeff Garzik">you shouldn't strip 2.2.x
compatibility unless the author says it's ok.</quote> But Linus Torvalds
came in, with:</p>

<quote who="Linus Torvalds">

<p>No.</p>

<p>It's a major pain just because you do it wrong.</p>

<p>A lot of network drivers have this bass-ackwards way of maintaining both
2.3.x and 2.2.x drivers- they do something like</p>

<blockquote>

<code>

        #ifdef LINUX_VERSION_CODE &gt; 0x20139<br />

<blockquote>

                struct net_device_stats stats;<br />

</blockquote>

        #else<br />

<blockquote>

                struct enet_statistics stats;<br />

</blockquote>

        #endif

</code>

</blockquote>

or something like

<blockquote>

<code>

        #if (LINUX_VERSION_CODE &lt; 0x02030d)

<blockquote>

                dev-&gt;base_addr = pdev-&gt;base_address[0];

</blockquote>

        #else

<blockquote>

                dev-&gt;base_addr = pdev-&gt;resource[0].start;

</blockquote>

        #endif

</code>

</blockquote>

<p>and they do this in the middle of code that makes it fairly unreadable.</p>

<p>And then people complain when 2.3.x cleans stuff up, and removes those
stupid things. Without realizing that the cleaned up version is often much
better, and _can_ be made to work with the older kernels too.</p>

<p>What you can much more cleanly do in almost all cases is to have a "forwards
compatibility" layer, so that you can write the driver for the current code,
and then still be able to compile it for 2.2.x. And that forwards
compatibility code doesn't even need to be in the recent kernels: after all,
it is really only needed on the =old= setups.</p>

<p>Why do it that way? The BIG reason for doing it this way is that by putting
the compatibility code into _old_ kernels when supporting a driver like
that, you don't perpetuate the code. It automatically and magically just
gets dropped whenever people don't care enough about older versions, because
it's not carried around in the new code.</p>

<p>Example of how this _can_ be done (network drivers are the best example,
simply because there are so many of them, and because there are some recent
changes to how they operate that people still remember):</p>

<p>
<ul>

<li>

use the new operations everywhere. That means using

        netif_wake_queue()/netif_stop_queue()/etc

   WITHOUT any #ifdef's. They =do= work on 2.2.x too, with minimal glue (and
   that glue should be maintained in the 2.2.x tree, not in the 2.3.x tree!)

</li>

<li>use things like "pci_resource_start()" which have been added explicitly
   to make it easier to do certain backport things. It's defined in 2.3.x,
   and not defined in 2.2.x, but again you can have trivial backwards
   compatibility glue to take care of the issue. And again, the
   compatibility crud goes into the _old_ tree.</li>

</ul>
</p>

<p>So for example, the backwards compatibility crud in 2.2.x (which doesn't
even need #ifdef's, because it only exists in 2.2.x) would look something
like:</p>

<blockquote>

<code>

        #define net_device               device<br />
        #define net_device_stats         enet_statistics<br />
        #define dev_kfree_skb_irq(a)     dev_kfree_skb(a)<br />
        #define netif_wake_queue(dev)    clear_bit(0, &amp;dev-&gt;tbusy)<br />
        #define netif_stop_queue(dev)    set_bit(0, &amp;dev-&gt;tbusy)<br />
        #define netif_queue_stopped(dev) ((dev)-&gt;tbusy != 0)<br />
        #define netif_running(dev)       ((dev)-&gt;start != 0)

        static inline void netif_start_queue(struct net_device *dev)<br />
        {

<blockquote>

                dev-&gt;tbusy = 0;<br />
                dev-&lt;start = 1;

</blockquote>

        }<br />

        #define pci_resource_start(dev,bar) ((dev)-&gt;resource[(bar)]&amp;PCI_BASE_ADDRESS_MEM_MASK)<br />

        #define module_init(x) ...

</code>

</blockquote>

<p>and you're now almost done. With a clean driver, and without any #ifdef's AT
ALL.</p>

<p>(Yes, there are still going to be details, but you're getting the picture on
how this should work).</p>

<p>Now, one argument is commonly that "but you can't change old kernels, so the
old kernels cannot have new interfaces added to them when a development
kernel changes". And that argument is _bogus_. Because if you truly don't
change old kernels, then you also don't need to have any backwards
compatibility AT ALL, because the old driver will obviously continue to work
(or not work) forever unchanged.</p>

<p>This is why I do not want to add compatibility files to development kernels.
It's the wrogn thing to do, because adding compatibility files to new
kernels always implies carrying baggage around forever. Adding the
compatibility files to old kernels is conceptually the right thing to do: it
tells you (in the right place) that old kernels are still
maintained.</p>

</quote>

</section>

<section
  title="The Future Of The MIN() Macro"
  subject="small patch for pty.c"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg00303.html"
  posts="18"
  startdate="17 Apr 2000 00:00:00 -0800"
  enddate="19 Apr 2000 00:00:00 -0800"
>
<topic>SMP</topic>

<mention>Stephen Rothwell</mention>

<p>Paul Mackerras reported, <quote who="Paul Mackerras">In looking through
drivers/char/pty.c, I saw a couple of places where the MIN() macro is used
and one of its arguments is a function call which could potentially return a
different number each time it is called, particularly on SMP
systems.</quote> He posted a patch to get rid of the bad references to <a
href="http://lxr.linux.no/source/drivers/char/pty.c?v=2.3.99-pre5#L65">MIN()</a>,
but replied to himself the next day, <quote who="Paul Mackerras">Stephen
Rothwell just pointed out to me that my pty.c patch was bogus. The first
section was fine, the second section was just plain wrong. Here is a better
patch. :-)</quote> He posted the new version, but Horst von Brand objected
that someone was just going to stumble on this code, wonder why it didn't
use MIN(), and change it back. He added, <quote who="Horst von Brand">Better
fix MIN to work right, and get rid of _all_ these problems for good.</quote>
But Linus Torvalds replied:</p>

<quote who="Linus Torvalds">

<p>No. Wrong moral. You should not "fix" MIN().</p>

<p>MIN() is a _bad_ thing to use. It _always_ gets the sign wrong. Sorry, but
that's how it is. It makes people think that "oh, it takes the minimum of
two numbers" and at the same time it makes people completely forget
signedness issues.</p>

<p>In short, it's a really stupid macro, for something that is usually simpler
to do by hand anyway. And doing it by hand you can make it work right,
without confusion like this.</p>

<p>MIN() should go. If people really want to use a macro for something as
simple as MIN(), then you should always use UMIN() and SMIN(), and make
people have to think about signedness issues (but even then you tend to be
better off just doing it explicitly by hand).</p>

</quote>

<p>Horst posted a version of MIN() that he felt solved the problems:</p>

<quote who="Horst von Brand">

<p>This one doesn't get it wrong:</p>

<blockquote>

<code>

  #define min(x, y) ({typeof (x) x_ = (x); typeof (y) y_ = (y); x_ &lt; y_ ? x_ : y_;})

</code>

</blockquote>

<p>The variables x_ and y_ are the _same_ types as the x and y the macro gets,
the sizeof-ish behaviour of typeof ensures no evaluation of the expression
(i.e., no side effects); and then it does the comparison as it would with
the original values, just never evaluating anything twice. No (explicit)
mess with temporaries that have to be declared, and no huge expressions that
have to be written twice (only to get one of them wrong, as Murphy's law
assures will happen where you can't see it).</p>

</quote>

<p>There was no reply.</p>

</section>

<section
  title="Makefile Patch To Ease Module Compilation"
  subject="[Patch] module compilation infrastructure"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg00412.html"
  posts="4"
  startdate="17 Apr 2000 00:00:00 -0800"
  enddate="19 Apr 2000 00:00:00 -0800"
>

<p>Olaf Titz posted a patch, and explained:</p>

<quote who="Olaf Titz">

<p>please consider the following patch (against
2.3.99-pre3) or a similar thing for inclusion into the kernel. It fixes the
long-standing problem of finding out the right compiler options to compile
external modules.</p>

<p>This patch causes "make dep" to write a makefile fragment which can be
included from a module makefile.</p>

</quote>

<p>Jeff Garzik replied, <quote who="Jeff Garzik">Nice.  The kernel has needed
something like this for quite a while,</quote> but replied to himself a
couple days later with some compilation errors. Olaf replied with a question
or two, but there was not much discussion.</p>

</section>

<section
  title="Block Allocation In ext2"
  subject="Block fragments in ext2"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg00450.html"
  posts="9"
  startdate="18 Apr 2000 00:00:00 -0800"
  enddate="18 Apr 2000 00:00:00 -0800"
>
<topic>BSD: FreeBSD</topic>
<topic>FS: ext2</topic>

<mention>Linus Torvalds</mention>

<p>Justin Hopkins was working on a paper for school, and asked for a little
help. He gave a pointer to Linus Torvalds' statement against <a
href="http://www.uwsg.indiana.edu/hypermail/linux/kernel/9507/0195.html">block
fragments in ext2</a>, and asked if block fragments really were deprecated.
Stephen C. Tweedie replied, <quote who="Stephen C. Tweedie">Yes. The ext2
block allocation algorithms are a lot better than those in the original FFS,
and we can get good performance with smaller block sizes.</quote> Alexander
Viro took up the issue, with, <quote who="Alexander Viro">Stephen, I
seriously suspect that larger allocation block sizes would buys us a better
speed. Reason: allocation algorithms in Linux ext2 and FreeBSD UFS
implementations are very similar. Ditto for layouts, indeed. And on FreeBSD
16Kb blocks give visible win over the 4Kb ones.</quote> Stephen agreed with
this, adding that this would speed up large file deletion. He went on,
<quote who="Stephen C. Tweedie">Most of the advantage, though, lies in the
lower amount of metadata required for the mapping tree if you have a larger
blocksize. I'd much prefer to see us end up with btree-based mapping trees
and a small blocksize rather than large blocks with standard indirection
mapping tables as a final solution, as that really ought to gain the best of
both worlds: small-blocksize allocation efficiency with large-blocksize
metadata performance.</quote> There followed a brief discussion of various
possible implementations.</p>

</section>

<section
  title="Experiment In Linux Deprivation"
  subject="Moving.."
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg00764.html"
  posts="1"
  startdate="19 Apr 2000 00:00:00 -0800"
  enddate="19 Apr 2000 00:00:00 -0800"
>

<p>Linus Torvalds mentioned:</p>

<quote who="Linus Torvalds">

<p>Just a quick heads up that I haven't had access
to a computer for two days (and yes, my hands _are_ shaking), because we're
in the middle of a move. We've gotten everything but the cats to the new
house, but all our stuff is still in big boxes, and I will probably remain
unable to read email from home for at least another week.</p>

<p>So this is just a notice to people to not worry - I'm just snowed in and
will probably require some re-sends after it all clears up..</p>

</quote>

</section>

<section
  title="Problems Connecting To Web Sites"
  subject="Problems with MTU?"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg00920.html"
  posts="5"
  startdate="20 Apr 2000 00:00:00 -0800"
  enddate="21 Apr 2000 00:00:00 -0800"
>
<topic>FS: sysfs</topic>
<topic>Modems</topic>
<topic>Networking</topic>

<p>This thread featured a long, characteristic post by Theodore Y. Ts'o.
Initially, Hans-Joachim Baader reported:</p>

<quote who="Hans-Joachim Baader">

<p>for several months I had the problem that
access to some web sites fails mysteriously. This means I never got a reply
although the servers were reachable with ping and telnet.</p>

<p>Today I did</p>

<p>        echo 1 &gt; /proc/sys/net/ipv4/ip_no_pmtu_disc</p>

<p>and suddenly all these sites worked again for me. I use kernel 2.2.x
(2.2.pre15-19 currently). Some of the affected sites are dri.sourceforge.net
(in fact, the whole sourceforge.net) and support.3com.com</p>

<p>Are these web sites broken?</p>

</quote>

<p>Theodore replied:</p>

<quote who="Theodore Y. Ts'o">

<p>Actually, yes, the web sites are broken; but
it's a relatively subtle problem. Here's what's going on.</p>

<p>The web sites are probably behind a firewall which is filtering all ICMP
packets (since some dumb firewall administrator read somewhere that all ICMP
packets are evil). Somewhere in the network path between you and the web
site, there's a link which has a maximum MTU which is smaller than the
ethernet default of 1500 bytes.</p>

<p>Normally, dumb hosts would just send bytes using their local max MTU, and
then when the packets hit the link with the restricted MTU, the packet would
get fragmented at that point, and then it would get reassembled at the
receiver. Fragmentation has the problem, though, that it only takes one
fragment to get lost in order to require the retranmission of the entire
packet, thus wasting network bandwidth --- and if the reason why the one of
the fragments was dropped was due to link congestion, the fact that all of
the fragments have to get retransmitted can actually worsen the situation.</p>

<p>Hence, good network citizens (of which Linux is one) uses Path MTU discovery
to try to determine the appropriate size to send over any arbitrary link.
The way it works is very simple; in each direction, the hosts sends packets
with the Don't Fragment bit set. When a packet which is too large reaches
the router just before the link with the restricted MTU, since the don't
fragment bit is set, the router drops the packet on the floor and sends back
an ICMP Destination unreachable with a code which means "fragmentation
needed and DF set", along with the maximum MTU of the constricting network
link. This allows the sender to automatically determine maximum MTU for the
hop, and the sender can then resend the TCP segment using a smaller
packetsize, now that the maximum path MTU is known.</p>

<p>The problem with this comes with, as I mentioned earlier, bone-headed
firewall maintainers who believe that all ICMP packets are bad and filters
all of them. This includes the ICMP Destination unreacable packets which are
needed to make path MTU function correctly. As a result, a site which is
behind one of these firewalls will continually send big packets with the
don't fragment bit set, which then get rejected when they hit the
constricting link, but since the firewall filters out the ICMP "too big"
message, the sending sight never knows that the packets are getting
rejected, and so they can never send you anything.</p>

<p>This doesn't come up in normal operation for most hosts because most
links support at least the ethernet maximum MTU of 1500, and if there is
a constricting link, it is at the client endpoint (for example, the
client is dialing up with PPP and so has a restricted MTU).  At the
client end point, it's not a problem, since the client knows that it's
sending packets to an interface with a restricted MTU, and so it sends
small packets.  The problem comes when the constricting link is in the
*middle* of the network path, and so Path MTU discovery is required in
order to make things work.  (Either that, or you have to learn to live with
fragmentation with their attendant disadvantage).</p>

<p>So this will come up if you are using a PPP to connect to your gateway, and
then you use NAT to allow machines on the local ethernet to gain access to
the network via your singleton PPP connection. It also comes up with those
folks using DSL where the providers are using the abomination also known as
PPP over Ethernet (PPPOE).</p>

<p>There are a couple of solutions you can use to solve this problem.  One is
to ask nicely to the web site administrators that they fix their firewall.
Unfortunately, this doesn't always work. I am told that Amazon's web
programmers were told about this problem, and they acknowledged it *as* a
problem, but said they weren't allowed to fix it. (Probably because the
bone-headed firewall administrator in their case was clueless, and they
didn't have the power to override him.)</p>

<p>The second approach, assuming that the constricting link is close to you
(usually it's the second-to-last hop in most scenarios), you can simply
set a per route max segment size (MSS) parameter, which will force TCP
packets using that particular route to be no larger than the MSS size
--- in both directions.  Given that the problem is usually on the link
to the outside internet, and that connections to other hosts within the
subnet are OK, it's usually a matter of setting the mss option only on the
default route:</p>

<p>route add default gw 216.176.176.160 mss 1400</p>

<p>The final approach, which apparently some of the DSL providers use, is that
on the cable modem box or on the DSLAM in the telco's central office, they
are actively messing with the outgoing packets, by looking for TCP packets
with the SYN bit set (which indicates the beginning of a TCP stream), and
change the max MSS option in the IP header to be smaller than max MTU caused
by the PPP over Ethernet overhead. This is incredibly ugly, and violates the
IP protocol's end-to-end argument. It also breaks in the presence of IPSEC,
since the DSL provider won't be able to muck with the packet without
breaking the cryptographic checksums.</p>

<p>So it's completely ugly.  Still, I imagine that Rusty will no doubt be
writing a new "packet fucking" module in ipchains to support this kind of
TCP syn option rewriting. :-)</p>

</quote>

</section>

<section
  title="/usr/include/linux And /usr/include/asm Symlinks"
  subject="PROBLEM: kernel 2.3.99-pre5 does not compile without system-wide kernel headers"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg00838.html"
  posts="12"
  startdate="20 Apr 2000 00:00:00 -0800"
  enddate="24 Apr 2000 00:00:00 -0800"
>

<mention>Andries Brouwer</mention>
<mention>Jeff Garzik</mention>
<mention>Olaf Titz</mention>

<p>Romain Vignes was trying to compile multiple versions of the kernel, without
having to update the /usr/include/linux and /usr/include/asm symlinks each
time. He posted a 'Makefile' patch to work around the problem by explicitly
including the required directories on the 'gcc' command line, but
acknowledged that this wasn't a complete fix. Jeff Garzik replied that
changing the symlinks was not necessary; one could just unpack the kernel
tarball and start compiling. But Theodore Y. Ts'o explained and proposed:</p>

<quote who="Theodore Y. Ts'o">

<p>.... except if you want to build stand-alone
kernel modules that work against the kernel that you are currently booting.</p>

<p>This still requires that /usr/include/linux and /usr/include/asm match the
kernel you are currently building. Some packages will now use
/usr/src/linux/include/{linux,asm} in preference if they exist, or allow the
user to manually specify the location of the kernel source tree to use, but
these conventions haven't been universally standardized yet.</p>

<p>Doing so would be a good idea, BTW.  If we can all agree that "this is the
way to do things in Linux 2.4", and make sure all of the distributions are
informed of that fact, that would be Good Thing (tm). My personal nomination
of the standard way to do things is to assume that /usr/src/linux is a
symlink to kernel sources corresponding to the default kernel being booted
on that machine, and that stand-alone device drivers that need to compile
against a kernel should default to /usr/src/linux, but there should be an
easy way for users to override that and specify some other kernel source
tree if necessary. Any objections to such an approach?</p>

</quote>

<p>Some folks did object. Andries Brouwer, Olaf Titz, and Jeff all pointed out
that the "kernel that you are currently booting" was not as clear a concept
as it might seem, since anyone compiling the kernel would actually have two
kernels -- the previous and the current. There was a very small amount of
discussion, but nothing conclusive.</p>

</section>

<section
  title="New Hacker Posts First Patch"
  subject="[PATCH] Fix for rtc.c non-atomic access to rtc_status"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg00859.html"
  posts="8"
  startdate="20 Apr 2000 00:00:00 -0800"
  enddate="23 Apr 2000 00:00:00 -0800"
>
<topic>SMP</topic>

<mention>Manfred Spraul</mention>

<p>Cesar Eduardo Barros posted his first ever kernel patch, to fix some SMP
races in 'drivers/char/rtc.c'. There were a couple replies criticising the
patch, and Cesar also replied to himself 4 times (mostly with improved
patches). For the first self-reply, he said,, <quote who="Cesar Eduardo
Barros">I added code to avoid the xchg() race (thanks to Manfred Spraul for
hinting me on that one). Couldn't avoid using spinlocks.</quote> In the
final version he also credited Manfred with making the code much simpler
than the original submission.</p>

</section>

<section
  title="Stable Pre-Patches Stall Console Output"
  subject="2.2.15pre19 and screen"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg00871.html"
  posts="9"
  startdate="20 Apr 2000 00:00:00 -0800"
  enddate="21 Apr 2000 00:00:00 -0800"
>

<mention>Alan Cox</mention>
<mention>Manfred Spraul</mention>
<mention>Philippe Troin</mention>
<mention>Robert L. Harris</mention>

<p>Petri Kaukasoina reported, <quote who="Petri Kaukasoina">2.2.15pre19 and
2.2.16pre1 have problems with "screen" (the text window multiplexer
program). Under screen, the output of some programs (e.g. less) only show
about 1024 characters at a time and then stop. When I type some key, it
shows the next 1024 chars of the output and so on. 2.2.15pre18 and earlier
are ok.</quote> Manfred Spraul asked for an 'strace' of 'screen' or 'less';
Petri couldn't reproduce the problem on an 'straced' process, but Philippe
Troin confirmed that he too saw the problem; and posted 'strace' output.
Robert L. Harris also experienced the same problem and posted some 'strace'
output. Alan Cox posted a one-line patch to 'drivers/char/pty.c', and that
ended the thread.</p>

</section>

<section
  title="Renovating File Locking Code"
  subject="[PATCH] /proc/locks bugfix"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg00991.html"
  posts="6"
  startdate="21 Apr 2000 00:00:00 -0800"
  enddate="21 Apr 2000 00:00:00 -0800"
>

<p>Manfred Spraul posted a couple bugfixes for 'fs/proc/proc_misc.c' in the 2.3
series, and Matthew Wilcox replied, <quote who="Matthew Wilcox">There are
actually worse problems than this in locks.c. It's called from nfs lockd
without the big kernel lock held at all (it holds a semaphore on the inode,
but this is inadequate). I've fixed this in my tree by putting all accesses
to the lock data structures under its own semaphore. I hadn't spotted the
problem with /proc/locks, but I wasn't looking for it :-) I noticed a race
condition with my solution yesterday, so I'm fixing that and hopefully I
should be able to get a rearchitected locks.c out in a couple of weeks time.
I'm doing a few other things to it at the same time...</quote></p>

<p>Manfred reminded Matthew, <quote who="Manfred Spraul">It's dangerous to
replace lock_kernel() with a single semaphore: lock_kernel() means one cpu,
down() means one thread. Did you double check that you don't cause a major
slowdown/reschedules, e.g. if kmalloc() sleeps?</quote> He added that he
always preferred a single spinlock (where the process loops until a resource
becomes available) instead of a semaphore (where the process sleeps until a
resource becomes availabe, at which point it is awakened) in those
situations for performance reasons. Matthew replied that the file locking
code wasn't performance critical, but that in terms of guarding against
slowdown using his method, <quote who="Matthew Wilcox">yes, the code only
sleeps in very specific places, which are while the semaphore either isn't
held, or is dropped while we sleep, and the code then restarts its scan if
we did have to block.</quote></p>

<p>In terms of preferring spinlocks to semaphores, Matthew said he could go
either way. He added, <quote who="Matthew Wilcox">I did think about making
the locking more finegrained here, but I really don't think it's worth
it</quote></p>

<p>Alan Cox came in at this point, with, <quote who="Alan Cox">The 2.3.9x file
locking code is fairly broken anyway. Actually going over it with a large
pickaxe wouldnt do any harm.</quote> Matthew replied, <quote who="Matthew
Wilcox">`A large pickaxe' is a pretty good description of what I've done to
it,</quote> but added that his changes weren't ready yet.</p>

</section>

<section
  title="Organization Of Kernel Modules"
  subject="Announce: modutils 2.3.11 is available - the debugger's helper"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_03/msg01010.html"
  posts="10"
  startdate="21 Apr 2000 00:00:00 -0800"
  enddate="23 Apr 2000 00:00:00 -0800"
>
<topic>Networking</topic>
<topic>PCI</topic>

<mention>Victor Khimenko</mention>
<mention>Matthew Wilcox</mention>
<mention>Keith Owens</mention>

<p>Keith Owens announced 'modutils' version 2.3.11, and there followed a debate
over whether to continue keeping groups of related modules in separate
subdirectories, or to move all modules into a single flat directory. Matthew
Wilcox pointed out that all modules were symlinked at compile-time into
'/usr/src/linux/modules' anyway, and therefore having separate
subdirectories didn't even protect against namespace conflicts. And, he
added, given a flat namespace, all those subdirectories only amounted to
obfuscation.</p>

<p>Richard Gooch countered with the idea that subdirectories made it easier for
humans to find particular modules or to view groups of related modules. He
said, <quote who="Richard Gooch">When I ask myself "do I have the ne2k-pci
module", it's obvious to just look in the "net" directory. The
subdirectories are a natural categorisation that makes life easier. It's not
about pretending there is a hierarchical namespace.</quote> Matthew replied
that, for the 'ne2k' example, it was just as easy to do an 'ls *ne2k*' from
a flat directory and be done with it. He went on to point out that the
hierarchical directory structure made life more complex both for the kernel
build scripts and for 'modutils' itself. But Richard felt that the added
complexity was not significant, saying, <quote who="Richard Gooch">I can't
see why we would change things in the direction of making it harder for
humans, since we already have a reasonable system implemented.</quote></p>

<p>Victor Khimenko came in at this point from a different angle, pointing out
that the existing directory structure had serious problems; and it was often
difficult to find particular drivers if one didn't know before-hand where to
look. Jan Evert van Grooth agreed with Victor, as did Jamie Lokier. Jamie
put it:</p>

<quote who="Jamie Lokier">

<p>I went looking for ipfwadm.o in net.  Nope, it's
in misc. What about af_packet.o? That's in misc too.</p>

<p>It makes some sort of sense: net/ seems to contain network *device* drivers.
This now includes ppp (but it didn't before).</p>

<p>And why isn't there a sound directory?  Etc.</p>

<p>If there must be directories, IMO "video" and "sound" should have priority
over "ieee1394".</p>

</quote>

<p>Dominik Kubla also sang in this chorus, saying that if there was going to be
a hierarchical directory structure, it should be done properly (he posted
his own suggested hierarchy); but that actually, <quote who="Dominik
Kubla">we should ditch the subdirectories and just adopt a flat single
directory: it makes things simpler and namespace collision will happen at
compile time anyway, so we need not worry about this.</quote> The discussion
ended there.</p>

</section>

<section
  title="Handling Large Files On 32-bit Systems"
  subject="llseek and 64 bit return..."
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_0004_04/msg00250.html"
  posts="8"
  startdate="24 Apr 2000 00:00:00 -0800"
  enddate="24 Apr 2000 00:00:00 -0800"
>

<p>A one-day thread. Linda Walsh pointed out that lseek() gave an error if its
return value required more than 32 bits. She suggested having lseek() return
a 64 bit value on Intel machines. Matti Aarnio gave a pointer to <a
href="http://www.sas.com/standards/large.file/">The Large File Summit</a>
and replied, <quote who="Matti Aarnio">Use lseek64() and be happy. On intel
linux it is implemented at glibc by means of llseek(), but that is then a
side issue.</quote> Linda replied, <quote who="Linda Walsh">Is there some
good reason why the interface shouldn't be cleaned up on Intel? Seems like
it would be much more maintainable, less ugly -- rather than have various
user-land kludges that take advantage of extra kernel calls. Wouldn't it be
more straightforward to have lseek return a 64 bit value on ia32 (et al. 32
bit platforms) as it does on the 'big machines'? Seems like it could result
in simpler glib code as well...</quote> After some more discussion, Oliver
Xymoron also gave a pointer to the same page, and said, <quote who="Oliver
Xymoron">Linux is following a fairly well thought out scheme called the
Large File Summit for dealing with 64-bit files on 32-bit systems.</quote>
That was the end of the thread.</p>

</section>

</kc>
