2007-03-04 23:39:59

by Johannes Berg

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

[adding linux-wireless to CC]

On Sun, 2007-03-04 at 16:08 -0600, Matt Mackall wrote:
> Recent kernels are having troubles with wireless for me. Two seemingly
> related problems:

I don't think they are related actually.

> a) NetworkManager seems oblivious to the existence of my IPW2200

This is due to the recent sysfs restructuring I think. IIRC the fix is
to upgrade hal to a current git version.

> b) Manual iwconfig waits for 60s and then reports:

That one's strange.

> A second attempt to enable WEP via iwconfig succeeds and network
> connectivity is normal. However, NetworkManager still ignores the
> device at this point.

I'd think it's a ipw bug but I have no idea if that was even touched
during this time.

> Bisect with Mercurial points to this patch:
>
> $ hg bisect bad
> The first bad revision is:
> changeset: 46985:f701b96bb2f7
> user: Greg Kroah-Hartman <[email protected]>
> date: Wed Feb 07 10:37:11 2007 -0800
> summary: Network: convert network devices to use struct device
> instead of class_device
>
> which corresponds to 43cb76d91ee85f579a69d42bc8efc08bac560278 in git.

Yup, sysfs breakage/hal stuff. Can you try with a recent hal? And maybe
try to bisect the iwconfig stop thing if you've got enough time...

johannes


Attachments:
signature.asc (190.00 B)
This is a digitally signed message part

2007-03-05 18:59:03

by Greg KH

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

On Mon, Mar 05, 2007 at 07:59:50AM -0500, Theodore Tso wrote:
> On Sun, Mar 04, 2007 at 05:17:29PM -0800, Greg KH wrote:
> > I should not have broken any userspace if CONFIG_SYSFS_DEPRECATED is
> > enabled with that patch. If that is enabled, and that patch still
> > causes problems, please let me know.
>
> But we still need to update the help text for CONFIG_SYS_DEPRECATED to
> make it clear that its deprecation schedule still needs to be 2009 to
> 2011 (depending on whether we want to accomodate Debian's glacial
> release schedule). Certainly the 2006 date which is currently there
> simply isn't accurate.

Ok, how about the following patch. Is it acceptable to everyone?

thanks,

greg k-h

---
init/Kconfig | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

--- gregkh-2.6.orig/init/Kconfig
+++ gregkh-2.6/init/Kconfig
@@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
that belong to a class, back into the /sys/class heirachy, in
order to support older versions of udev.

- If you are using a distro that was released in 2006 or later,
- it should be safe to say N here.
+ If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
+ release from 2007 or later, it should be safe to say N here.
+
+ If you are using Debian or other distros that are slow to
+ update HAL, please say Y here.
+
+ If you have any problems with devices not being found properly
+ from userspace programs, and this option is disabled, say Y
+ here.
+
+ If you are unsure about this at all, say Y.

config RELAY
bool "Kernel->user space relay support (formerly relayfs)"

2007-03-05 01:05:07

by Adrian Bunk

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

On Sun, Mar 04, 2007 at 04:45:25PM -0800, Andrew Morton wrote:
> On Sun, 4 Mar 2007 18:25:50 -0600 Matt Mackall <[email protected]> wrote:
>
> > On Mon, Mar 05, 2007 at 12:39:24AM +0100, Johannes Berg wrote:
> > > [adding linux-wireless to CC]
> > >
> > > On Sun, 2007-03-04 at 16:08 -0600, Matt Mackall wrote:
> > > > Recent kernels are having troubles with wireless for me. Two seemingly
> > > > related problems:
> > >
> > > I don't think they are related actually.
> > >
> > > > a) NetworkManager seems oblivious to the existence of my IPW2200
> > >
> > > This is due to the recent sysfs restructuring I think. IIRC the fix is
> > > to upgrade hal to a current git version.
> >
> > If that's the cause, the fix is to back out whatever was done to break
> > userspace. Breaking userspace is not ok. Upgrading from 2.6.x to
> > 2.6.x+1 should not entail replacing substantial parts of userspace,
> > especially with NOT-EVEN-FRAKKING-RELEASED-YET CODE.
>
> yep. Adrian, I think we should track this as a blocking regression, at
> least until we've fully understood the implications and had the usual
> arguments.

I'm currently tracking it as one of the 31 2.6.21-rc regressions that
are not yet fixed in Linus' tree, and for me each of them is a blocker
until proven otherwise.

Whether Linus releases 2.6.21 despite blocking regressions is a
different question...

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed


2007-03-05 00:47:36

by Matt Mackall

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

On Mon, Mar 05, 2007 at 12:39:24AM +0100, Johannes Berg wrote:
> [adding linux-wireless to CC]
>
> On Sun, 2007-03-04 at 16:08 -0600, Matt Mackall wrote:
> > Recent kernels are having troubles with wireless for me. Two seemingly
> > related problems:
>
> I don't think they are related actually.
>
> > a) NetworkManager seems oblivious to the existence of my IPW2200
>
> This is due to the recent sysfs restructuring I think. IIRC the fix is
> to upgrade hal to a current git version.

If that's the cause, the fix is to back out whatever was done to break
userspace. Breaking userspace is not ok. Upgrading from 2.6.x to
2.6.x+1 should not entail replacing substantial parts of userspace,
especially with NOT-EVEN-FRAKKING-RELEASED-YET CODE.

I will try a new HAL when it shows up in Debian/unstable and not a
moment sooner.

> > b) Manual iwconfig waits for 60s and then reports:
>
> That one's strange.
>
> > A second attempt to enable WEP via iwconfig succeeds and network
> > connectivity is normal. However, NetworkManager still ignores the
> > device at this point.
>
> I'd think it's a ipw bug but I have no idea if that was even touched
> during this time.
>
> > Bisect with Mercurial points to this patch:
> >
> > $ hg bisect bad
> > The first bad revision is:
> > changeset: 46985:f701b96bb2f7
> > user: Greg Kroah-Hartman <[email protected]>
> > date: Wed Feb 07 10:37:11 2007 -0800
> > summary: Network: convert network devices to use struct device
> > instead of class_device
> >
> > which corresponds to 43cb76d91ee85f579a69d42bc8efc08bac560278 in git.
>
> Yup, sysfs breakage/hal stuff. Can you try with a recent hal? And maybe
> try to bisect the iwconfig stop thing if you've got enough time...

Will double-check the iwconfig tests. It's been masked by
NetworkManager for a while.

--
Mathematics is the supreme nostalgia of our time.

2007-03-06 06:23:10

