<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Calling things by the same name</title>
	<atom:link href="http://www.netsplit.com/2008/08/28/calling-things-by-the-same-name/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.netsplit.com/2008/08/28/calling-things-by-the-same-name/</link>
	<description></description>
	<pubDate>Tue, 06 Jan 2009 14:18:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Alexander E. Patrakov</title>
		<link>http://www.netsplit.com/2008/08/28/calling-things-by-the-same-name/comment-page-1/#comment-1057</link>
		<dc:creator>Alexander E. Patrakov</dc:creator>
		<pubDate>Fri, 29 Aug 2008 02:48:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.netsplit.com/?p=177#comment-1057</guid>
		<description>The "device in sysfs" thingy has been already considered before and rejected on the following basis. What should be the permissions and ownership of the device node?

I.e., udev combines major+minor+name information from the kernel with the permissions policy (i.e., the thing that should not be in the kernel) expressed in its rules. In yet other words, the kernel doesn't have enough information to create a device node in sysfs.</description>
		<content:encoded><![CDATA[<p>The &#8220;device in sysfs&#8221; thingy has been already considered before and rejected on the following basis. What should be the permissions and ownership of the device node?</p>
<p>I.e., udev combines major+minor+name information from the kernel with the permissions policy (i.e., the thing that should not be in the kernel) expressed in its rules. In yet other words, the kernel doesn&#8217;t have enough information to create a device node in sysfs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davidz</title>
		<link>http://www.netsplit.com/2008/08/28/calling-things-by-the-same-name/comment-page-1/#comment-1053</link>
		<dc:creator>davidz</dc:creator>
		<pubDate>Thu, 28 Aug 2008 18:56:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.netsplit.com/?p=177#comment-1053</guid>
		<description>A couple of points

 - what apps really really *want* are stable device names,
   like /dev/disk/by-label/David-Zeuthens-iPod. They want
   to e.g. save this name in their config files etc. Or you
   want stable names in /etc/fstab or whatever.

 - stable names are somewhat expensive to compute (probing
   an fs for the fstype and fslabel; sending commands to a
   serial device to figure out what kind of modem it is etc.)
   and rely on both per-os, per-site and and per-machine policy.
   Also, user space driver frameworks wants to participate here,
   for example if I'm libgphoto2 or libmtp I want to somehow
   create /dev/mtp/Sansa_e200 -&#62; /dev/bus/usb/002/003

   Hence why it's good to put it in user space like we do now.

 - Permissions. Figuring out the permission of a device node
   may require pretty sophisticated user space components (like
   PolicyKit) and you really want to ensure the permissions are
   set before the device is announced to user space.

 - The raw device file name (e.g. /dev/sda) are simply not
   interesting; in fact it's a bug that so many people store
   it in config files etc. And that's all you'd get from having device
   nodes in sysfs.

   While devfs-ish schemes can be cute and all, there's just no
   reason to do it in kernel space. And, FWIW, remember the last
   time someone tried this in Linux? It was pretty much FAIL FAIL
   FAIL all over the map.

    [my personal opinion is that a minimal devfs would probably
     work and even make things a bit simpler. But you'd need
     stable names even in the initramfs anyway.]

 - also, sysfs expresses the physical by-connection hierarchy,
   it's most often don't what you want

 - note that some devices don't have file files; apps poke
   them via sysfs files already so at least parts of what
   you're proposing is working like this (e.g. PCI devices,
   I think libpciaccess mmaps files from sysfs)

 - also, for some devices you may need to send commands / firmware
   to them (for initialization) before you announce the device to
   the rest of the OS. Some usb devices (I think ezusb but maybe
   I got the name wrong) actually requires this; initially such
   devices pop up as a vendor-specific usb devices; then you load
   firmware onto them and then the device reboots (e.g. the usb
   device disappears from the host's POV) and then come back as a
   different usb device. So e.g. you need some way of expressing
   this and with udev it works just fine.
 
I hope this clarifies why udev is very useful as it does all this
today; I'm not exactly sure what part of the current udev you're
unhappy with and how you propose to solve all the problems above
by switching to a pure devfs (as you are suggesting) solution?</description>
		<content:encoded><![CDATA[<p>A couple of points</p>
<p> - what apps really really *want* are stable device names,<br />
   like /dev/disk/by-label/David-Zeuthens-iPod. They want<br />
   to e.g. save this name in their config files etc. Or you<br />
   want stable names in /etc/fstab or whatever.</p>
<p> - stable names are somewhat expensive to compute (probing<br />
   an fs for the fstype and fslabel; sending commands to a<br />
   serial device to figure out what kind of modem it is etc.)<br />
   and rely on both per-os, per-site and and per-machine policy.<br />
   Also, user space driver frameworks wants to participate here,<br />
   for example if I&#8217;m libgphoto2 or libmtp I want to somehow<br />
   create /dev/mtp/Sansa_e200 -&gt; /dev/bus/usb/002/003</p>
<p>   Hence why it&#8217;s good to put it in user space like we do now.</p>
<p> - Permissions. Figuring out the permission of a device node<br />
   may require pretty sophisticated user space components (like<br />
   PolicyKit) and you really want to ensure the permissions are<br />
   set before the device is announced to user space.</p>
<p> - The raw device file name (e.g. /dev/sda) are simply not<br />
   interesting; in fact it&#8217;s a bug that so many people store<br />
   it in config files etc. And that&#8217;s all you&#8217;d get from having device<br />
   nodes in sysfs.</p>
<p>   While devfs-ish schemes can be cute and all, there&#8217;s just no<br />
   reason to do it in kernel space. And, FWIW, remember the last<br />
   time someone tried this in Linux? It was pretty much FAIL FAIL<br />
   FAIL all over the map.</p>
<p>    [my personal opinion is that a minimal devfs would probably<br />
     work and even make things a bit simpler. But you'd need<br />
     stable names even in the initramfs anyway.]</p>
<p> - also, sysfs expresses the physical by-connection hierarchy,<br />
   it&#8217;s most often don&#8217;t what you want</p>
<p> - note that some devices don&#8217;t have file files; apps poke<br />
   them via sysfs files already so at least parts of what<br />
   you&#8217;re proposing is working like this (e.g. PCI devices,<br />
   I think libpciaccess mmaps files from sysfs)</p>
<p> - also, for some devices you may need to send commands / firmware<br />
   to them (for initialization) before you announce the device to<br />
   the rest of the OS. Some usb devices (I think ezusb but maybe<br />
   I got the name wrong) actually requires this; initially such<br />
   devices pop up as a vendor-specific usb devices; then you load<br />
   firmware onto them and then the device reboots (e.g. the usb<br />
   device disappears from the host&#8217;s POV) and then come back as a<br />
   different usb device. So e.g. you need some way of expressing<br />
   this and with udev it works just fine.</p>
<p>I hope this clarifies why udev is very useful as it does all this<br />
today; I&#8217;m not exactly sure what part of the current udev you&#8217;re<br />
unhappy with and how you propose to solve all the problems above<br />
by switching to a pure devfs (as you are suggesting) solution?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zack</title>
		<link>http://www.netsplit.com/2008/08/28/calling-things-by-the-same-name/comment-page-1/#comment-1052</link>
		<dc:creator>Zack</dc:creator>
		<pubDate>Thu, 28 Aug 2008 18:17:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.netsplit.com/?p=177#comment-1052</guid>
		<description>Doesn't this bring back the permissions problems that were (AFAIR) one of the biggest nails in devfs' coffin?  The kernel doesn't (and can't) know the correct permissions to apply to a new device node, and allowing them to exist for any time with the wrong permissions is a security hole?</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t this bring back the permissions problems that were (AFAIR) one of the biggest nails in devfs&#8217; coffin?  The kernel doesn&#8217;t (and can&#8217;t) know the correct permissions to apply to a new device node, and allowing them to exist for any time with the wrong permissions is a security hole?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.netsplit.com/2008/08/28/calling-things-by-the-same-name/comment-page-1/#comment-1047</link>
		<dc:creator>James</dc:creator>
		<pubDate>Thu, 28 Aug 2008 17:47:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.netsplit.com/?p=177#comment-1047</guid>
		<description>Oliver: one device file, and a symlink to a device file. It seems a lot like the way Solaris devices work, although device names are a lot more persistent under Solaris. Don't make /dev/null a symlink to /devices/pseudo/mm@0:null though.</description>
		<content:encoded><![CDATA[<p>Oliver: one device file, and a symlink to a device file. It seems a lot like the way Solaris devices work, although device names are a lot more persistent under Solaris. Don&#8217;t make /dev/null a symlink to /devices/pseudo/mm@0:null though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Havoc</title>
		<link>http://www.netsplit.com/2008/08/28/calling-things-by-the-same-name/comment-page-1/#comment-1046</link>
		<dc:creator>Havoc</dc:creator>
		<pubDate>Thu, 28 Aug 2008 17:22:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.netsplit.com/?p=177#comment-1046</guid>
		<description>As I put it on http://ometer.com/hardware.html 5 years ago,

2. Creating and maintaining /dev files - As long as this is suitably buried beneath the hardware abstraction library, it's fairly irrelevant to desktop application developers how it works. Anything that works is great.</description>
		<content:encoded><![CDATA[<p>As I put it on <a href="http://ometer.com/hardware.html" rel="nofollow">http://ometer.com/hardware.html</a> 5 years ago,</p>
<p>2. Creating and maintaining /dev files - As long as this is suitably buried beneath the hardware abstraction library, it&#8217;s fairly irrelevant to desktop application developers how it works. Anything that works is great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rui</title>
		<link>http://www.netsplit.com/2008/08/28/calling-things-by-the-same-name/comment-page-1/#comment-1045</link>
		<dc:creator>Rui</dc:creator>
		<pubDate>Thu, 28 Aug 2008 16:17:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.netsplit.com/?p=177#comment-1045</guid>
		<description>@oliver
AFAIU no, there wouldn't be 2 device files since the ones in /dev are *symlinks* created by udev for the benefit of legacy apps.</description>
		<content:encoded><![CDATA[<p>@oliver<br />
AFAIU no, there wouldn&#8217;t be 2 device files since the ones in /dev are *symlinks* created by udev for the benefit of legacy apps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: regala</title>
		<link>http://www.netsplit.com/2008/08/28/calling-things-by-the-same-name/comment-page-1/#comment-1044</link>
		<dc:creator>regala</dc:creator>
		<pubDate>Thu, 28 Aug 2008 15:56:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.netsplit.com/?p=177#comment-1044</guid>
		<description>And it would just mean put "devfs feature set" into sysfs, wouldn't it ? I think kernel hackers already redeemed themselves from using devfs, and they stated quite strongly devfs feature set in kernel space (actually creating device nodes in kernel space for example) is racy, messy and hacky.</description>
		<content:encoded><![CDATA[<p>And it would just mean put &#8220;devfs feature set&#8221; into sysfs, wouldn&#8217;t it ? I think kernel hackers already redeemed themselves from using devfs, and they stated quite strongly devfs feature set in kernel space (actually creating device nodes in kernel space for example) is racy, messy and hacky.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oliver</title>
		<link>http://www.netsplit.com/2008/08/28/calling-things-by-the-same-name/comment-page-1/#comment-1043</link>
		<dc:creator>oliver</dc:creator>
		<pubDate>Thu, 28 Aug 2008 14:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.netsplit.com/?p=177#comment-1043</guid>
		<description>Hm, so what's the advantage of your idea? Udev will still be running, there will still be two names, and also there will be two device files then, no?</description>
		<content:encoded><![CDATA[<p>Hm, so what&#8217;s the advantage of your idea? Udev will still be running, there will still be two names, and also there will be two device files then, no?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
