Skip to contentSkip to conversation

Recent wireless breakage (ipw2200, iwconfig, NetworkManager)

PATCH In review Matt Mackall 13 participants 44 messages Mar 4, 2007 – Mar 6, 2007

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Recent kernels are having troubles with wireless for me. Two seemingly related problems:

a) NetworkManager seems oblivious to the existence of my IPW2200
b) Manual iwconfig waits for 60s and then reports:

Error for wireless request "Set Encode" (8B2A) :
SET failed on device eth1 ; Operation not supported.

During this time, my keyboard in X is unresponsive, but everything else seems to be functioning properly. Queued keypresses eventually show up. Alt-sysrq-w gives:

ieee80211_crypt: registered algorithm 'WEP'
SysRq : Show Blocked State

free sibling
task PC stack pid father child younger older
events/0 D C0102D3C 0 4 1 5 3
(L-TLB)

       c1d0bf1c 00000046 c1d0ac20 c0102d3c 00000000 c1d0aa70 00000022
       0000000a
       c1d0aa70 ca8ed618 00000034 00000cd3 c1d0ab7c 00000287 00000002
       f581f040
       00000002 c1d0bf34 00000246 f7b5cb04 c1d0aa70 c038224e c0102c3a
       00000000
Call Trace:
 [<c0102d3c>] __switch_to+0x11b/0x143
 [<c038224e>] __mutex_lock_slowpath+0xfb/0x1e2
 [<c0102c3a>] __switch_to+0x19/0x143
 [<f994a291>] ipw_bg_link_down+0x19/0xbd [ipw2200]
 [<f994a278>] ipw_bg_link_down+0x0/0xbd [ipw2200]
 [<c0122604>] run_workqueue+0x97/0x156
 [<c0122bc7>] worker_thread+0x105/0x12e
 [<c0112399>] default_wake_function+0x0/0xc
 [<c0122ac2>] worker_thread+0x0/0x12e
 [<c01251f7>] kthread+0xa0/0xc9
 [<c0125157>] kthread+0x0/0xc9
 [<c0103f87>] kernel_thread_helper+0x7/0x10
 =======================
ipw2200/0     D 00000020     0  1985      6          2260  1983
(L-TLB)
       f7981f24 00000046 00000001 00000020 c1cdf8c0 00000000 00000000
       0000000a
       f7d09030 e1fdc8c3 00000034 0000093a f7d0913c 00000086 00000020
       f7c4a740
       00000086 f7981f3c 00000246 f7b5cb04 f7d09030 c038224e f7d09030
       c0496550
Call Trace:
 [<c038224e>] __mutex_lock_slowpath+0xfb/0x1e2
 [<c0381233>] __sched_text_start+0x4b3/0x56b
 [<f99445c6>] ipw_bg_gather_stats+0x0/0x27 [ipw2200]
 [<f99445dd>] ipw_bg_gather_stats+0x17/0x27 [ipw2200]
 [<c0122604>] run_workqueue+0x97/0x156
 [<c0122bc7>] worker_thread+0x105/0x12e
 [<c0112399>] default_wake_function+0x0/0xc
 [<c0122ac2>] worker_thread+0x0/0x12e
 [<c01251f7>] kthread+0xa0/0xc9
 [<c0125157>] kthread+0x0/0xc9
 [<c0103f87>] kernel_thread_helper+0x7/0x10
 =======================

ieee80211_crypt_wep: could not allocate crypto API arc4
eth1: could not initialize WEP: load module ieee80211_crypt_wep ADDRCONF(NETDEV_UP): eth1: link is not ready

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

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.

Signature · 1 line
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 
#1 lore raw

[adding linux-wireless to CC]

Quoted 2 lines · Matt Mackall

Recent kernels are having troubles with wireless for me. Two seemingly related problems:

I don't think they are related actually.

Quoted 1 line

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.

Quoted 1 line

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

That one's strange.

Quoted 3 lines

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.

Quoted 11 lines

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

#2 lore raw
Quoted 6 lines · Johannes Berg

[adding linux-wireless to CC]

Quoted 2 lines · Matt Mackall

Recent kernels are having troubles with wireless for me. Two seemingly related problems:

Quoted 6 lines