by Matt Mackall

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Mon, Mar 05, 2007 at 08:03:50PM -0800, Greg KH wrote:
> On Mon, Mar 05, 2007 at 09:39:47PM -0600, Matt Mackall wrote:
> > On Mon, Mar 05, 2007 at 06:48:50PM -0800, Greg KH wrote:
> > > If so, can you disable the option and strace it to see what program is
> > > trying to access what? That will put the
> > > HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
> > > quickly :)
> >
> > Ok, I've got straces of both good and bad (>5M each). Filtered out
> > random pointer values and the like, diffed, and filtered for /sys/,
> > and the result's still 1.5M. What should I be looking for?
>
> Failures when trying to read from /sys/class/net/
>
> Or opening the directory and iterating over the subdirs in there. Or
> something like that.
>
> But the /sys/class/net/ stuff should hopefully help narrow it down.

Works:

6857 open("/sys/class/net",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 13
6857 fstat64(13, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
6857 fcntl64(13, F_SETFD, FD_CLOEXEC) = 0
6857 getdents64(13, /* 5 entries */, 4096) = 120
6857 readlink("/sys/class/net/eth1", 0x80a2450, 256) = -1 EINVAL
(Invalid argument)
6857 readlink("/sys/class/net/eth1/device",
"../../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0", 256) = 53
6857 readlink("/sys/class/net/lo", 0x80a2450, 256) = -1 EINVAL
(Invalid argument)
6857 readlink("/sys/class/net/lo/device", 0x80a2450, 256) = -1 ENOENT
(No such
file or directory)
6857 readlink("/sys/class/net/eth0", 0x80a2450, 256) = -1 EINVAL
(Invalid argument)
6857 readlink("/sys/class/net/eth0/device",
"../../../devices/pci0000:00/0000:00:1e.0/0000:02:01.0", 256) = 53
6857 getdents64(13, /* 0 entries */, 4096) = 0
6857 close(13) = 0

Breaks:

3620 open("/sys/class/net",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 13
3620 fstat64(13, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
3620 fcntl64(13, F_SETFD, FD_CLOEXEC) = 0
3620 getdents64(13, /* 5 entries */, 4096) = 120
3620 readlink("/sys/class/net/eth1",
"../../devices/pci0000:00/0000:00:1e.0/00\00:02:02.0/eth1", 256) = 55
3620
readlink("/sys/devices/pci0000:00/0000:00:1e.0/0000:02:02.0/eth1/device",
0x809e910, 256) = -1 ENOENT (No such file or directory)
3620 readlink("/sys/class/net/lo", "../../devices/virtual/net/lo",
256) = 28
3620 readlink("/sys/devices/virtual/net/lo/device", 0x809e960, 256) =
-1 ENOEN\T (No such file or directory)
3620 readlink("/sys/class/net/eth0",
"../../devices/pci0000:00/0000:00:1e.0/00\00:02:01.0/eth0", 256) = 55
3620
readlink("/sys/devices/pci0000:00/0000:00:1e.0/0000:02:01.0/eth0/device",
0x809e960, 256) = -1 ENOENT (No such file or directory)
3620 getdents64(13, /* 0 entries */, 4096) = 0
3620 close(13) = 0

--
Mathematics is the supreme nostalgia of our time.

2007-03-06 00:09:04

by Greg KH

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> >
> > Ok, how about the following patch. Is it acceptable to everyone?
> >
> > thanks,
> >
> > greg k-h
> >
> > ---
> > init/Kconfig | 13 +++++++++++--
> > 1 file changed, 11 insertions(+), 2 deletions(-)
> >
> > --- gregkh-2.6.orig/init/Kconfig
> > +++ gregkh-2.6/init/Kconfig
> > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > that belong to a class, back into the /sys/class heirachy, in
> > order to support older versions of udev.
> >
> > - If you are using a distro that was released in 2006 or later,
> > - it should be safe to say N here.
> > + If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > + release from 2007 or later, it should be safe to say N here.
> > +
> > + If you are using Debian or other distros that are slow to
> > + update HAL, please say Y here.
> >...
>
> The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally
> for all users, and schedule it's removal for mid-2008 (or later).
>
> 12 months after the first _release_ of a HAL that can live without seems
> to be the first time when we can consider getting rid of it, since all
> distributions with at least one release a year should ship it by then.
>
> Currently, SYSFS_DEPRECATED is only a trap for users.

Huh?

No, again, I've been using this just fine for about 6 months now.

And what about all of the servers not using HAL/NetworkManager?
And what about all of the embedded systems not using either?

So to not allow this to be turned off by people who might want to (we
want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
other distros released this year), is pretty heavy-handed.

It also will work in OpenSuSE 10.2 which is already released, and I
think Fedora 6, but I've only limited experience with these.

Oh, and Gentoo works just fine, and has been for the past 6 months.

I would just prefer to come up with an acceptable set of wording that
will work to properly warn people.

I proposed one such wording which some people took as a slam against
Debian, which it really was not at all.

Does someone else want to propose some other wording instead?

thanks,

greg k-h

2007-03-06 13:21:53

by Johannes Berg

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Mon, 2007-03-05 at 17:56 -0800, Greg KH wrote:

> Theory F: It broke because you are using NetworkManager for your
> network devices and the patches that fix this have not made it into a
> real release?
>
> I'm just guessing, but does anyone who is having this problem, NOT using
> NetworkManager?
>
> I'm running an old version of HAL just fine, but I'm not using
> NetworkManager here.

Greg, HAL itself isn't the problem. The problem is that older versions
of HAL ignore all network devices when this option is not set and thus
network manager can't pick them up.

johannes


Attachments:
signature.asc (190.00 B)
This is a digitally signed message part

2007-03-06 19:03:08

by Greg KH

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Tue, Mar 06, 2007 at 12:10:09AM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 08:03:50PM -0800, Greg KH wrote:
> > On Mon, Mar 05, 2007 at 09:39:47PM -0600, Matt Mackall wrote:
> > > On Mon, Mar 05, 2007 at 06:48:50PM -0800, Greg KH wrote:
> > > > If so, can you disable the option and strace it to see what program is
> > > > trying to access what? That will put the
> > > > HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
> > > > quickly :)
> > >
> > > Ok, I've got straces of both good and bad (>5M each). Filtered out
> > > random pointer values and the like, diffed, and filtered for /sys/,
> > > and the result's still 1.5M. What should I be looking for?
> >
> > Failures when trying to read from /sys/class/net/
> >
> > Or opening the directory and iterating over the subdirs in there. Or
> > something like that.
> >
> > But the /sys/class/net/ stuff should hopefully help narrow it down.
>
> Works:
>
> 6857 open("/sys/class/net",
> O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 13
> 6857 fstat64(13, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
> 6857 fcntl64(13, F_SETFD, FD_CLOEXEC) = 0
> 6857 getdents64(13, /* 5 entries */, 4096) = 120
> 6857 readlink("/sys/class/net/eth1", 0x80a2450, 256) = -1 EINVAL
> (Invalid argument)
> 6857 readlink("/sys/class/net/eth1/device",
> "../../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0", 256) = 53
> 6857 readlink("/sys/class/net/lo", 0x80a2450, 256) = -1 EINVAL
> (Invalid argument)
> 6857 readlink("/sys/class/net/lo/device", 0x80a2450, 256) = -1 ENOENT
> (No such
> file or directory)
> 6857 readlink("/sys/class/net/eth0", 0x80a2450, 256) = -1 EINVAL
> (Invalid argument)
> 6857 readlink("/sys/class/net/eth0/device",
> "../../../devices/pci0000:00/0000:00:1e.0/0000:02:01.0", 256) = 53
> 6857 getdents64(13, /* 0 entries */, 4096) = 0
> 6857 close(13) = 0
>
> Breaks:
>
> 3620 open("/sys/class/net",
> O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 13
> 3620 fstat64(13, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
> 3620 fcntl64(13, F_SETFD, FD_CLOEXEC) = 0
> 3620 getdents64(13, /* 5 entries */, 4096) = 120
> 3620 readlink("/sys/class/net/eth1",
> "../../devices/pci0000:00/0000:00:1e.0/00\00:02:02.0/eth1", 256) = 55
> 3620
> readlink("/sys/devices/pci0000:00/0000:00:1e.0/0000:02:02.0/eth1/device",
> 0x809e910, 256) = -1 ENOENT (No such file or directory)
> 3620 readlink("/sys/class/net/lo", "../../devices/virtual/net/lo",
> 256) = 28
> 3620 readlink("/sys/devices/virtual/net/lo/device", 0x809e960, 256) =
> -1 ENOEN\T (No such file or directory)
> 3620 readlink("/sys/class/net/eth0",
> "../../devices/pci0000:00/0000:00:1e.0/00\00:02:01.0/eth0", 256) = 55
> 3620
> readlink("/sys/devices/pci0000:00/0000:00:1e.0/0000:02:01.0/eth0/device",
> 0x809e960, 256) = -1 ENOENT (No such file or directory)
> 3620 getdents64(13, /* 0 entries */, 4096) = 0
> 3620 close(13) = 0

Ah, that should be simple to fix in the kernel, give me an hour or so...

thanks,

greg k-h

2007-03-05 13:00:09

by Theodore Ts'o

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

On Sun, Mar 04, 2007 at 05:17:29PM -0800, Greg KH wrote:
> I should not have broken any userspace if CONFIG_SYSFS_DEPRECATED is
> enabled with that patch. If that is enabled, and that patch still
> causes problems, please let me know.

But we still need to update the help text for CONFIG_SYS_DEPRECATED to
make it clear that its deprecation schedule still needs to be 2009 to
2011 (depending on whether we want to accomodate Debian's glacial
release schedule). Certainly the 2006 date which is currently there
simply isn't accurate.

- Ted

2007-03-05 22:40:50

by Greg KH

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

On Mon, Mar 05, 2007 at 01:55:30PM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > Ok, how about the following patch. Is it acceptable to everyone?
> >
> > - If you are using a distro that was released in 2006 or later,
> > - it should be safe to say N here.
> > + If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > + release from 2007 or later, it should be safe to say N here.
> > +
> > + If you are using Debian or other distros that are slow to
> > + update HAL, please say Y here.
>
> What HAL version do you think Debian ought to have, pray tell? And
> what the hell version do those other distros have?
>
> The last HAL release was 0.5.8 on 11-Sep-2006. It showed up in
> Debian/unstable on 2-Oct. There have been six Debian bugfix releases,
> the most recent on 12-Feb.
>
> http://people.freedesktop.org/~david/dist/
> http://packages.debian.org/changelogs/pool/main/h/hal/hal_0.5.8.1-6.1/changelog

Ok, I only named HAL as that is what people have told me the problem is.
I have been running this change on my boxs, without
CONFIG_SYSFS_DEPRECATED since last July or so.

But I don't use NetworkManager here for the most part, but I have tried
this in the OpenSuse10.3 alpha releases and it seems to work just fine
with whatever version of NetworkManager it uses.

So perhaps it's some wrapper scripts somewhere? I think SuSE had some
odd things hard coded somewhere that prevented 10.1 from working
properly with this change.

Ok, so I'll drop the HAL wording above, what should I say instead?

thanks,

greg k-h

2007-03-05 01:18:10

by Greg KH

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

On Sun, Mar 04, 2007 at 06:25:50PM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 12:39:24AM +0100, Johannes Berg wrote:
> > [adding linux-wireless to CC]
> >
> > On Sun, 2007-03-04 at 16:08 -0600, Matt Mackall wrote:
> > > Recent kernels are having troubles with wireless for me. Two seemingly
> > > related problems:
> >
> > I don't think they are related actually.
> >
> > > a) NetworkManager seems oblivious to the existence of my IPW2200
> >
> > This is due to the recent sysfs restructuring I think. IIRC the fix is
> > to upgrade hal to a current git version.
>
> If that's the cause, the fix is to back out whatever was done to break
> userspace. Breaking userspace is not ok. Upgrading from 2.6.x to
> 2.6.x+1 should not entail replacing substantial parts of userspace,
> especially with NOT-EVEN-FRAKKING-RELEASED-YET CODE.

I should not have broken any userspace if CONFIG_SYSFS_DEPRECATED is
enabled with that patch. If that is enabled, and that patch still
causes problems, please let me know.

thanks,

greg k-h

2007-03-05 00:48:52

by Andrew Morton

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

On Sun, 4 Mar 2007 18:25:50 -0600 Matt Mackall <[email protected]> wrote:

> On Mon, Mar 05, 2007 at 12:39:24AM +0100, Johannes Berg wrote:
> > [adding linux-wireless to CC]
> >
> > On Sun, 2007-03-04 at 16:08 -0600, Matt Mackall wrote:
> > > Recent kernels are having troubles with wireless for me. Two seemingly
> > > related problems:
> >
> > I don't think they are related actually.
> >
> > > a) NetworkManager seems oblivious to the existence of my IPW2200
> >
> > This is due to the recent sysfs restructuring I think. IIRC the fix is
> > to upgrade hal to a current git version.
>
> If that's the cause, the fix is to back out whatever was done to break
> userspace. Breaking userspace is not ok. Upgrading from 2.6.x to
> 2.6.x+1 should not entail replacing substantial parts of userspace,
> especially with NOT-EVEN-FRAKKING-RELEASED-YET CODE.

yep. Adrian, I think we should track this as a blocking regression, at
least until we've fully understood the implications and had the usual
arguments.

2007-03-06 01:44:25

by Matt Mackall

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Mon, Mar 05, 2007 at 04:07:22PM -0800, Greg KH wrote:
> On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> > On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > >
> > > Ok, how about the following patch. Is it acceptable to everyone?
> > >
> > > thanks,
> > >
> > > greg k-h
> > >
> > > ---
> > > init/Kconfig | 13 +++++++++++--
> > > 1 file changed, 11 insertions(+), 2 deletions(-)
> > >
> > > --- gregkh-2.6.orig/init/Kconfig
> > > +++ gregkh-2.6/init/Kconfig
> > > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > > that belong to a class, back into the /sys/class heirachy, in
> > > order to support older versions of udev.
> > >
> > > - If you are using a distro that was released in 2006 or later,
> > > - it should be safe to say N here.
> > > + If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > > + release from 2007 or later, it should be safe to say N here.
> > > +
> > > + If you are using Debian or other distros that are slow to
> > > + update HAL, please say Y here.
> > >...
> >
> > The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally
> > for all users, and schedule it's removal for mid-2008 (or later).
> >
> > 12 months after the first _release_ of a HAL that can live without seems
> > to be the first time when we can consider getting rid of it, since all
> > distributions with at least one release a year should ship it by then.
> >
> > Currently, SYSFS_DEPRECATED is only a trap for users.
>
> Huh?
>
> No, again, I've been using this just fine for about 6 months now.
>
> And what about all of the servers not using HAL/NetworkManager?
> And what about all of the embedded systems not using either?
>
> So to not allow this to be turned off by people who might want to (we
> want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
> other distros released this year), is pretty heavy-handed.
>
> It also will work in OpenSuSE 10.2 which is already released, and I
> think Fedora 6, but I've only limited experience with these.
>
> Oh, and Gentoo works just fine, and has been for the past 6 months.
>
> I would just prefer to come up with an acceptable set of wording that
> will work to properly warn people.
>
> I proposed one such wording which some people took as a slam against
> Debian, which it really was not at all.
>
> Does someone else want to propose some other wording instead?

Back up a bit. Let's review:

Problem: NetworkManager stopped working with my ipw2200 on Debian/unstable

Theory A: It broke because I'm not running an as-yet-unreleased HAL.

Then we should revert the patch pronto because it's an unqualified
regression.

Theory B: It broke because I'm not running relatively recent HAL.

By all accounts I'm running the latest and greatest HAL and Network
Manager, more than recent enough to work.

Theory C: It broke because I've got some goofy config.

My setup passes no arguments to either. The HAL config file is
completely bare-bones and there's no sign of any configuration files
for Network Manager.

Theory D: It broke for some nebulous Debian-related reason.

That's a bunch of unhelpful crap.

Can we come up with an actual theory for what's wrong with my setup, please?
Like, perhaps:

Theory E: There's some undiagnosed new breakage that this introduces
that no else hit until it went into mainline.

Hmmm, this one sounds more promising.

--
Mathematics is the supreme nostalgia of our time.

2007-03-06 04:05:38

by Greg KH

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Mon, Mar 05, 2007 at 09:39:47PM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 06:48:50PM -0800, Greg KH wrote:
> > If so, can you disable the option and strace it to see what program is
> > trying to access what? That will put the
> > HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
> > quickly :)
>
> Ok, I've got straces of both good and bad (>5M each). Filtered out
> random pointer values and the like, diffed, and filtered for /sys/,
> and the result's still 1.5M. What should I be looking for?

Failures when trying to read from /sys/class/net/

Or opening the directory and iterating over the subdirs in there. Or
something like that.

But the /sys/class/net/ stuff should hopefully help narrow it down.

thanks,

greg k-h

2007-03-06 03:17:59

by Matt Mackall

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Mon, Mar 05, 2007 at 06:48:50PM -0800, Greg KH wrote:

> Wait, have confirmed that if you enable this config option,
> NetworkManager starts back up again and works properly?

Yep, probably should have mentioned that.

> If so, can you disable the option and strace it to see what program is
> trying to access what? That will put the
> HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
> quickly :)

Did that a few hours ago, got a very large dump from both programs. No
smoking guns to my eye, but I'll send you the logs later.

--
Mathematics is the supreme nostalgia of our time.

2007-03-06 20:07:28

by Greg KH

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Tue, Mar 06, 2007 at 12:10:09AM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 08:03:50PM -0800, Greg KH wrote:
> > On Mon, Mar 05, 2007 at 09:39:47PM -0600, Matt Mackall wrote:
> > > On Mon, Mar 05, 2007 at 06:48:50PM -0800, Greg KH wrote:
> > > > If so, can you disable the option and strace it to see what program is
> > > > trying to access what? That will put the
> > > > HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
> > > > quickly :)
> > >
> > > Ok, I've got straces of both good and bad (>5M each). Filtered out
> > > random pointer values and the like, diffed, and filtered for /sys/,
> > > and the result's still 1.5M. What should I be looking for?
> >
> > Failures when trying to read from /sys/class/net/
> >
> > Or opening the directory and iterating over the subdirs in there. Or
> > something like that.
> >
> > But the /sys/class/net/ stuff should hopefully help narrow it down.
>
> Works:
>
> 6857 open("/sys/class/net",
> O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 13
> 6857 fstat64(13, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
> 6857 fcntl64(13, F_SETFD, FD_CLOEXEC) = 0
> 6857 getdents64(13, /* 5 entries */, 4096) = 120
> 6857 readlink("/sys/class/net/eth1", 0x80a2450, 256) = -1 EINVAL
> (Invalid argument)
> 6857 readlink("/sys/class/net/eth1/device",
> "../../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0", 256) = 53
> 6857 readlink("/sys/class/net/lo", 0x80a2450, 256) = -1 EINVAL
> (Invalid argument)
> 6857 readlink("/sys/class/net/lo/device", 0x80a2450, 256) = -1 ENOENT
> (No such
> file or directory)
> 6857 readlink("/sys/class/net/eth0", 0x80a2450, 256) = -1 EINVAL
> (Invalid argument)
> 6857 readlink("/sys/class/net/eth0/device",
> "../../../devices/pci0000:00/0000:00:1e.0/0000:02:01.0", 256) = 53
> 6857 getdents64(13, /* 0 entries */, 4096) = 0
> 6857 close(13) = 0
>
> Breaks:
>
> 3620 open("/sys/class/net",
> O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 13
> 3620 fstat64(13, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
> 3620 fcntl64(13, F_SETFD, FD_CLOEXEC) = 0
> 3620 getdents64(13, /* 5 entries */, 4096) = 120
> 3620 readlink("/sys/class/net/eth1",
> "../../devices/pci0000:00/0000:00:1e.0/00\00:02:02.0/eth1", 256) = 55
> 3620
> readlink("/sys/devices/pci0000:00/0000:00:1e.0/0000:02:02.0/eth1/device",
> 0x809e910, 256) = -1 ENOENT (No such file or directory)
> 3620 readlink("/sys/class/net/lo", "../../devices/virtual/net/lo",
> 256) = 28
> 3620 readlink("/sys/devices/virtual/net/lo/device", 0x809e960, 256) =
> -1 ENOEN\T (No such file or directory)
> 3620 readlink("/sys/class/net/eth0",
> "../../devices/pci0000:00/0000:00:1e.0/00\00:02:01.0/eth0", 256) = 55
> 3620
> readlink("/sys/devices/pci0000:00/0000:00:1e.0/0000:02:01.0/eth0/device",
> 0x809e960, 256) = -1 ENOENT (No such file or directory)
> 3620 getdents64(13, /* 0 entries */, 4096) = 0
> 3620 close(13) = 0

Can you try the patch below? And enable CONFIG_SYSFS_DEPRECATED. It
should cause HAL to see the network devices again, as the symlink is now
back (it shouldn't have gone away, that was my fault...)

I tried this with HAL 0.5.7, which is pretty old, and hal-device-manager
shows my network devices properly.

thanks for your patience,

greg k-h


---
drivers/base/core.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)

--- gregkh-2.6.orig/drivers/base/core.c
+++ gregkh-2.6/drivers/base/core.c
@@ -584,17 +584,17 @@ int device_add(struct device *dev)
if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
sysfs_create_link(&dev->class->subsys.kset.kobj,
&dev->kobj, dev->bus_id);
-#ifdef CONFIG_SYSFS_DEPRECATED
if (parent) {
sysfs_create_link(&dev->kobj, &dev->parent->kobj,
"device");
+#ifdef CONFIG_SYSFS_DEPRECATED
class_name = make_class_name(dev->class->name,
&dev->kobj);
if (class_name)
sysfs_create_link(&dev->parent->kobj,
&dev->kobj, class_name);
- }
#endif
+ }
}

if ((error = device_add_attrs(dev)))
@@ -651,17 +651,17 @@ int device_add(struct device *dev)
if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
sysfs_remove_link(&dev->class->subsys.kset.kobj,
dev->bus_id);
-#ifdef CONFIG_SYSFS_DEPRECATED
if (parent) {
+#ifdef CONFIG_SYSFS_DEPRECATED
char *class_name = make_class_name(dev->class->name,
&dev->kobj);
if (class_name)
sysfs_remove_link(&dev->parent->kobj,
class_name);
kfree(class_name);
+#endif
sysfs_remove_link(&dev->kobj, "device");
}
-#endif

down(&dev->class->sem);
/* notify any interfaces that the device is now gone */
@@ -761,17 +761,17 @@ void device_del(struct device * dev)
if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
sysfs_remove_link(&dev->class->subsys.kset.kobj,
dev->bus_id);
-#ifdef CONFIG_SYSFS_DEPRECATED
if (parent) {
+#ifdef CONFIG_SYSFS_DEPRECATED
char *class_name = make_class_name(dev->class->name,
&dev->kobj);
if (class_name)
sysfs_remove_link(&dev->parent->kobj,
class_name);
kfree(class_name);
+#endif
sysfs_remove_link(&dev->kobj, "device");
}
-#endif

down(&dev->class->sem);
/* notify any interfaces that the device is now gone */
@@ -1064,8 +1064,8 @@ static int device_move_class_links(struc
struct device *old_parent,
struct device *new_parent)
{
+ int error = 0;
#ifdef CONFIG_SYSFS_DEPRECATED
- int error;
char *class_name;

class_name = make_class_name(dev->class->name, &dev->kobj);
@@ -1093,7 +1093,12 @@ out:
kfree(class_name);
return error;
#else
- return 0;
+ if (old_parent)
+ sysfs_remove_link(&dev->kobj, "device");
+ if (new_parent)
+ error = sysfs_create_link(&dev->kobj, &new_parent->kobj,
+ "device");
+ return error;
#endif
}


2007-03-05 11:21:48

by Johannes Berg

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

On Sun, 2007-03-04 at 17:17 -0800, Greg KH wrote:

> > > This is due to the recent sysfs restructuring I think. IIRC the fix is
> > > to upgrade hal to a current git version.
> >
> > If that's the cause, the fix is to back out whatever was done to break
> > userspace. Breaking userspace is not ok. Upgrading from 2.6.x to
> > 2.6.x+1 should not entail replacing substantial parts of userspace,
> > especially with NOT-EVEN-FRAKKING-RELEASED-YET CODE.
>
> I should not have broken any userspace if CONFIG_SYSFS_DEPRECATED is
> enabled with that patch. If that is enabled, and that patch still
> causes problems, please let me know.

Yeah, sorry for not mentioning that in my original email and the
discussion it stirred.

johannes


Attachments:
signature.asc (190.00 B)
This is a digitally signed message part

2007-03-05 23:37:56

by Jeffrey Hundstad

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

Greg KH wrote:
> On Mon, Mar 05, 2007 at 07:59:50AM -0500, Theodore Tso wrote:
>
> Ok, how about the following patch. Is it acceptable to everyone?
>
> thanks,
>
> greg k-h
>
> ---
> init/Kconfig | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> --- gregkh-2.6.orig/init/Kconfig
> +++ gregkh-2.6/init/Kconfig
> @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> that belong to a class, back into the /sys/class heirachy, in
> order to support older versions of udev.
>
> - If you are using a distro that was released in 2006 or later,
> - it should be safe to say N here.
> + If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> + release from 2007 or later, it should be safe to say N here.
> +
> + If you are using Debian or other distros that are slow to
> + update HAL, please say Y here.
> +
> + If you have any problems with devices not being found properly
> + from userspace programs, and this option is disabled, say Y
> + here.
> +
> + If you are unsure about this at all, say Y.
>
> config RELAY
> bool "Kernel->user space relay support (formerly relayfs)"

Since it appears you're trying to offend people with this patch, it
would seem appropriate to call someone's mother a "bad" name. This may
be in the style guide; perhaps I should submit a patch.

--
Jeffrey Hundstad
PS: Humor (really!) relax.


2007-03-05 00:46:38

by Ian McDonald

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

On 3/5/07, Matt Mackall <[email protected]> wrote:
> > This is due to the recent sysfs restructuring I think. IIRC the fix is
> > to upgrade hal to a current git version.
>
> If that's the cause, the fix is to back out whatever was done to break
> userspace. Breaking userspace is not ok. Upgrading from 2.6.x to
> 2.6.x+1 should not entail replacing substantial parts of userspace,
> especially with NOT-EVEN-FRAKKING-RELEASED-YET CODE.
>
> I will try a new HAL when it shows up in Debian/unstable and not a
> moment sooner.
>
But you're running a kernel that's not in Debian/unstable so this
seems a bit hypocritical.

When you work with bleeding edge kernels you have to be prepared to
work around things. Hell for ages git wasn't in Debian - unstable
even, udev would break things etc.

Just my 2c worth.
--
Web: http://wand.net.nz/~iam4
Blog: http://iansblog.jandi.co.nz
WAND Network Research Group

2007-03-05 20:08:31

by Matt Mackall

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> Ok, how about the following patch. Is it acceptable to everyone?
>
> - If you are using a distro that was released in 2006 or later,
> - it should be safe to say N here.
> + If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> + release from 2007 or later, it should be safe to say N here.
> +
> + If you are using Debian or other distros that are slow to
> + update HAL, please say Y here.

What HAL version do you think Debian ought to have, pray tell? And
what the hell version do those other distros have?

The last HAL release was 0.5.8 on 11-Sep-2006. It showed up in
Debian/unstable on 2-Oct. There have been six Debian bugfix releases,
the most recent on 12-Feb.

http://people.freedesktop.org/~david/dist/
http://packages.debian.org/changelogs/pool/main/h/hal/hal_0.5.8.1-6.1/changelog

The last NetworkManager is 0.6.4 released 13-Jul-2006. It showed up in
Debian/unstable on 8-Aug. There have been five bugfix releases, the
most recent on 30-Nov.

http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/0.6/
http://packages.debian.org/changelogs/pool/main/n/network-manager/network-manager_0.6.4-6/changelog

Debian is NOT the problem.

--
Mathematics is the supreme nostalgia of our time.

2007-03-06 01:58:26

by Greg KH

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Mon, Mar 05, 2007 at 07:30:21PM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 04:07:22PM -0800, Greg KH wrote:
> > On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> > > On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > > >
> > > > Ok, how about the following patch. Is it acceptable to everyone?
> > > >
> > > > thanks,
> > > >
> > > > greg k-h
> > > >
> > > > ---
> > > > init/Kconfig | 13 +++++++++++--
> > > > 1 file changed, 11 insertions(+), 2 deletions(-)
> > > >
> > > > --- gregkh-2.6.orig/init/Kconfig
> > > > +++ gregkh-2.6/init/Kconfig
> > > > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > > > that belong to a class, back into the /sys/class heirachy, in
> > > > order to support older versions of udev.
> > > >
> > > > - If you are using a distro that was released in 2006 or later,
> > > > - it should be safe to say N here.
> > > > + If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > > > + release from 2007 or later, it should be safe to say N here.
> > > > +
> > > > + If you are using Debian or other distros that are slow to
> > > > + update HAL, please say Y here.
> > > >...
> > >
> > > The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally
> > > for all users, and schedule it's removal for mid-2008 (or later).
> > >
> > > 12 months after the first _release_ of a HAL that can live without seems
> > > to be the first time when we can consider getting rid of it, since all
> > > distributions with at least one release a year should ship it by then.
> > >
> > > Currently, SYSFS_DEPRECATED is only a trap for users.
> >
> > Huh?
> >
> > No, again, I've been using this just fine for about 6 months now.
> >
> > And what about all of the servers not using HAL/NetworkManager?
> > And what about all of the embedded systems not using either?
> >
> > So to not allow this to be turned off by people who might want to (we
> > want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
> > other distros released this year), is pretty heavy-handed.
> >
> > It also will work in OpenSuSE 10.2 which is already released, and I
> > think Fedora 6, but I've only limited experience with these.
> >
> > Oh, and Gentoo works just fine, and has been for the past 6 months.
> >
> > I would just prefer to come up with an acceptable set of wording that
> > will work to properly warn people.
> >
> > I proposed one such wording which some people took as a slam against
> > Debian, which it really was not at all.
> >
> > Does someone else want to propose some other wording instead?
>
> Back up a bit. Let's review:
>
> Problem: NetworkManager stopped working with my ipw2200 on Debian/unstable
>
> Theory A: It broke because I'm not running an as-yet-unreleased HAL.
>
> Then we should revert the patch pronto because it's an unqualified
> regression.
>
> Theory B: It broke because I'm not running relatively recent HAL.
>
> By all accounts I'm running the latest and greatest HAL and Network
> Manager, more than recent enough to work.
>
> Theory C: It broke because I've got some goofy config.
>
> My setup passes no arguments to either. The HAL config file is
> completely bare-bones and there's no sign of any configuration files
> for Network Manager.
>
> Theory D: It broke for some nebulous Debian-related reason.
>
> That's a bunch of unhelpful crap.
>

> Can we come up with an actual theory for what's wrong with my setup, please?
> Like, perhaps:
>
> Theory E: There's some undiagnosed new breakage that this introduces
> that no else hit until it went into mainline.

Theory F: It broke because you are using NetworkManager for your
network devices and the patches that fix this have not made it into a
real release?

I'm just guessing, but does anyone who is having this problem, NOT using
NetworkManager?

I'm running an old version of HAL just fine, but I'm not using
NetworkManager here.

I am using NetworkManager on a OpenSuSE 10.3 release, but suse's version
of NetworkManager is well known to not be anywhere near what is released
as a tarball :(

thanks,

greg k-h

2007-03-06 17:55:12

by Dan Williams

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Mon, 2007-03-05 at 17:56 -0800, Greg KH wrote:
> On Mon, Mar 05, 2007 at 07:30:21PM -0600, Matt Mackall wrote:
> > On Mon, Mar 05, 2007 at 04:07:22PM -0800, Greg KH wrote:
> > > On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> > > > On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > > > >
> > > > > Ok, how about the following patch. Is it acceptable to everyone?
> > > > >
> > > > > thanks,
> > > > >
> > > > > greg k-h
> > > > >
> > > > > ---
> > > > > init/Kconfig | 13 +++++++++++--
> > > > > 1 file changed, 11 insertions(+), 2 deletions(-)
> > > > >
> > > > > --- gregkh-2.6.orig/init/Kconfig
> > > > > +++ gregkh-2.6/init/Kconfig
> > > > > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > > > > that belong to a class, back into the /sys/class heirachy, in
> > > > > order to support older versions of udev.
> > > > >
> > > > > - If you are using a distro that was released in 2006 or later,
> > > > > - it should be safe to say N here.
> > > > > + If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > > > > + release from 2007 or later, it should be safe to say N here.
> > > > > +
> > > > > + If you are using Debian or other distros that are slow to
> > > > > + update HAL, please say Y here.
> > > > >...
> > > >
> > > > The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally
> > > > for all users, and schedule it's removal for mid-2008 (or later).
> > > >
> > > > 12 months after the first _release_ of a HAL that can live without seems
> > > > to be the first time when we can consider getting rid of it, since all
> > > > distributions with at least one release a year should ship it by then.
> > > >
> > > > Currently, SYSFS_DEPRECATED is only a trap for users.
> > >
> > > Huh?
> > >
> > > No, again, I've been using this just fine for about 6 months now.
> > >
> > > And what about all of the servers not using HAL/NetworkManager?
> > > And what about all of the embedded systems not using either?
> > >
> > > So to not allow this to be turned off by people who might want to (we
> > > want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
> > > other distros released this year), is pretty heavy-handed.
> > >
> > > It also will work in OpenSuSE 10.2 which is already released, and I
> > > think Fedora 6, but I've only limited experience with these.
> > >
> > > Oh, and Gentoo works just fine, and has been for the past 6 months.
> > >
> > > I would just prefer to come up with an acceptable set of wording that
> > > will work to properly warn people.
> > >
> > > I proposed one such wording which some people took as a slam against
> > > Debian, which it really was not at all.
> > >
> > > Does someone else want to propose some other wording instead?
> >
> > Back up a bit. Let's review:
> >
> > Problem: NetworkManager stopped working with my ipw2200 on Debian/unstable
> >
> > Theory A: It broke because I'm not running an as-yet-unreleased HAL.
> >
> > Then we should revert the patch pronto because it's an unqualified
> > regression.
> >
> > Theory B: It broke because I'm not running relatively recent HAL.
> >
> > By all accounts I'm running the latest and greatest HAL and Network
> > Manager, more than recent enough to work.
> >
> > Theory C: It broke because I've got some goofy config.
> >
> > My setup passes no arguments to either. The HAL config file is
> > completely bare-bones and there's no sign of any configuration files
> > for Network Manager.
> >
> > Theory D: It broke for some nebulous Debian-related reason.
> >
> > That's a bunch of unhelpful crap.
> >
>
> > Can we come up with an actual theory for what's wrong with my setup, please?
> > Like, perhaps:
> >
> > Theory E: There's some undiagnosed new breakage that this introduces
> > that no else hit until it went into mainline.
>
> Theory F: It broke because you are using NetworkManager for your
> network devices and the patches that fix this have not made it into a
> real release?

The problem is _NOT_ NetworkManager. NM just asks HAL for network
devices, NM does not muck with /sys at all. If HAL can't see it,
NetworkManager can't see it, because NM uses HAL.

The problem is that sysfs is fundamentally a kernel API. Whenever it
changes, HAL must change or HAL will break. Same story with anything
that ever reads from sysfs.

Dan

> I'm just guessing, but does anyone who is having this problem, NOT using
> NetworkManager?
>
> I'm running an old version of HAL just fine, but I'm not using
> NetworkManager here.
>
> I am using NetworkManager on a OpenSuSE 10.3 release, but suse's version
> of NetworkManager is well known to not be anywhere near what is released
> as a tarball :(
>
> thanks,
>
> greg k-h
> -
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html


2007-03-06 02:50:36

by Greg KH

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Mon, Mar 05, 2007 at 07:30:21PM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 04:07:22PM -0800, Greg KH wrote:
> > On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> > > On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > > >
> > > > Ok, how about the following patch. Is it acceptable to everyone?
> > > >
> > > > thanks,
> > > >
> > > > greg k-h
> > > >
> > > > ---
> > > > init/Kconfig | 13 +++++++++++--
> > > > 1 file changed, 11 insertions(+), 2 deletions(-)
> > > >
> > > > --- gregkh-2.6.orig/init/Kconfig
> > > > +++ gregkh-2.6/init/Kconfig
> > > > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > > > that belong to a class, back into the /sys/class heirachy, in
> > > > order to support older versions of udev.
> > > >
> > > > - If you are using a distro that was released in 2006 or later,
> > > > - it should be safe to say N here.
> > > > + If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > > > + release from 2007 or later, it should be safe to say N here.
> > > > +
> > > > + If you are using Debian or other distros that are slow to
> > > > + update HAL, please say Y here.
> > > >...
> > >
> > > The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally
> > > for all users, and schedule it's removal for mid-2008 (or later).
> > >
> > > 12 months after the first _release_ of a HAL that can live without seems
> > > to be the first time when we can consider getting rid of it, since all
> > > distributions with at least one release a year should ship it by then.
> > >
> > > Currently, SYSFS_DEPRECATED is only a trap for users.
> >
> > Huh?
> >
> > No, again, I've been using this just fine for about 6 months now.
> >
> > And what about all of the servers not using HAL/NetworkManager?
> > And what about all of the embedded systems not using either?
> >
> > So to not allow this to be turned off by people who might want to (we
> > want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
> > other distros released this year), is pretty heavy-handed.
> >
> > It also will work in OpenSuSE 10.2 which is already released, and I
> > think Fedora 6, but I've only limited experience with these.
> >
> > Oh, and Gentoo works just fine, and has been for the past 6 months.
> >
> > I would just prefer to come up with an acceptable set of wording that
> > will work to properly warn people.
> >
> > I proposed one such wording which some people took as a slam against
> > Debian, which it really was not at all.
> >
> > Does someone else want to propose some other wording instead?
>
> Back up a bit. Let's review:
>
> Problem: NetworkManager stopped working with my ipw2200 on Debian/unstable

Wait, have confirmed that if you enable this config option,
NetworkManager starts back up again and works properly?

If so, can you disable the option and strace it to see what program is
trying to access what? That will put the
HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
quickly :)

thanks,

greg k-h

2007-03-06 03:08:08

by Matthew Garrett

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

On Mon, Mar 05, 2007 at 02:39:00PM -0800, Greg KH wrote:

> Ok, I only named HAL as that is what people have told me the problem is.
> I have been running this change on my boxs, without
> CONFIG_SYSFS_DEPRECATED since last July or so.
>
> But I don't use NetworkManager here for the most part, but I have tried
> this in the OpenSuse10.3 alpha releases and it seems to work just fine
> with whatever version of NetworkManager it uses.

At a guess, you're carrying either a git snapshot or have backports from
git. Several distributions do this, but until there's actually been a
released version that works, it's a bit early to set a timescale.

--
Matthew Garrett | [email protected]

2007-03-06 13:12:06

by Johannes Berg

[permalink] [raw]
Subject: Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

On Mon, 2007-03-05 at 07:59 -0500, Theodore Tso wrote:

> (depending on whether we want to accomodate Debian's glacial
> release schedule).

I don't think Debian updates the kernel to some actual newer version
either.

johannes


Attachments:
signature.asc (190.00 B)
This is a digitally signed message part

2007-03-06 00:35:42

by Adrian Bunk

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Mon, Mar 05, 2007 at 04:07:22PM -0800, Greg KH wrote:
> On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> > On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > >
> > > Ok, how about the following patch. Is it acceptable to everyone?
> > >
> > > thanks,
> > >
> > > greg k-h
> > >
> > > ---
> > > init/Kconfig | 13 +++++++++++--
> > > 1 file changed, 11 insertions(+), 2 deletions(-)
> > >
> > > --- gregkh-2.6.orig/init/Kconfig
> > > +++ gregkh-2.6/init/Kconfig
> > > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > > that belong to a class, back into the /sys/class heirachy, in
> > > order to support older versions of udev.
> > >
> > > - If you are using a distro that was released in 2006 or later,
> > > - it should be safe to say N here.
> > > + If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > > + release from 2007 or later, it should be safe to say N here.
> > > +
> > > + If you are using Debian or other distros that are slow to
> > > + update HAL, please say Y here.
> > >...
> >
> > The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally
> > for all users, and schedule it's removal for mid-2008 (or later).
> >
> > 12 months after the first _release_ of a HAL that can live without seems
> > to be the first time when we can consider getting rid of it, since all
> > distributions with at least one release a year should ship it by then.
> >
> > Currently, SYSFS_DEPRECATED is only a trap for users.
>
> Huh?
>
> No, again, I've been using this just fine for about 6 months now.
>
> And what about all of the servers not using HAL/NetworkManager?

On a server, it shouldn't harm.

> And what about all of the embedded systems not using either?

If it was much code, I would have sent a patch that allowed disabling it
if EMBEDDED=y.

> So to not allow this to be turned off by people who might want to (we
> want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
> other distros released this year), is pretty heavy-handed.
>
> It also will work in OpenSuSE 10.2 which is already released, and I
> think Fedora 6, but I've only limited experience with these.
>
> Oh, and Gentoo works just fine, and has been for the past 6 months.

For most people, it simply doesn't matter whether SYSFS_DEPRECATED is
on or off.

But accidentally disabling SYSFS_DEPRECATED has proven to be a trap
people sometimes fall into - and tracking them down to
SYSFS_DEPRECATED=n sometimes takes some time.

> I would just prefer to come up with an acceptable set of wording that
> will work to properly warn people.
>
> I proposed one such wording which some people took as a slam against
> Debian, which it really was not at all.
>
> Does someone else want to propose some other wording instead?
>
> thanks,
>
> greg k-h

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed


2007-03-05 23:40:51

by Adrian Bunk

[permalink] [raw]
Subject: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
>
> Ok, how about the following patch. Is it acceptable to everyone?
>
> thanks,
>
> greg k-h
>
> ---
> init/Kconfig | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> --- gregkh-2.6.orig/init/Kconfig
> +++ gregkh-2.6/init/Kconfig
> @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> that belong to a class, back into the /sys/class heirachy, in
> order to support older versions of udev.
>
> - If you are using a distro that was released in 2006 or later,
> - it should be safe to say N here.
> + If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> + release from 2007 or later, it should be safe to say N here.
> +
> + If you are using Debian or other distros that are slow to
> + update HAL, please say Y here.
>...

The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally
for all users, and schedule it's removal for mid-2008 (or later).

12 months after the first _release_ of a HAL that can live without seems
to be the first time when we can consider getting rid of it, since all
distributions with at least one release a year should ship it by then.

Currently, SYSFS_DEPRECATED is only a trap for users.

Suggested patch below.

cu
Adrian


<-- snip -->


unconditionally enable SYSFS_DEPRECATED

This patch unconditionally enables SYSFS_DEPRECATED and schedules it's
removal for July 2008.

Currently, SYSFS_DEPRECATED is only a trap for users accidentally
disabling it.

In July 2008, all distributions with at least one release a year should
be able to run without SYSFS_DEPRECATED.

Signed-off-by: Adrian Bunk <[email protected]>

diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index c3b1430..b0bce93 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -316,3 +316,13 @@ Why: The option/code is
Who: Johannes Berg <[email protected]>

---------------------------
+
+What: deprecated sysfs files (CONFIG_SYSFS_DEPRECATED)
+When: July 2008
+Why: None of these features or values should be used any longer,
+ as they export driver core implementation details to userspace
+ or export properties which can't be kept stable across kernel
+ releases.
+Who: Greg KH <[email protected]>
+
+---------------------------
diff --git a/init/Kconfig b/init/Kconfig
index f977086..f652b6f 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -274,24 +274,9 @@ config CPUSETS
Say N if unsure.

config SYSFS_DEPRECATED
- bool "Create deprecated sysfs files"
+ bool
default y
help
- This option creates deprecated symlinks such as the
- "device"-link, the <subsystem>:<name>-link, and the
- "bus"-link. It may also add deprecated key in the
- uevent environment.
- None of these features or values should be used today, as
- they export driver core implementation details to userspace
- or export properties which can't be kept stable across kernel
- releases.
-
- If enabled, this option will also move any device structures
- that belong to a class, back into the /sys/class heirachy, in
- order to support older versions of udev.
-
- If you are using a distro that was released in 2006 or later,
- it should be safe to say N here.

config RELAY
bool "Kernel->user space relay support (formerly relayfs)"

2007-03-06 00:42:53

by Greg KH

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Tue, Mar 06, 2007 at 01:35:41AM +0100, Adrian Bunk wrote:
> On Mon, Mar 05, 2007 at 04:07:22PM -0800, Greg KH wrote:
> > On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> > > On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > > >
> > > > Ok, how about the following patch. Is it acceptable to everyone?
> > > >
> > > > thanks,
> > > >
> > > > greg k-h
> > > >
> > > > ---
> > > > init/Kconfig | 13 +++++++++++--
> > > > 1 file changed, 11 insertions(+), 2 deletions(-)
> > > >
> > > > --- gregkh-2.6.orig/init/Kconfig
> > > > +++ gregkh-2.6/init/Kconfig
> > > > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > > > that belong to a class, back into the /sys/class heirachy, in
> > > > order to support older versions of udev.
> > > >
> > > > - If you are using a distro that was released in 2006 or later,
> > > > - it should be safe to say N here.
> > > > + If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > > > + release from 2007 or later, it should be safe to say N here.
> > > > +
> > > > + If you are using Debian or other distros that are slow to
> > > > + update HAL, please say Y here.
> > > >...
> > >
> > > The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally
> > > for all users, and schedule it's removal for mid-2008 (or later).
> > >
> > > 12 months after the first _release_ of a HAL that can live without seems
> > > to be the first time when we can consider getting rid of it, since all
> > > distributions with at least one release a year should ship it by then.
> > >
> > > Currently, SYSFS_DEPRECATED is only a trap for users.
> >
> > Huh?
> >
> > No, again, I've been using this just fine for about 6 months now.
> >
> > And what about all of the servers not using HAL/NetworkManager?
>
> On a server, it shouldn't harm.

But if they wanted that option enabled?

> > And what about all of the embedded systems not using either?
>
> If it was much code, I would have sent a patch that allowed disabling it
> if EMBEDDED=y.

It's not a code size issue. In fact, if the option is enabled, like you
have done, it builds more code into the kernel than before.

> > So to not allow this to be turned off by people who might want to (we
> > want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
> > other distros released this year), is pretty heavy-handed.
> >
> > It also will work in OpenSuSE 10.2 which is already released, and I
> > think Fedora 6, but I've only limited experience with these.
> >
> > Oh, and Gentoo works just fine, and has been for the past 6 months.
>
> For most people, it simply doesn't matter whether SYSFS_DEPRECATED is
> on or off.

Exactly.

> But accidentally disabling SYSFS_DEPRECATED has proven to be a trap
> people sometimes fall into - and tracking them down to
> SYSFS_DEPRECATED=n sometimes takes some time.

So how do I put up the warning flag any larger than I have?

I do not want this always enabled, that option is not acceptable to me,
or to the zillions of people who are running a distro that this option
works just fine on (see above list...)

thanks,

greg k-h

2007-03-06 03:53:20

by Matt Mackall

[permalink] [raw]
Subject: Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

On Mon, Mar 05, 2007 at 06:48:50PM -0800, Greg KH wrote:
> If so, can you disable the option and strace it to see what program is
> trying to access what? That will put the
> HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
> quickly :)

Ok, I've got straces of both good and bad (>5M each). Filtered out
random pointer values and the like, diffed, and filtered for /sys/,
and the result's still 1.5M. What should I be looking for?

--
Mathematics is the supreme nostalgia of our time.