From: ebiederm@xmission.com (Eric W. Biederman)
To: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>, Greg KH <gregkh@suse.de>,
Johannes Berg <johannes@sipsolutions.net>,
Andrew Morton <akpm@linux-foundation.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
"Maciej W. Rozycki" <macro@linux-mips.org>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] Driver-core: Fix bluetooth network device rename regression
Date: Tue, 27 Jul 2010 11:17:31 -0700 [thread overview]
Message-ID: <m14ofkiybo.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20100727134904.GA4994@kroah.com> (Greg KH's message of "Tue\, 27 Jul 2010 06\:49\:04 -0700")
Greg KH <greg@kroah.com> writes:
> On Tue, Jul 27, 2010 at 11:10:26AM +0200, Kay Sievers wrote:
>> On Mon, Jul 26, 2010 at 20:09, Greg KH <greg@kroah.com> wrote:
>> >> Does this version of the change look less bleh worthy? The effect is
>> >> the same as my previous patch but the test is more abstract so the
>> >> effect is not strictly limited to /sys/class/net.
>> >
>> > What other class type has a namespace at this point in time?
>> > Essentially this is the same exact thing, just in a different format
>> > that obfuscates what you are really doing here.
>>
>> The patch still looks broken, and does not belong into the core the
>> way it is done. We denied hacks like this for good reason. But
>> out-of-the-blue it was a bluetooth naming regression to fix in the
>> driver core? Interesting!
This is hardly out of the blue. I reported a problem 3 years ago
which is one of the reasons we have the class directories in the
first place.
What is different is simply that it was noticed that there were
cases the existing heuristic in get_device_parent did not catch.
Any class that has sysfs namespace support requires the class directory.
Which means that the test !dev->class->ns_type is exactly the right
test to avoid the magic exception in get_device_parent.
>> If someone is going to add namespaces to 'block' or 'input', the sysfs
>> layout will break, and userspace will be unable to handle the
>> resulting changes.
Yes. We don't even have a namespace that we can put those in, so worrying
about namespaces other than the network namespace or the user namespace
is looking much too far into the future.
What is in the near term is wireless phys getting network namespace support
in sysfs, and in practice the exact same issues apply.
> When that happens, I'm sure Eric will be willing to fix up any problems
> that are found as he is the one that insisted on pushing it to Linus
> around our objections.
>
> Right Eric?
Yes. I certainly will. The point of the namespace support in sysfs
is to keep these things invisible to userspace. If something is visible
it is generally a bug.
> And Eric, where are you working on the "real" patches to solve the
> problems of the bnet and wireless driver problems so we can remove this
> check from the driver core as soon as possible? Any idea when they will
> be done?
I looked at that, and it is arguable in the mac80211_hwsim case as that
is just a simulation for testing the infrastructure for wireless developers
as best as I understand it. The more a simulation differs from reality
the more it matters.
For bluetooth drivers or for any other existing subsystem replacing a class
device with a bus device is totally inappropriate.
Let me say this again clearly.
class -> bus BROKEN
In the case of bluetooth it would require changing /sys/class/bluetooth
to /sys/bus/bluetooth. Which is user visible in the worst possible
way and quick google search confirmed it will break user space scripts.
So as much as I sympathize with the position that buses have a better
layout than classes, after having examined the issue I completely oppose
changing one into the other with our current code base.
So for the medium term I think we are fine.
For the long term moving the driver core from a mandatory policy of
sysfs device node creation, to a default library for sysfs device node
creation that can be overridden in whole or in part on a subsystem by
subsystem basis looks like the right way to go. Based on my
experience with sysfs this is likely to be a multi-year project, and
one I'm uncertain how motivated I am to tackle.
Eric
next prev parent reply other threads:[~2010-07-27 18:17 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-16257-10286@https.bugzilla.kernel.org/>
[not found] ` <20100621150826.762ac9f2.akpm@linux-foundation.org>
2010-06-21 22:22 ` [Bugme-new] [Bug 16257] New: sysfs changes break hwsim and bnep drivers Eric W. Biederman
2010-06-21 22:29 ` Greg KH
2010-06-21 22:55 ` Eric W. Biederman
2010-06-21 23:10 ` Greg KH
2010-06-22 0:05 ` Eric W. Biederman
2010-06-22 3:56 ` Greg KH
2010-07-08 16:31 ` [PATCH] sysfs: Don't allow the creation of symlinks we can't remove Eric W. Biederman
2010-07-08 16:37 ` [RFC][PATCH] mac80211_hwsim: No parent is better than an illegimate one Eric W. Biederman
2010-07-12 6:46 ` Johannes Berg
2010-07-12 14:23 ` Eric W. Biederman
2010-07-12 14:29 ` Johannes Berg
2010-07-08 21:19 ` [PATCH] sysfs: Don't allow the creation of symlinks we can't remove Greg KH
2010-07-08 22:28 ` Eric W. Biederman
2010-07-08 23:06 ` Greg KH
2010-07-19 20:34 ` Andrew Morton
2010-07-20 20:13 ` Greg KH
2010-07-21 5:08 ` [PATCH 0/2] Support untagged symlinks to tagged directories Eric W. Biederman
2010-07-21 5:10 ` [PATCH 1/2] sysfs: sysfs_delete_link handle symlinks from untagged " Eric W. Biederman
2010-07-21 5:12 ` [PATCH 2/2] sysfs: allow creating " Eric W. Biederman
2010-07-21 19:02 ` [PATCH 0/2] Support untagged symlinks " Greg KH
2010-07-21 20:20 ` Eric W. Biederman
2010-07-21 20:36 ` Greg KH
2010-07-22 9:16 ` [PATCH] Driver-core: Fix bluetooth network device rename regression Eric W. Biederman
2010-07-22 13:38 ` Kay Sievers
2010-07-22 14:10 ` Johannes Berg
2010-07-22 15:30 ` Kay Sievers
2010-07-22 17:18 ` Eric W. Biederman
2010-07-22 17:44 ` Kay Sievers
2010-07-22 18:20 ` Johannes Berg
2010-07-22 18:28 ` Greg KH
2010-07-22 18:36 ` Johannes Berg
2010-07-22 18:54 ` Greg KH
2010-07-23 1:31 ` Eric W. Biederman
2010-07-26 18:09 ` Greg KH
2010-07-27 9:10 ` Kay Sievers
2010-07-27 13:49 ` Greg KH
2010-07-27 13:59 ` Johannes Berg
2010-07-27 15:09 ` Greg KH
2010-07-27 15:32 ` Kay Sievers
2010-07-27 18:17 ` Eric W. Biederman [this message]
2010-07-27 18:24 ` Kay Sievers
2010-07-27 18:36 ` Greg KH
2010-07-27 18:44 ` Eric W. Biederman
2010-07-27 18:54 ` Kay Sievers
2010-07-27 20:53 ` Eric W. Biederman
2010-07-28 4:41 ` Kay Sievers
2010-07-28 5:12 ` Eric W. Biederman
2010-07-28 5:26 ` Kay Sievers
2010-07-28 7:57 ` Eric W. Biederman
2010-07-25 5:43 ` [PATCH] Driver-core: Always create class directories for classses that support namespaces Eric W. Biederman
2010-07-26 18:07 ` Greg KH
2010-07-22 23:03 ` [PATCH] Driver-core: Fix bluetooth network device rename regression Kay Sievers
2010-07-10 22:30 ` [PATCH] sysfs: Don't allow the creation of symlinks we can't remove Maciej W. Rozycki
2010-07-22 9:54 ` Johannes Berg
2010-07-22 10:05 ` Eric W. Biederman
2010-07-22 10:10 ` Johannes Berg
2010-07-22 10:35 ` Eric W. Biederman
2010-07-22 10:41 ` Johannes Berg
2010-07-22 11:27 ` Eric W. Biederman
2010-07-22 11:30 ` Johannes Berg
2010-07-08 16:55 ` [Bugme-new] [Bug 16257] New: sysfs changes break hwsim and bnep drivers Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m14ofkiybo.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=greg@kroah.com \
--cc=gregkh@suse.de \
--cc=johannes@sipsolutions.net \
--cc=kay.sievers@vrfy.org \
--cc=macro@linux-mips.org \
--cc=netdev@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.