I don't think they are related actually.

Quoted 1 line

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.

Quoted 21 lines
Quoted 1 line

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

That one's strange.

Quoted 3 lines

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.

Quoted 10 lines

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
Quoted 4 lines
Quoted 1 line

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.

Signature · 1 line
Mathematics is the supreme nostalgia of our time.
#3 lore raw
Quoted 11 lines · On Sun, 4 Mar 2007 18:25:50 -0600 Matt Mackall…
Quoted 10 lines · Johannes Berg

[adding linux-wireless to CC]

Quoted 2 lines · Matt Mackall

Recent kernels are having troubles with wireless for me. Two seemingly related problems:

I don't think they are related actually.

Quoted 1 line

a) NetworkManager seems oblivious to the existence of my IPW2200

Quoted 7 lines
Quoted 2 lines

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.

#4 lore raw
Quoted 16 lines · Andrew Morton
Quoted 14 lines · On Sun, 4 Mar 2007 18:25:50 -0600 Matt Mackall <[email protected]> wrote:
Quoted 12 lines · Johannes Berg

[adding linux-wireless to CC]

Quoted 2 lines · Matt Mackall

Recent kernels are having troubles with wireless for me. Two seemingly related problems:

I don't think they are related actually.

Quoted 1 line

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.

Quoted 8 lines
Quoted 4 lines

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

Signature · 4 lines
       "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
#5 lore raw
In reply to Matt Mackall
Quoted 11 lines · Matt Mackall
Quoted 2 lines

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.

Signature · 3 lines
Web: http://wand.net.nz/~iam4
Blog: http://iansblog.jandi.co.nz
WAND Network Research Group
#6 lore raw
In reply to Matt Mackall
Quoted 11 lines · Matt Mackall
Quoted 10 lines · Johannes Berg

[adding linux-wireless to CC]

Quoted 2 lines · Matt Mackall

Recent kernels are having troubles with wireless for me. Two seemingly related problems:

I don't think they are related actually.

Quoted 1 line

a) NetworkManager seems oblivious to the existence of my IPW2200

Quoted 7 lines
Quoted 2 lines

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

#7 lore raw
Quoted 11 lines · Greg KH
Quoted 7 lines
Quoted 2 lines

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

#8 lore raw
In reply to Greg KH
Quoted 3 lines · Greg KH

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

#9 lore raw
Quoted 10 lines · Theodore Tso
Quoted 3 lines · Greg KH

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(-)
init/Kconfig +11 -2
@@ -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)"
#10 lore raw

init/Kconfig config SYSFS_DEPRECATED · line 297

Quoted 9 lines · Greg KH

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

init/Kconfig +5 -2
-	  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.

Signature · 1 line
Mathematics is the supreme nostalgia of our time.
#11 lore raw
Quoted 14 lines · Matt Mackall

init/Kconfig config SYSFS_DEPRECATED · line 297

Quoted 9 lines · Greg KH

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

init/Kconfig +5 -2
-	  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?

Quoted 6 lines

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

#12 lore raw
Quoted 7 lines · Greg KH

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.

Signature · 1 line
Matthew Garrett | [email protected]
#13 lore raw
In reply to Greg KH
Quoted 24 lines · Greg KH

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(-)
init/Kconfig +4 -2
@@ -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

init/Kconfig config SYSFS_DEPRECATED · line 306

Quoted 10 lines
init/Kconfig +7 -0
+	  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.

Signature · 2 lines
Jeffrey Hundstad
PS: Humor (really!) relax.
#14 lore raw

PATCH 1/1 unconditionally enable SYSFS_DEPRECATED

In reply to Greg KH
Quoted 15 lines · Greg KH

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(-)
init/Kconfig +0 -0
@@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
 	  that belong to a class, back into the /sys/class heirachy, in

init/Kconfig config SYSFS_DEPRECATED · line 297

Quoted 10 lines
init/Kconfig +5 -2
 	  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.

Documentation/feature-removal-schedule.txt +10 -0
index c3b1430..b0bce93 100644
@@ -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]>
+
+---------------------------
init/Kconfig +1 -16
index f977086..f652b6f 100644
@@ -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)"
#15 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

