Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2006 11:12:59 GMT
From:      Andrew Hacking <ahacking@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/93423: Applying devfs rulset fails
Message-ID:  <200602161112.k1GBCxXh040804@www.freebsd.org>
Resent-Message-ID: <200602161120.k1GBKArT027964@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         93423
>Category:       kern
>Synopsis:       Applying devfs rulset fails
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 16 11:20:09 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Hacking
>Release:        6.0-RELEASE-p4
>Organization:
>Environment:
FreeBSD home.inet 6.0-RELEASE-p4 FreeBSD 6.0-RELEASE-p4 #1: Wed Feb 15 10:50:20 EST 2006     root@home.inet:/usr/obj/usr/src/sys/DELL4100  i386
>Description:
It is currently not possible (for me at least) to setup a secure jail by adding devfs rules. Also devfs commands can leave the system in a state where it is not possible to shutdown cleanly.

On attempting to setup devfs for a jail, the following devfs command fails:

# mount_devfs devfs /jail/foo/dev
# devfs -m /jail/foo/dev rule -s 4 applyset
devfs rule: ioctl DEVFSIO_SAPPLY: No such process

[Note: rule-set doesn't get applied]

Also, trying to apply rules manually hangs and never returns, leaving the process blocked in disk (D) wait state.

Shutting down the system also never completes and requires a power cycle and (at least for me) required manual fsck of most file-systems on reboot.

This could potentially be related to the problem described in:
    http://lists.freebsd.org/pipermail/freebsd-hackers/2006-January/015009.html

My revision of /usr/src/sys/fs/devfs_rule.c is:
  $FreeBSD: src/sys/fs/devfs/devfs_rule.c,v 1.14.2.2 2005/09/26 14:36:52 phk Exp $

I will try revision listed in above email and report back....

>How-To-Repeat:
# mkdir /tmp/foodev
# mount_devfs devfs /tmp/foodev
# devfs -m /tmp/foodev rule -s4 applyset
devfs rule: ioctl DEVFSIO_SAPPLY: No such process

[Note: rule-set doesn't get applied]

Now try adding rules manually to trigger process hang:
# devfs -m /tmp/foodev rule add hide
# devfs -m /tmp/foodev rule add path null unhide
.. etc ...
>Fix:
              
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602161112.k1GBCxXh040804>