[BusyBox] [PATCH] devfsd new patch

Allen Chan allen at developers.alyz.com
Sat Nov 20 18:54:13 UTC 2004


Tito,

I ran the following five tests:
(1) start devfsd with /etc/devfsd.conf and no /dev/log
(2) start devfsd with no /etc/devfsd.conf and no /dev/log
(3) start devfsd with badly linked /etc/devfsd.conf and no /dev/log
(4) start devfsd with /etc/devfsd.conf and /dev/log
(5) start devfsd with no /etc/devfsd.conf and /dev/log

against the following three versions of busybox:
(a) original - busybox 1.00
(b) patched - busybox 1.00 with new patch
(c) errnosave - busybox 1.00 with orig patch saving/restoring errno.

The failures are summarized as follows:
* 1a outputs a bad error message
* 3a outputs the wrong error message
* 3b outputs the wrong error message

Additionally, here are other differences:
* 1c outputs a "success" message while 1b is silent an 1a outputs an 
error message.
* 4a and 4c generate a "success" message in /var/log/messages while 4b 
generates no message.

The full logs are attached as "plain text documents".

Please realize that I present these test logs purely as data for your 
information, not as a basis for any argument.  As far as I'm 
concerned, all of these versions of devfsd work for my purposes, and 
I'm happy with however you wish to patch (or not) the official devfsd 
in busybox.

On Saturday 20 November 2004 09:00 am, Tito wrote:
> This new patch applies on CVS and should fix the problem reported
> by Allen Chan by taking into account Bastian's suggestions.
>
> Bastian and Allen would you mind to take a look at it and test it?
>
> Ciao,
> Tito

-- 
Allen Chan
allen at developers.alyz.com
http://www.alyz.com
-------------- next part --------------
Checking for /proc/mm...found
Checking for the skas3 patch in the host...found
Checking PROT_EXEC mmap in /tmp...OK
Linux version 2.6.9-1-um-20041117-1 (alydar at swale) (gcc version 3.3.5 (Debian 1:3.3.5-2)) #1 Wed Nov 17 03:20:45 EST 2004
Built 1 zonelists
Kernel command line: mem=64M ubd0=uml.fs con=null con0=null,fd:2 con1=fd:0,fd:1 devfs=mount root=98:0
PID hash table entries: 512 (order: 9, 8192 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 59360k available
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Checking for host processor cmov support...Yes
Checking for host processor xmm support...No
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
Checking for /dev/anon on the host...Not available (open failed with errno 2)
NET: Registered protocol family 16
mconsole (version 2) initialized on /home/alydar/.uml/hagYNq/mconsole
ubd: Synchronous mode
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
devfs: 2004-01-31 Richard Gooch (rgooch at atnf.csiro.au)
devfs: boot_options: 0x1
Installing knfsd (copyright (C) 1996 okir at monad.swb.de).
SGI XFS with ACLs, security attributes, no debug enabled
SGI XFS Quota Management subsystem
Initializing Cryptographic API
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
Using anticipatory io scheduler
nbd: registered device at major 43
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256) (6 bit encapsulation enabled).
CSLIP: code copyright 1989 Regents of the University of California.
SLIP linefill/keepalive option.
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
IPv4 over IPv4 tunneling driver
ip_conntrack version 2.1 (464 buckets, 3712 max) - 300 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
ipt_recent v0.3.1: Stephen Frost <sfrost at snowman.net>.  http://snowman.net/projects/ipt_recent/
arp_tables: (C) 2002 David S. Miller
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
Bridge firewalling registered
Ebtables v2.0 registered
802.1Q VLAN Support v1.8 Ben Greear <greearb at candelatech.com>
All bugs added by David S. Miller <davem at redhat.com>
Initializing software serial port version 1
 /dev/ubd/disc0: unknown partition table
Initializing stdio console driver

patched login: root