Quoted 30 lines · Adrian Bunk
Quoted 15 lines · Greg KH

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(-)
init/Kconfig +0 -0
@@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
 	  that belong to a class, back into the /sys/class heirachy, in

init/Kconfig config SYSFS_DEPRECATED · line 297

Quoted 10 lines
init/Kconfig +5 -2
 	  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).

Quoted 5 lines

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

#16 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

Quoted 35 lines · Greg KH
Quoted 34 lines · Adrian Bunk
Quoted 15 lines · Greg KH

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(-)
init/Kconfig +0 -0
@@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
 	  that belong to a class, back into the /sys/class heirachy, in

init/Kconfig config SYSFS_DEPRECATED · line 297

Quoted 10 lines
init/Kconfig +5 -2
 	  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.

Quoted 7 lines
Quoted 1 line

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.

Quoted 1 line

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.

Quoted 8 lines

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.

Quoted 11 lines

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

Signature · 4 lines
       "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
#17 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

Quoted 38 lines · Adrian Bunk
Quoted 37 lines · Greg KH
Quoted 35 lines · Adrian Bunk
Quoted 15 lines · Greg KH

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(-)
init/Kconfig +0 -0
@@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
 	  that belong to a class, back into the /sys/class heirachy, in

init/Kconfig config SYSFS_DEPRECATED · line 297

Quoted 10 lines
init/Kconfig +5 -2
 	  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.

Quoted 7 lines
Quoted 5 lines

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?

Quoted 4 lines
Quoted 1 line

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.

Quoted 11 lines
Quoted 8 lines

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.

Quoted 3 lines

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

#18 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

In reply to Greg KH
Quoted 53 lines · Greg KH
Quoted 30 lines · Adrian Bunk
Quoted 15 lines · Greg KH

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(-)
init/Kconfig +0 -0
@@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
 	  that belong to a class, back into the /sys/class heirachy, in

init/Kconfig config SYSFS_DEPRECATED · line 297

Quoted 10 lines
init/Kconfig +5 -2
 	  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).

Quoted 5 lines

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.

Quoted 7 lines

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.

Signature · 1 line
Mathematics is the supreme nostalgia of our time.
#19 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

Quoted 84 lines · Matt Mackall
Quoted 53 lines · Greg KH
Quoted 30 lines · Adrian Bunk
Quoted 15 lines · Greg KH

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(-)
init/Kconfig +0 -0
@@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
 	  that belong to a class, back into the /sys/class heirachy, in

init/Kconfig config SYSFS_DEPRECATED · line 297

Quoted 10 lines
init/Kconfig +5 -2
 	  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).

Quoted 5 lines

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.

Quoted 7 lines

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.

Quoted 8 lines

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

#20 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

Quoted 9 lines · Greg KH

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

#21 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

In reply to Greg KH
Quoted 91 lines · Greg KH
Quoted 90 lines · Matt Mackall
Quoted 53 lines · Greg KH
Quoted 30 lines · Adrian Bunk
Quoted 15 lines · Greg KH

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(-)
init/Kconfig +0 -0
@@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
 	  that belong to a class, back into the /sys/class heirachy, in

init/Kconfig config SYSFS_DEPRECATED · line 297

Quoted 10 lines
init/Kconfig +5 -2
 	  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).

Quoted 5 lines

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.

Quoted 7 lines

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:

Quoted 6 lines
Quoted 2 lines

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

Quoted 17 lines

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

#22 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

In reply to Matt Mackall
Quoted 57 lines · Matt Mackall
Quoted 56 lines · Greg KH
Quoted 30 lines · Adrian Bunk
Quoted 15 lines · Greg KH

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(-)
init/Kconfig +0 -0
@@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
 	  that belong to a class, back into the /sys/class heirachy, in

init/Kconfig config SYSFS_DEPRECATED · line 297

Quoted 10 lines
init/Kconfig +5 -2
 	  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).

Quoted 5 lines

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.

Quoted 8 lines
Quoted 4 lines

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

#23 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

Quoted 2 lines · Greg KH

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

Yep, probably should have mentioned that.

Quoted 4 lines

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.

Signature · 1 line
Mathematics is the supreme nostalgia of our time.
#24 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

In reply to Greg KH
Quoted 4 lines · Greg KH

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?

