Magic symlinks redux

Luigi Rizzo rizzo at iet.unipi.it
Fri Aug 22 19:34:22 UTC 2008


On Fri, Aug 22, 2008 at 12:40:19PM -0600, M. Warner Losh wrote:
> In message: <20080822162259.GA61694 at onelab2.iet.unipi.it>
>             Luigi Rizzo <rizzo at iet.unipi.it> writes:
> : Also, we do have a need to push tables of info in the kernel
> : (e.g. list of PCI/USB ids, quirks tables and the like),
> : maybe we can take this chance to make the varsym subsystem useful
> : also within device drivers ?
> 
> No.  what problem would this solve?

take e.g. uscanner (or several other devices, e.g. if_rl)
where the only way to tell whether a device
is supported or not is looking up a table of usb vendor/id
(the same happens for many pci devices). in the simple cases
you just need the id - a more complex one would use 

linux has a way (forget what the command name is) to add entries
to the table at runtime, whereas on freebsd
we need to patch&rebuild the module.

if make this 'object store' thing (varsym) able to store arrays we
could have device drivers scan the arrays (e.g.  uscanner_id or
if_rl_pciids etc.) to find out if it has a suitable string.

one objection that is frequently raised is that randomly adding ids
to a kernel table is a potential source of panics, but in the end,
to do this you need root access so you could as well rm -rf / and
make a similar if not worse damage.

	cheers
	luigi


More information about the freebsd-arch mailing list