BusyBox v1.00 (2004.11.20-15:13+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

patched:~ # ls -l /dev/log
ls: /dev/log: No such file or directory
patched:~ # cp /etc/devfsd.conf.orig /etc/devfsd.conf
patched:~ # ls -l /etc/devfsd.conf
-r--r-----    1 root     root         6836 Nov 20 11:22 /etc/devfsd.conf
patched:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
patched:~ #
patched:~ #
patched:~ #
patched:~ # killall devfsd
patched:~ # rm /etc/devfsd.conf
patched:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
devfsd: read config file: /etc/devfsd.conf: No such file or directory
patched:~ #
patched:~ #
patched:~ #
patched:~ # killall devfsd
killall: devfsd: no process killed
patched:~ # ln -s devfsd.conf /etc/devfsd.conf
patched:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
devfsd: read config file: /etc/devfsd.conf: No such file or directory
patched:~ #
patched:~ #
patched:~ #
patched:~ # killall devfsd
killall: devfsd: no process killed
patched:~ # rm /etc/devfsd.conf
patched:~ # cp /etc/devfsd.conf.orig /etc/devfsd.conf
patched:~ # /sbin/syslogd
patched:~ # /sbin/klogd
patched:~ # ls -l /dev/log
srw-rw-rw-    1 root     root            0 Nov 20 11:24 /dev/log
patched:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
patched:~ # tail /var/log/messages | grep devfsd
patched:~ #
patched:~ #
patched:~ #
patched:~ # killall devfsd
patched:~ # rm /etc/devfsd.conf
patched:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
patched:~ # tail /var/log/messages | grep devfsd
Nov 20 11:25:49 patched kern.err devfsd: read config file: /etc/devfsd.conf: No such file or directory
patched:~ # halt
patched:~ #
-------------- next part --------------
Checking for /proc/mm...found
Checking for the skas3 patch in the host...found
Checking PROT_EXEC mmap in /tmp...OK
Linux version 2.6.9-1-um-20041117-1 (alydar at swale) (gcc version 3.3.5 (Debian 1:3.3.5-2)) #1 Wed Nov 17 03:20:45 EST 2004
Built 1 zonelists
Kernel command line: mem=64M ubd0=uml.fs con=null con0=null,fd:2 con1=fd:0,fd:1 devfs=mount root=98:0
PID hash table entries: 512 (order: 9, 8192 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 59360k available
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Checking for host processor cmov support...Yes
Checking for host processor xmm support...No
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
Checking for /dev/anon on the host...Not available (open failed with errno 2)
NET: Registered protocol family 16
mconsole (version 2) initialized on /home/alydar/.uml/BAXqig/mconsole
ubd: Synchronous mode
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
devfs: 2004-01-31 Richard Gooch (rgooch at atnf.csiro.au)
devfs: boot_options: 0x1
Installing knfsd (copyright (C) 1996 okir at monad.swb.de).
SGI XFS with ACLs, security attributes, no debug enabled
SGI XFS Quota Management subsystem
Initializing Cryptographic API
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
Using anticipatory io scheduler
nbd: registered device at major 43
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256) (6 bit encapsulation enabled).
CSLIP: code copyright 1989 Regents of the University of California.
SLIP linefill/keepalive option.
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
IPv4 over IPv4 tunneling driver
ip_conntrack version 2.1 (464 buckets, 3712 max) - 300 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
ipt_recent v0.3.1: Stephen Frost <sfrost at snowman.net>.  http://snowman.net/projects/ipt_recent/
arp_tables: (C) 2002 David S. Miller
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
Bridge firewalling registered
Ebtables v2.0 registered
802.1Q VLAN Support v1.8 Ben Greear <greearb at candelatech.com>
All bugs added by David S. Miller <davem at redhat.com>
Initializing software serial port version 1
 /dev/ubd/disc0: unknown partition table
Initializing stdio console driver

errnosave login: root


BusyBox v1.00 (2004.11.20-17:21+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

errnosave:~ # ls -l /dev/log
ls: /dev/log: No such file or directory
errnosave:~ # cp /etc/devfsd.conf.orig /etc/devfsd.conf
errnosave:~ # ls -l /etc/devfsd.conf
-r--r-----    1 root     root         6836 Nov 20 13:18 /etc/devfsd.conf
errnosave:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
devfsd: read config file: /etc/devfsd.conf: Success
errnosave:~ #
errnosave:~ #
errnosave:~ #
errnosave:~ # killall devfsd
errnosave:~ # rm /etc/devfsd.conf
errnosave:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
devfsd: read config file: /etc/devfsd.conf: No such file or directory
errnosave:~ #
errnosave:~ #
errnosave:~ #
errnosave:~ # killall devfsd
killall: devfsd: no process killed
errnosave:~ # ln -s devfsd.conf /etc/devfsd.conf
errnosave:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
devfsd: read config file: /etc/devfsd.conf: Too many levels of symbolic links
errnosave:~ #
errnosave:~ #
errnosave:~ #
errnosave:~ # killall devfsd
errnosave:~ # rm /etc/devfsd.conf
errnosave:~ # cp /etc/devfsd.conf.orig /etc/devfsd.conf
errnosave:~ # /sbin/syslogd
errnosave:~ # /sbin/klogd
errnosave:~ # ls -l /dev/log
srw-rw-rw-    1 root     root            0 Nov 20 13:21 /dev/log
errnosave:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
errnosave:~ # tail /var/log/messages | grep devfsd
Nov 20 13:21:29 errnosave kern.err devfsd: read config file: /etc/devfsd.conf: Success
errnosave:~ #
errnosave:~ #
errnosave:~ #
errnosave:~ # killall devfsd
errnosave:~ # rm /etc/devfsd.conf
errnosave:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
errnosave:~ # tail /var/log/messages | grep devfsd
Nov 20 13:21:29 errnosave kern.err devfsd: read config file: /etc/devfsd.conf: Success
Nov 20 13:22:17 errnosave kern.err devfsd: read config file: /etc/devfsd.conf: No such file or directory
errnosave:~ # halt
errnosave:~ #
-------------- next part --------------
Checking for /proc/mm...found
Checking for the skas3 patch in the host...found
Checking PROT_EXEC mmap in /tmp...OK
Linux version 2.6.9-1-um-20041117-1 (alydar at swale) (gcc version 3.3.5 (Debian 1:3.3.5-2)) #1 Wed Nov 17 03:20:45 EST 2004
Built 1 zonelists
Kernel command line: mem=64M ubd0=uml.fs con=null con0=null,fd:2 con1=fd:0,fd:1 devfs=mount root=98:0
PID hash table entries: 512 (order: 9, 8192 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 59360k available
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Checking for host processor cmov support...Yes
Checking for host processor xmm support...No
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
Checking for /dev/anon on the host...Not available (open failed with errno 2)
NET: Registered protocol family 16
mconsole (version 2) initialized on /home/alydar/.uml/ijGPVH/mconsole
ubd: Synchronous mode
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
devfs: 2004-01-31 Richard Gooch (rgooch at atnf.csiro.au)
devfs: boot_options: 0x1
Installing knfsd (copyright (C) 1996 okir at monad.swb.de).
SGI XFS with ACLs, security attributes, no debug enabled
SGI XFS Quota Management subsystem
Initializing Cryptographic API
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
Using anticipatory io scheduler
nbd: registered device at major 43
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256) (6 bit encapsulation enabled).
CSLIP: code copyright 1989 Regents of the University of California.
SLIP linefill/keepalive option.
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
IPv4 over IPv4 tunneling driver
ip_conntrack version 2.1 (464 buckets, 3712 max) - 300 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
ipt_recent v0.3.1: Stephen Frost <sfrost at snowman.net>.  http://snowman.net/projects/ipt_recent/
arp_tables: (C) 2002 David S. Miller
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
Bridge firewalling registered
Ebtables v2.0 registered
802.1Q VLAN Support v1.8 Ben Greear <greearb at candelatech.com>
All bugs added by David S. Miller <davem at redhat.com>
Initializing software serial port version 1
 /dev/ubd/disc0: unknown partition table
Initializing stdio console driver

original login: root


BusyBox v1.00 (2004.11.20-15:42+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

original:~ # ls -l /dev/log
ls: /dev/log: No such file or directory
original:~ # cp /etc/devfsd.conf.orig /etc/devfsd.conf
original:~ # ls -l /etc/devfsd.conf
-r--r-----    1 root     root         6836 Nov 20 11:07 /etc/devfsd.conf
original:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
devfsd: read config file: /etc/devfsd.conf: No such file or directory
original:~ #
original:~ #
original:~ #
original:~ # killall devfsd
original:~ # rm /etc/devfsd.conf
original:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
devfsd: read config file: /etc/devfsd.conf: No such file or directory
original:~ #
original:~ #
original:~ #
original:~ # killall devfsd
killall: devfsd: no process killed
original:~ # ln -s devfsd.conf /etc/devfsd.conf
original:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
devfsd: read config file: /etc/devfsd.conf: No such file or directory
original:~ #
original:~ #
original:~ #
original:~ # killall devfsd
killall: devfsd: no process killed
original:~ # rm /etc/devfsd.conf
original:~ # cp /etc/devfsd.conf.orig /etc/devfsd.conf
original:~ # /sbin/syslogd
original:~ # /sbin/klogd
original:~ # ls -l /dev/log
srw-rw-rw-    1 root     root            0 Nov 20 11:09 /dev/log
original:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
original:~ # tail /var/log/messages | grep devfsd
Nov 20 11:10:10 original kern.err devfsd: read config file: /etc/devfsd.conf: Success
original:~ #
original:~ #
original:~ #
original:~ # killall devfsd
original:~ # rm /etc/devfsd.conf
original:~ # /sbin/devfsd /dev
devfsd v1.3.25  started for /dev
original:~ # tail /var/log/messages | grep devfsd
Nov 20 11:10:10 original kern.err devfsd: read config file: /etc/devfsd.conf: Success
Nov 20 11:10:52 original kern.err devfsd: read config file: /etc/devfsd.conf: No such file or directory
original:~ # halt
original:~ #


More information about the busybox mailing list