Signature · 1 line
Mathematics is the supreme nostalgia of our time.
#25 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

Quoted 9 lines · Matt Mackall
Quoted 4 lines · Greg KH

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

#26 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

Quoted 11 lines · Greg KH
Quoted 9 lines · Matt Mackall
Quoted 4 lines · Greg KH

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?

Quoted 6 lines

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

Signature · 1 line
Mathematics is the supreme nostalgia of our time.
#27 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

Quoted 50 lines · Matt Mackall
Quoted 11 lines · Greg KH
Quoted 9 lines · Matt Mackall
Quoted 4 lines · Greg KH

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?

Quoted 6 lines

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",
Quoted 15 lines

"../../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

#28 lore raw

Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED

In reply to Matt Mackall
Quoted 50 lines · Matt Mackall
Quoted 11 lines · Greg KH
Quoted 9 lines · Matt Mackall
Quoted 4 lines · Greg KH

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?

Quoted 6 lines

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",
Quoted 15 lines

"../../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(-)
drivers/base/core.c +13 -8
@@ -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
 }
 
#29 lore raw
In reply to Theodore Tso
Quoted 2 lines · Theodore Tso

(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

#30 lore raw
In reply to Matt Mackall
Quoted 8 lines · Matt Mackall

Recent kernels are having troubles with wireless for me. Two seemingly related problems:

a) NetworkManager seems oblivious to the existence of my IPW2200
b) Manual iwconfig waits for 60s and then reports:

Error for wireless request "Set Encode" (8B2A) :
SET failed on device eth1 ; Operation not supported.

Do you have CONFIG_SYSFS_DEPRECATED enabled? If not, please do as that will keep you from having to change any userspace code.

thanks,

greg k-h

#31 lore raw
Quoted 4 lines · Greg KH
Quoted 3 lines · Matt Mackall

Recent kernels are having troubles with wireless for me. Two seemingly related problems:

Quoted 8 lines
Quoted 5 lines

a) NetworkManager seems oblivious to the existence of my IPW2200
b) Manual iwconfig waits for 60s and then reports:

Error for wireless request "Set Encode" (8B2A) :
SET failed on device eth1 ; Operation not supported.

Do you have CONFIG_SYSFS_DEPRECATED enabled? If not, please do as that will keep you from having to change any userspace code.

No, it's disabled. Will test once I'm done tracking down the iwconfig problem. From the help text for SYSFS_DEPRECATED:

If you are using a distro that was released in 2006 or later, it should be safe to say N here.

If we need an as-yet-unreleased HAL without it, I would say the above should be changed to 2008 or so. If Debian actually cuts a release in the next few months, you might make that 2010.

Signature · 1 line
Mathematics is the supreme nostalgia of our time.
#32 lore raw
Quoted 17 lines · Matt Mackall
Quoted 4 lines · Greg KH
Quoted 3 lines · Matt Mackall

Recent kernels are having troubles with wireless for me. Two seemingly related problems:

Quoted 8 lines
Quoted 5 lines

a) NetworkManager seems oblivious to the existence of my IPW2200
b) Manual iwconfig waits for 60s and then reports:

Error for wireless request "Set Encode" (8B2A) :
SET failed on device eth1 ; Operation not supported.

Do you have CONFIG_SYSFS_DEPRECATED enabled? If not, please do as that will keep you from having to change any userspace code.

No, it's disabled. Will test once I'm done tracking down the iwconfig problem. From the help text for SYSFS_DEPRECATED:

Quoted 6 lines

If you are using a distro that was released in 2006 or later, it should be safe to say N here.

If we need an as-yet-unreleased HAL without it, I would say the above should be changed to 2008 or so. If Debian actually cuts a release in the next few months, you might make that 2010.

Well, just because Debian has such a slow release cycle, should the rest of the world be forced to follow suit? :)

When I originally wrote that, I thought Debian would have already done their release, my mistake...

thanks,

greg k-h

#33 lore raw
Quoted 25 lines · Greg KH
Quoted 17 lines · Matt Mackall
Quoted 4 lines · Greg KH
Quoted 3 lines · Matt Mackall

Recent kernels are having troubles with wireless for me. Two seemingly related problems:

