<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/fs/devfs/devfs_rule.c, branch release/8.2.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F8.2.0_cvs</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F8.2.0_cvs'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2011-02-16T16:18:46Z</updated>
<entry>
<title>Copy releng/8.2 to release/8.2.0 for 8.2-RELEASE.</title>
<updated>2011-02-16T16:18:46Z</updated>
<author>
<name>Ken Smith</name>
<email>kensmith@FreeBSD.org</email>
</author>
<published>2011-02-16T16:18:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=dec99dafe5763ba1db6950342aa80a634169c083'/>
<id>urn:sha1:dec99dafe5763ba1db6950342aa80a634169c083</id>
<content type='text'>
Approved by:	re (implicit)

This commit was manufactured to restore the state of the 8.2-RELEASE image.
</content>
</entry>
<entry>
<title>MFC r210923:</title>
<updated>2010-09-05T14:27:55Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2010-09-05T14:27:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=75799934fa9026fa7c918b89db67c33e0f584412'/>
<id>urn:sha1:75799934fa9026fa7c918b89db67c33e0f584412</id>
<content type='text'>
Add new make_dev_p(9) flag MAKEDEV_ETERNAL to inform devfs that created
cdev will never be destroyed. Propagate the flag to devfs vnodes as
VV_ETERNVALDEV. Use the flags to avoid acquiring devmtx and taking a
thread reference on such nodes.
</content>
</entry>
<entry>
<title>Get pointer to devfs_ruleset struct after garbage collection has been</title>
<updated>2008-06-22T14:34:38Z</updated>
<author>
<name>Oleksandr Tymoshenko</name>
<email>gonzo@FreeBSD.org</email>
</author>
<published>2008-06-22T14:34:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=2da528a74fd17355573de1365c381dd3bbff7573'/>
<id>urn:sha1:2da528a74fd17355573de1365c381dd3bbff7573</id>
<content type='text'>
performed. Otherwise if ruleset is used by given mountpoint and is empty
it's freed by devfs_ruleset_reap and pointer becomes bogus.

Submitted by:   Mateusz Guzik &lt;mjguzik@gmail.com&gt;
PR:             kern/124853
</content>
</entry>
<entry>
<title>Do not dereference cdev-&gt;si_cdevsw, use the dev_refthread() to properly</title>
<updated>2008-03-20T16:08:42Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2008-03-20T16:08:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=91a35e787094b1aca363bfd0ec8380d9a38ada53'/>
<id>urn:sha1:91a35e787094b1aca363bfd0ec8380d9a38ada53</id>
<content type='text'>
obtain the reference. In particular, this fixes the panic reported in
the PR. Remove the comments stating that this needs to be done.

PR:	kern/119422
MFC after:	1 week
</content>
</entry>
<entry>
<title>Sweep kernel replacing suser(9) calls with priv(9) calls, assigning</title>
<updated>2006-11-06T13:42:10Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2006-11-06T13:42:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=acd3428b7d3e94cef0e1881c868cb4b131d4ff41'/>
<id>urn:sha1:acd3428b7d3e94cef0e1881c868cb4b131d4ff41</id>
<content type='text'>
specific privilege names to a broad range of privileges.  These may
require some future tweaking.

Sponsored by:           nCircle Network Security, Inc.
Obtained from:          TrustedBSD Project
Discussed on:           arch@
Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri,
                        Alex Lyashkov &lt;umka at sevcity dot net&gt;,
                        Skip Ford &lt;skip dot ford at verizon dot net&gt;,
                        Antoine Brodin &lt;antoine dot brodin at laposte dot net&gt;
</content>
</entry>
<entry>
<title>Remove the NDEVFSINO and NDEVFSOVERFLOW options which no longer exists in</title>
<updated>2006-07-17T09:07:02Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2006-07-17T09:07:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=9c499ad92f03f9ffbbe9d2e437f3186371ca9416'/>
<id>urn:sha1:9c499ad92f03f9ffbbe9d2e437f3186371ca9416</id>
<content type='text'>
DEVFS.

Remove the opt_devfs.h file now that it is empty.
</content>
</entry>
<entry>
<title>When returning EIO from DEVFSIO_RADD ioctl, drop the exclusive rule</title>
<updated>2006-01-03T09:49:10Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2006-01-03T09:49:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=8f0d99d7907aab7e2502b08623a9180fac59edad'/>
<id>urn:sha1:8f0d99d7907aab7e2502b08623a9180fac59edad</id>
<content type='text'>
lock.  Otherwise the system comes to a rather sudden and grinding
halt.

