cvs-src summary for August 23-30

Mark Johnston mjohnston at
Mon Aug 30 17:16:24 PDT 2004

Here's this week's summary.  As a side note, I discovered Synergy 
( today, and it made the summary-writing much more 
pleasant, letting me flip my mouse cursor between the desktop I write the 
summary on and the laptop I read the mail on, copying and pasting 
transparently.  I highly recommend it if you run any kind of 
multi-PC-on-one-desktop configuration.

FreeBSD cvs-src summary for 23/08/04 to 30/08/04
This is a regular weekly summary of FreeBSD's cutting-edge development.
It is intended to help the FreeBSD community keep up with the fast-paced
work going on in FreeBSD-CURRENT by distilling the deluge of data from
the CVS mailing list into a (hopefully) easy-to-read newsletter.  This
newsletter is marked up in reStructuredText_, so any odd punctuation
that you see is likely intended for the reST parser.

.. _reStructuredText:

You can get old summaries, and an HTML version of this one, at  Please send any comments to Mark Johnston
(mark at

If you would like to get the summary without subscribing to current@,
please send mail to freebsd-cvs-summary-subscribe at
Thanks to Omer Faruk Sen and EnderUNIX for hosting this list.

For Lukasz Dudek and Szymon Roczniak's Polish translations of these
summaries, which may lag the English ones slightly, please see

.. contents::

New features
Networking now runs without Giant by default
Robert Watson (rwatson) changed the default value of the sysctl
debug.mpsafenet to 1, meaning that the network stack will run without the
Giant system lock.  This means that networking will be more parallelizable
and will be faster on SMP systems.

To counteract this change, you can set debug.mpsafenet to 0 in
loader.conf, or add a kernel option, "NET_WITH_GIANT", that restores the
default to 0.

The networking subsystem has been the focus of a huge amount of effort
to reach this point, and there is still some work left to do in locking
individual drivers (which have been marked specifically as needing
Giant).  Nevertheless, this change represents a big step towards SMPng.
Congratulations and thanks to Robert and all involved in the locking work!

PFIL_HOOKS integrated into the kernel
Andre Oppermann (andre) changed PFIL_HOOKS, the API for packet filters to
hook the functions they use, to be a permanent part of the kernel.  The
PFIL_HOOKS kernel compile option has been removed.  He also made a tweak
that eliminates the performance impact that PFIL_HOOKS used to have when
no packet filters were loaded.

Module loader now supported on amd64
Ian Dowse (iedowse) committed support for loading modules via the module
loader on amd64.

Mouse sync recovery improved for Belkin KVM switches
Justin T. Gibbs (gibbs) improved the sync recovery in the mouse code,
cutting down on spurious mouse moves and clicks with Belkin KVM switches.
Large portions of the code he committed were written by Brian Somers.

Notable changes
5.3-BETA2 begins
Scott Long (scottl) updated the system version to 5.3-BETA2, marking
another step on the way to 5.3-RELEASE.

Count device support removed from config
Peter Wemm (peter) removed support from config, the kernel configuration
processing tool, for counted devices.  Counted devices are device lines
that incorporate a count of how many devices to support.  Peter changed
over the last few devices using this option to have the count passed as an
option.  This means that quotes are no longer required around options with
numbers in them, like snd_emu10k1.

X configuration removed from sysinstall
Ken Smith (kensmith) removed support from sysinstall for configuring the
X server.  This was discussed on -current, and the consensus was that X
configuration is best left for post-install.

Discussion topics

Use of KASSERT() vs. other error checking
Pawel Jakub Dawidek (pjd) made a change to GEOM to skip providers with an
undefined sector size.

Poul-Henning Kamp (phk) responded to this change, saying, "This is wrong.
A provider with a non-zero access count should always have a sector size."

Pawel answered, "I know that it should be done this way, but I'm not going
to fix atapi-cd.c, scsi_da.c and scsi_cd.c and who knows what else."

Roman Kurakin (rik) asked, "Does your code print any warning message in
that case?  That could force authors of 'buggy' code to fix it."

Pawel answered, "No, this should be KASSERT() inside g_error_provider()".

Brian Fundakowski Feldman (green) replied, "I don't like that one bit."
He gave the following suggestions for error types (reformatted):

"KASSERT() should be reserved for serious programming errors -- guarding
against side cases that show major error.
panic() should be reserved for cases where error recovery is impossible
and errors are detected under the normal course of error checking.
printf() should be used when there are simple mistakes that do not cause
system instability if you recover from them."

Poul-Henning answered, "In GEOM I have generously sprinkled KASSERTs for
the very purpose of stopping programmer misunderstandings or attempts
to be smart.  The intent is that the programmer will find his bugs
even during light testing and that the KASSERTs will help clarify the
intentional use of APIs."

Brian asked, "Why in the world would you crash the machine when you don't
have to?", continuing, "I use KASSERT()s quite liberally, too, you know,
but running into crashes in half-finished kernel code that's in the tree
-- as a user -- is far inferior to running into errors and warnings that
do not halt the whole system."

Poul-Henning answered his question, "To prevent bogus code from being
committed in the first place."

Brian replied, "You cannot presume testing will expose every possible

M. Warner Losh (imp) responded, "I beg to differ. newbus has lots of
asserts in it that could be recovered from, but instead are panics.  These
panics have been very helpful in shaking out bugs [ . . . ]."

Poul-Henning also replied to Brian's post, saying, "If you hit any of the
KASSERTS in geom, your code is very broken and if your testing doesn't
uncover that (with the help of the KASSERTS) then you have no business
being a committer."

Hot-plugging PS/2 keyboards
As mentioned in `Mouse sync recovery improved for Belkin KVM switches`_,
Justin Gibbs (gibbs) improved the mouse code.

On a console-related note, Andre Oppermann (andre) asked, "Do have an
idea how to get a PS2 keyboard recognized if none was connected when the
machine booted?"

M. Warner Losh (imp) replied with some text from the sc man page, showing
that"0x100" will instruct the driver to periodically scan
for a keyboard device.  He also noted that bit 0 must not be set in the
atkbd driver flags (hint.atkbd.0.flags).

Daniel O'Connor noted, "This prevents USB keyboards from working (I think)
because the system will only talk to it's (possibly not connected) PS/2
keyboard even when you plug a USB one in.."

Warner replied, "It doesn't prevent usb keyboards from working, you can
always use the kbdcontrol to set the usb keyboard as the primary one."

Brian Fundakowski Feldman (green) also suggested, "See the keyboard
directive I recently added to rc.conf(5)."  The entry in question reads::

    keyboard    (str) If set to a non-null string, the virtual console's key-
                board input is set to this device.

Important bug fixes
Denial-of-service vulnerability in zlib fixed
Jacques Vidrine (nectar) fixed a denial-of-service vulnerability in zlib,
the compression library.  This was submitted by Dmitry V. Levin, and
originally found by Johan Thelmen as reported in `Debian bug 252253`_.

.. _`Debian bug 252253`:

Other bug fixes
John Baldwin (jhb) committed a patch from Georg-W. Koltermann fixing a
bug that was preventing the IBM Linux JDK from running.  This closes `PR

.. _`PR 68079`:

More information about the freebsd-current mailing list