Quoted 8 lines
Quoted 5 lines

a) NetworkManager seems oblivious to the existence of my IPW2200
b) Manual iwconfig waits for 60s and then reports:

Error for wireless request "Set Encode" (8B2A) :
SET failed on device eth1 ; Operation not supported.

Do you have CONFIG_SYSFS_DEPRECATED enabled? If not, please do as that will keep you from having to change any userspace code.

No, it's disabled. Will test once I'm done tracking down the iwconfig problem. From the help text for SYSFS_DEPRECATED:

Quoted 6 lines

If you are using a distro that was released in 2006 or later, it should be safe to say N here.

If we need an as-yet-unreleased HAL without it, I would say the above should be changed to 2008 or so. If Debian actually cuts a release in the next few months, you might make that 2010.

Quoted 5 lines

Well, just because Debian has such a slow release cycle, should the rest of the world be forced to follow suit? :)

When I originally wrote that, I thought Debian would have already done their release, my mistake...

That's not the point. The point is that Debian/unstable as of _this morning_ doesn't work. For reference, I'm running both the latest releases of both hal (0.5.8.1-6.1) and network-manager (0.6.4-6). And there are people telling me I need a copy of HAL out of git that hasn't even been released for Debian to package. Debian isn't the problem here.

If it is indeed the case that HAL needs to be upgraded here, the clock on deprecating these features can't even start counting until a usable HAL version is released. And then you need to give it at least a year after that before you can start recommending people disable it.

Signature · 1 line
Mathematics is the supreme nostalgia of our time.
#34 lore raw
Quoted 32 lines · Matt Mackall
Quoted 25 lines · Greg KH
Quoted 17 lines · Matt Mackall
Quoted 4 lines · Greg KH
Quoted 3 lines · Matt Mackall

Recent kernels are having troubles with wireless for me. Two seemingly related problems:

Quoted 8 lines
Quoted 5 lines

a) NetworkManager seems oblivious to the existence of my IPW2200
b) Manual iwconfig waits for 60s and then reports:

Error for wireless request "Set Encode" (8B2A) :
SET failed on device eth1 ; Operation not supported.

Do you have CONFIG_SYSFS_DEPRECATED enabled? If not, please do as that will keep you from having to change any userspace code.

No, it's disabled. Will test once I'm done tracking down the iwconfig problem. From the help text for SYSFS_DEPRECATED:

Quoted 6 lines

If you are using a distro that was released in 2006 or later, it should be safe to say N here.

If we need an as-yet-unreleased HAL without it, I would say the above should be changed to 2008 or so. If Debian actually cuts a release in the next few months, you might make that 2010.

Quoted 5 lines

Well, just because Debian has such a slow release cycle, should the rest of the world be forced to follow suit? :)

When I originally wrote that, I thought Debian would have already done their release, my mistake...

Quoted 6 lines

That's not the point. The point is that Debian/unstable as of _this morning_ doesn't work. For reference, I'm running both the latest releases of both hal (0.5.8.1-6.1) and network-manager (0.6.4-6). And there are people telling me I need a copy of HAL out of git that hasn't even been released for Debian to package. Debian isn't the problem here.

hal 0.5.9-rc1 (released, not from git) should work. It will be
problably released soon and picked by sane distributions. Debian is very irritating corner case.

Signature · 2 lines
Tomasz Torcz                Only gods can safely risk perfection,
[email protected]     it's a dangerous thing for a man.  -- Alia
#35 lore raw
Quoted 10 lines · Tomasz Torcz
Quoted 6 lines

That's not the point. The point is that Debian/unstable as of _this morning_ doesn't work. For reference, I'm running both the latest releases of both hal (0.5.8.1-6.1) and network-manager (0.6.4-6). And there are people telling me I need a copy of HAL out of git that hasn't even been released for Debian to package. Debian isn't the problem here.

hal 0.5.9-rc1 (released, not from git) should work. It will be
problably released soon and picked by sane distributions. Debian is very irritating corner case.

Presumably the -rc1 stands for "release candidate". Which means "not yet released". And when did it show up? 04-Mar-2007 at 18:31. That's right, YESTERDAY. Almost a full month after Greg's commit.