MFC after:	1 week
</content>
</entry>
<entry>
<title>Make rule zero really magical, that way we don't have to do anything</title>
<updated>2005-09-24T07:03:09Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2005-09-24T07:03:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e515ee7832ecf83cb055ae9dc726cd3d28b2f4e7'/>
<id>urn:sha1:e515ee7832ecf83cb055ae9dc726cd3d28b2f4e7</id>
<content type='text'>
when we mount and get zero cost if no rules are used in a mountpoint.

Add code to deref rules on unmount.

Switch from SLIST to TAILQ.

Drop SYSINIT, use SX_SYSINIT and static initializer of TAILQ instead.

Drop goto, a break will do.

Reduce double pointers to single pointers.

Combine reaping and destroying rulesets.

Avoid memory leaks in a some error cases.
</content>
</entry>
<entry>
<title>Rewamp DEVFS internals pretty severely [1].</title>
<updated>2005-09-19T19:56:48Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2005-09-19T19:56:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e606a3c63eac3b6c05817586cf2ecf8291011424'/>
<id>urn:sha1:e606a3c63eac3b6c05817586cf2ecf8291011424</id>
<content type='text'>
Give DEVFS a proper inode called struct cdev_priv.  It is important
to keep in mind that this "inode" is shared between all DEVFS
mountpoints, therefore it is protected by the global device mutex.

Link the cdev_priv's into a list, protected by the global device
mutex.  Keep track of each cdev_priv's state with a flag bit and
of references from mountpoints with a dedicated usecount.

Reap the benefits of much improved kernel memory allocator and the
generally better defined device driver APIs to get rid of the tables
of pointers + serial numbers, their overflow tables,  the atomics
to muck about in them and all the trouble that resulted in.

This makes RAM the only limit on how many devices we can have.

The cdev_priv is actually a super struct containing the normal cdev
as the "public" part, and therefore allocation and freeing has moved
to devfs_devs.c from kern_conf.c.

The overall responsibility is (to be) split such that kern/kern_conf.c
is the stuff that deals with drivers and struct cdev and fs/devfs
handles filesystems and struct cdev_priv and their private liason
exposed only in devfs_int.h.

Move the inode number from cdev to cdev_priv and allocate inode
numbers properly with unr.  Local dirents in the mountpoints
(directories, symlinks) allocate inodes from the same pool to
guarantee against overlaps.

Various other fields are going to migrate from cdev to cdev_priv
in the future in order to hide them.  A few fields may migrate
from devfs_dirent to cdev_priv as well.

Protect the DEVFS mountpoint with an sx lock instead of lockmgr,
this lock also protects the directory tree of the mountpoint.

Give each mountpoint a unique integer index, allocated with unr.
Use it into an array of devfs_dirent pointers in each cdev_priv.
Initially the array points to a single element also inside cdev_priv,
but as more devfs instances are mounted, the array is extended with
malloc(9) as necessary when the filesystem populates its directory
tree.

Retire the cdev alias lists, the cdev_priv now know about all the
relevant devfs_dirents (and their vnodes) and devfs_revoke() will
pick them up from there.  We still spelunk into other mountpoints
and fondle their data without 100% good locking.  It may make better
sense to vector the revoke event into the tty code and there do a
destroy_dev/make_dev on the tty's devices, but that's for further
study.

Lots of shuffling of stuff and churn of bits for no good reason[2].

XXX: There is still nothing preventing the dev_clone EVENTHANDLER
from being invoked at the same time in two devfs mountpoints.  It
is not obvious what the best course of action is here.

XXX: comment out an if statement that lost its body, until I can
find out what should go there so it doesn't do damage in the meantime.

XXX: Leave in a few extra malloc types and KASSERTS to help track
down any remaining issues.

Much testing provided by:		Kris
Much confusion caused by (races in):	md(4)

[1] You are not supposed to understand anything past this point.

[2] This line should simplify life for the peanut gallery.
</content>
</entry>
<entry>
<title>Protect the devfs rule internal global lists with a sx lock, the per</title>
<updated>2005-09-15T08:50:16Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2005-09-15T08:50:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=6556102dcbe1a336fb8cb2ce51148b6a19ec96ff'/>
<id>urn:sha1:6556102dcbe1a336fb8cb2ce51148b6a19ec96ff</id>
<content type='text'>
mount locks are not enough.  Finer granularity (x)locking could be
implemented, but I prefer to keep it simple for now.
</content>
</entry>
</feed>
