Date: Fri, 22 Aug 2008 21:36:57 +0200 From: Luigi Rizzo <rizzo@iet.unipi.it> To: "M. Warner Losh" <imp@bsdimp.com> Cc: brooks@freebsd.org, ivoras@freebsd.org, brueffer@freebsd.org, freebsd-arch@freebsd.org Subject: Re: Magic symlinks redux Message-ID: <20080822193657.GB63527@onelab2.iet.unipi.it> In-Reply-To: <20080822.124019.-692152321.imp@bsdimp.com> References: <20080822154631.GA61495@onelab2.iet.unipi.it> <20080822155126.GD57443@lor.one-eyed-alien.net> <20080822162259.GA61694@onelab2.iet.unipi.it> <20080822.124019.-692152321.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 22, 2008 at 12:40:19PM -0600, M. Warner Losh wrote: > In message: <20080822162259.GA61694@onelab2.iet.unipi.it> > Luigi Rizzo <rizzo@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080822193657.GB63527>