For the last time, DEBIAN IS NOT THE PROBLEM.

Signature · 1 line
Mathematics is the supreme nostalgia of our time.
#36 lore raw
Quoted 12 lines · Matt Mackall
Quoted 10 lines · Tomasz Torcz
Quoted 6 lines

That's not the point. The point is that Debian/unstable as of _this morning_ doesn't work. For reference, I'm running both the latest releases of both hal (0.5.8.1-6.1) and network-manager (0.6.4-6). And there are people telling me I need a copy of HAL out of git that hasn't even been released for Debian to package. Debian isn't the problem here.

hal 0.5.9-rc1 (released, not from git) should work. It will be
problably released soon and picked by sane distributions. Debian is very irritating corner case.

Quoted 5 lines

Presumably the -rc1 stands for "release candidate". Which means "not yet released". And when did it show up? 04-Mar-2007 at 18:31. That's right, YESTERDAY. Almost a full month after Greg's commit.

For the last time, DEBIAN IS NOT THE PROBLEM.

Can I please second this (having been burned by hell that was udev of the 0.5ish era) - Greg, please try to make changes in a cross-compatible way so that versions of userspace and kernel are not so closely dependant on tracking each other. The whole 2.6.8 -> 2.6.12 series of kernels and associated udevs are fraught with race conditions where upgrading one but not the other will leave your machine unbootable.

I read the "manifesto" for udev showing how crap devfs was, it was broken, it could never be fixed etc - yet my experience was that devfs systems "just worked"[tm] and udev was very dangerous. My thinking is going to be tarnished by that for a while and my mental image of udev is "unreliable POS". I'm hoping enough good experiences with udev might make me feel less scared whenever I have to deal with it.

Similarly, I'm hoping I don't have to think "oh shit, will this break boot" every time I upgrade either a kernel or hal version for the next year, because it would really suck to do that all over again. It contributes to the meme that linux is unreliable and perpetually unstable.

Regards,

Bron.

#37 lore raw
Quoted 17 lines · Bron Gondwana
Quoted 16 lines · Matt Mackall
Quoted 10 lines · Tomasz Torcz
Quoted 6 lines

That's not the point. The point is that Debian/unstable as of _this morning_ doesn't work. For reference, I'm running both the latest releases of both hal (0.5.8.1-6.1) and network-manager (0.6.4-6). And there are people telling me I need a copy of HAL out of git that hasn't even been released for Debian to package. Debian isn't the problem here.

hal 0.5.9-rc1 (released, not from git) should work. It will be
problably released soon and picked by sane distributions. Debian is very irritating corner case.

Presumably the -rc1 stands for "release candidate". Which means "not yet released". And when did it show up? 04-Mar-2007 at 18:31. That's right, YESTERDAY. Almost a full month after Greg's commit.

Quoted 8 lines
Quoted 1 line

For the last time, DEBIAN IS NOT THE PROBLEM.

Can I please second this (having been burned by hell that was udev of the 0.5ish era) - Greg, please try to make changes in a cross-compatible way so that versions of userspace and kernel are not so closely dependant on tracking each other. The whole 2.6.8 -> 2.6.12 series of kernels and associated udevs are fraught with race conditions where upgrading one but not the other will leave your machine unbootable.

But I AM TRYING TO MAKE IT COMPATIBLE!!!

That's what that config option is there for. If you happen to be running a newer userspace, a different distro than what is in Debian right now, or don't use HAL and Networkmanager, then disable that option. Then all of sysfs looks just like it used to, no user visble changes at all. It doesn't get any more compatible than that.

Again, I've pointed out distros that work just fine many times in this thread...

It's been there since 2.6.20 I think, no one seemed to have noticed it then for an odd reason...

And the default is enabled, you have to manually turn it off in order to break your machine.

Again, how can I word this in a manner that would be sufficient to keep this misunderstanding from happening again?

greg k-h

#38 lore raw
Quoted 7 lines · Greg KH

But I AM TRYING TO MAKE IT COMPATIBLE!!!

That's what that config option is there for. If you happen to be running a newer userspace, a different distro than what is in Debian right now, or don't use HAL and Networkmanager, then disable that option. Then all of sysfs looks just like it used to, no user visble changes at all. It doesn't get any more compatible than that.

This is great, but I think the real problem isn't the config option, but what is changing if the config option isn't enabled. The claim which some, including Matt and Bron, seem to be making is that if you turn *off* CONFIG_SYSFS_DEPRECATED, you must be using at least hal 0.5.9-rc1, released ***yesterday***, or suffer breakages for at least some system configurations.

So the problem with putting a date in Kconfig.txt help file, or in Documentation/feature-removal-schedule.txt, is that if there are other incompatible changes which are added to sysfs in say, December 2007 or January 2008, but which are papered over with CONFIG_SYSFS_DEPRECATED, and then come June 2008, CONFIG_SYSFS_DEPRECATED is unceremoniously ripped out, then users will get screwed.

So the question really is are we really done making changes to sysfs, or maybe what we should do is talk about major version numbers to sysfs. Call what we have currently not CONFIG_SYSFS_DEPRECATED, but rather CONFIG_SYSFS_LAYOUT_1. At the moment, CONFIG_SYSFS_LAYOUT_2 is undergoing changes, but at some point we need to lock down and state that Layout version 2 is never going to change, and then people who want changes can go work on CONFIG_SYSFS_LAYOUT_3.

The problem with calling CONFIG_SYSFS_DEPRECATED is that people think that since it's deprecated, it should be turned off, but if we have staged major version numbers, with guarantees of absolute stability once a particular major version number is locked down, then it may make it a lot easier to talk about what version of hal and udev and Network Manager is really needed for different versions.

- Ted

#39 lore raw
Quoted 3 lines · On Mon, 5 Mar 2007 19:56:25 -0500 Theodore Tso <[email protected]> wrote:

So the question really is are we really done making changes to sysfs, or maybe what we should do is talk about major version numbers to sysfs.

Perhaps using a config option wasn't the right way to do this - a kernel boot parameter might be better.

In fact, one could envisage a kernel boot parameter "sysfs_version=N" which will allow distro people to select the sysfs-of-the-day which works with their userspace.

Because it does appear that we need _something_ which will get us away from this ongoing problem of needing to keep the kernel and userspace synchronised across sysfs changes.

#40 lore raw
Quoted 9 lines · Andrew Morton
Quoted 3 lines · On Mon, 5 Mar 2007 19:56:25 -0500 Theodore Tso <[email protected]> wrote:

So the question really is are we really done making changes to sysfs, or maybe what we should do is talk about major version numbers to sysfs.

Perhaps using a config option wasn't the right way to do this - a kernel boot parameter might be better.

Ok, I have no problem with that if people really want it. But give me the option to also make it a config option so I don't have to change our bootloaders too.

Does that sound acceptable?

thanks,

greg k-h

#41 lore raw
Quoted 8 lines · On Mon, 5 Mar 2007 17:17:09 -0800 Greg KH <[email protected]> wrote:
Quoted 7 lines · Andrew Morton
Quoted 3 lines · On Mon, 5 Mar 2007 19:56:25 -0500 Theodore Tso <[email protected]> wrote:

So the question really is are we really done making changes to sysfs, or maybe what we should do is talk about major version numbers to sysfs.

Quoted 6 lines
Quoted 2 lines

Perhaps using a config option wasn't the right way to do this - a kernel boot parameter might be better.

Ok, I have no problem with that if people really want it. But give me the option to also make it a config option so I don't have to change our bootloaders too.

Sometimes we provide a config option which provides the default version of the boot option. So:

CONFIG_SYSFS_VERSION=1.2

and

	if (user_provided_sysfs_version == NULL)
		user_provided_sysfs_version = CONFIG_SYSFS_VERSION;
Quoted 1 line

Does that sound acceptable?

If we make CONFIG_SYSFS_DEPRECATED just a boolean boot option then that fixes this problem (we hope) but won't help us next time we want to change something.

It all depends on whether sysfs is finished yet ;)

#42 lore raw
In reply to Theodore Tso
Quoted 9 lines · Theodore Tso
Quoted 7 lines · Greg KH

But I AM TRYING TO MAKE IT COMPATIBLE!!!

That's what that config option is there for. If you happen to be running a newer userspace, a different distro than what is in Debian right now, or don't use HAL and Networkmanager, then disable that option. Then all of sysfs looks just like it used to, no user visble changes at all. It doesn't get any more compatible than that.

Quoted 6 lines

This is great, but I think the real problem isn't the config option, but what is changing if the config option isn't enabled. The claim which some, including Matt and Bron, seem to be making is that if you turn *off* CONFIG_SYSFS_DEPRECATED, you must be using at least hal 0.5.9-rc1, released ***yesterday***, or suffer breakages for at least some system configurations.

Ok, well that has been proven incorrect. I originally thought it was HAL that had the problem, but I think that is not true, as I am using the older version of hal here (0.5.7.1) just fine.

Quoted 15 lines

So the problem with putting a date in Kconfig.txt help file, or in Documentation/feature-removal-schedule.txt, is that if there are other incompatible changes which are added to sysfs in say, December 2007 or January 2008, but which are papered over with CONFIG_SYSFS_DEPRECATED, and then come June 2008, CONFIG_SYSFS_DEPRECATED is unceremoniously ripped out, then users will get screwed.

So the question really is are we really done making changes to sysfs, or maybe what we should do is talk about major version numbers to sysfs. Call what we have currently not CONFIG_SYSFS_DEPRECATED, but rather CONFIG_SYSFS_LAYOUT_1. At the moment, CONFIG_SYSFS_LAYOUT_2 is undergoing changes, but at some point we need to lock down and state that Layout version 2 is never going to change, and then people who want changes can go work on CONFIG_SYSFS_LAYOUT_3.

Quoted 6 lines

The problem with calling CONFIG_SYSFS_DEPRECATED is that people think that since it's deprecated, it should be turned off, but if we have staged major version numbers, with guarantees of absolute stability once a particular major version number is locked down, then it may make it a lot easier to talk about what version of hal and udev and Network Manager is really needed for different versions.

This is what Documentation/ABI/ has tried to nail down, unfortunatly it has turned out to be very hard to track down all of the odd userspace programs that use sysfs and see what they are relying on. We are slowly fixing things, as is proof in the OpenSuSE and Gentoo releases.

And I'll be the first to admit that the ABI/ directory needs some flushing out...

And it isn't really a whole different layout, the only problem here is that a directory has turned into a symlink, so programs that were not written that well (and I'll be the first to admit that I made the same mistake in udev many years ago) and can't handle the change.

So numerous programs "just work" fine, but for a limited few, they have problems, hence the config option so that nothing will break.

And if you look in the ABI/ directory, it describes this usage of the class devices in sysfs. But again, no one is flushing out the users of these features, or even reading the stuff that is there...

So, again, a better wording for the CONFIG help text anyone? Or a better name for the CONFIG value itself?

thanks,

greg k-h

#43 lore raw
In reply to Tomasz Torcz
Quoted 11 lines · Tomasz Torcz
Quoted 6 lines · Matt Mackall

That's not the point. The point is that Debian/unstable as of _this morning_ doesn't work. For reference, I'm running both the latest releases of both hal (0.5.8.1-6.1) and network-manager (0.6.4-6). And there are people telling me I need a copy of HAL out of git that hasn't even been released for Debian to package. Debian isn't the problem here.

hal 0.5.9-rc1 (released, not from git) should work. It will be
problably released soon and picked by sane distributions. Debian is very irritating corner case.

As of right now, Fedora Core 6 has hal-0.5.8.1-6.fc6. This is also
too old. Please, stop claiming that Debian unstable is some corner case. No one is talking about Debian stable here. No one is talking about the Enterprise versions of Red Hat or SuSE (you'd find them just as irritating with modern kernels). Debian unstable tracks released code as fast or faster than Fedora and OpenSuSE. They all keep up with releases.
But the last release of hal is 0.5.8.1. _Release_, not "release
candidate". You can't break that. You can't break it for a while, if you want a sane deprecation schedule. These are userspace interfaces.
Matt is absolutely correct that you should't deprecate a
userspace<->kernel interface before you've even provided a release of the tool that detects the change!

Joel

Signature · 8 lines
"When ideas fail, words come in very handy." 
         - Goethe

Joel Becker
Principal Software Developer
Oracle
E-mail: [email protected]
Phone: (650) 506-8127