Skip to contentSkip to conversation

modutils 2.4.2, please test asap

PATCH Keith Owens 6 participants 16 messages Jan 22, 2001 – Jan 23, 2001

lore
Share & tools
lore
#0 lore raw

Please test this modutils patch ASAP, at least one distribution is waiting to burn their master CD for kernel 2.4.0. Remove patch-2.4.0-hotplug from the kernel if you have installed it.

This patch is being released under protest. It completely drops support for USB device ids on kernel 2.4.0-prerelease and earlier. That will break USB support for anybody who installs modutils 2.4.2 and tries to run a kernel before 2.4.0.

Breaking backwards compatibility goes completely against the grain for modutils. It goes to a lot of bother to support users on older kernels and to ensure that any mix of new modutils and old kernels will work, even down to kernel 2.0. But since the USB maintainers are refusing to support USB on anything older than 2.4.0, I have no choice but to break backwards compatibility.

ChangeLog +10 -0
diff -Nur modutils-2.4.1/ChangeLog modutils-2.4.2/ChangeLog
@@ -1,3 +1,13 @@
+2001-01-23  Keith Owens  <[email protected]>
+
+	modutils 2.4.2
+
+	* genksym changes: Remove 'attribute' as a C keyword, add 'restrict',
+	  '__restrict', '__restrict__', '_Bool'.  Thanks to Richard Henderson.
+	* Log modprobe commands in /var/log/ksymoops.  This one's for Wichert.
+	* Revert to a single USB table format.  USB maintainers will not support
+	  anybody on 2.4.0-prerelease or earlier.
+
 2001-01-09  Keith Owens  <[email protected]>
 
 	modutils 2.4.1
depmod/depmod.c +29 -20

141 lines not on this page · raw message

genksyms/genksyms.c +6 -3
diff -Nur modutils-2.4.1/genksyms/genksyms.c modutils-2.4.2/genksyms/genksyms.c
@@ -20,7 +20,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#ident "$Id: genksyms.c 1.1 Fri, 05 Jan 2001 12:45:19 +1100 kaos $"
+#ident "$Id: genksyms.c 1.2 Sun, 14 Jan 2001 23:06:24 +1100 kaos $"
 
 #include <stdio.h>
 #include <string.h>
@@ -111,7 +111,7 @@
 }
 
 struct symbol *
-add_symbol(const char *name, enum symbol_type type, struct string_list *defn)
+add_symbol(const char *name, enum symbol_type type, struct string_list *defn, int is_extern)
 {
   unsigned long h = crc32(name) % HASH_BUCKETS;
   struct symbol *sym;
@@ -130,6 +130,7 @@
   sym->type = type;
   sym->defn = defn;
   sym->expansion_trail = NULL;
+  sym->is_extern = is_extern;
 
   sym->hash_next = symtab[h];
   symtab[h] = sym;
@@ -137,6 +138,8 @@
   if (flag_debug)
     {
       fprintf(debugfile, "Defn for %s %s = <", symbol_type_name[type],  name);
+      if (is_extern)
+        fputs("extern ", debugfile);
       print_list(debugfile, defn);
       fputs(">\n", debugfile);
     }
@@ -350,7 +353,7 @@
 	      n->tag = SYM_NORMAL;
 	      n->next = t;
 
-	      subsym = add_symbol(cur->string, cur->tag, n);
+	      subsym = add_symbol(cur->string, cur->tag, n, 0);
 	    }
 	  if (subsym->expansion_trail)
 	    {
genksyms/genksyms.h +3 -2
diff -Nur modutils-2.4.1/genksyms/genksyms.h modutils-2.4.2/genksyms/genksyms.h
@@ -24,7 +24,7 @@
 #ifndef MODUTILS_GENKSYMS_H
 #define MODUTILS_GENKSYMS_H 1
 
-#ident "$Id: genksyms.h 1.1 Fri, 05 Jan 2001 12:45:19 +1100 kaos $"
+#ident "$Id: genksyms.h 1.2 Sun, 14 Jan 2001 23:06:24 +1100 kaos $"
 
 #include <stdio.h>
 
@@ -47,6 +47,7 @@
   enum symbol_type type;
   struct string_list *defn;
   struct symbol *expansion_trail;
+  int is_extern;
 };
 
 typedef struct string_list **yystype;
@@ -66,7 +67,7 @@
 
 struct symbol *find_symbol(const char *name, enum symbol_type ns);
 struct symbol *add_symbol(const char *name, enum symbol_type type,
-			   struct string_list *defn);
+			   struct string_list *defn, int is_extern);
 void export_symbol(const char *);
 
 struct string_list *reset_list(void);
genksyms/keywords.c +109 -90

223 lines not on this page · raw message

genksyms/keywords.gperf +10 -2
diff -Nur modutils-2.4.1/genksyms/keywords.gperf modutils-2.4.2/genksyms/keywords.gperf
@@ -1,5 +1,5 @@
 %{
-#ident "$Id: keywords.gperf 1.1 Fri, 05 Jan 2001 12:45:19 +1100 kaos $"
+#ident "$Id: keywords.gperf 1.2 Sun, 14 Jan 2001 23:06:24 +1100 kaos $"
 %}
 struct resword { const char *name; int token; }
 %%
@@ -16,8 +16,16 @@
 __signed__, SIGNED_KEYW
 __volatile, VOLATILE_KEYW
 __volatile__, VOLATILE_KEYW
+# According to rth, c99 defines _Bool, __restrict, __restrict__, restrict.  KAO
+_Bool, BOOL_KEYW
+_restrict, RESTRICT_KEYW
+__restrict__, RESTRICT_KEYW
+restrict, RESTRICT_KEYW
 asm, ASM_KEYW
-attribute, ATTRIBUTE_KEYW
+# attribute commented out in modutils 2.4.2.  People are using 'attribute' as a
+# field name which breaks the genksyms parser.  It is not a gcc keyword anyway.
+# KAO.
+#   attribute, ATTRIBUTE_KEYW
 auto, AUTO_KEYW
 char, CHAR_KEYW
 const, CONST_KEYW
genksyms/parse.y +31 -18

149 lines not on this page · raw message

include/util.h +2 -1
diff -Nur modutils-2.4.1/include/util.h modutils-2.4.2/include/util.h
@@ -23,7 +23,7 @@
 #ifndef MODUTILS_UTIL_H
 #define MODUTILS_UTIL_H 1
 
-#ident "$Id: util.h 1.1 Fri, 05 Jan 2001 12:45:19 +1100 kaos $"
+#ident "$Id: util.h 1.2 Fri, 19 Jan 2001 17:26:33 +1100 kaos $"
 
 #include <stdio.h>
 #include <sys/stat.h>
@@ -76,6 +76,7 @@
 #define ME_ALL			(ME_GLOB|ME_SHELL_COMMAND|ME_BUILTIN_COMMAND)
 
 extern void snap_shot(const char *module_name, int number);
+extern void snap_shot_log(const char *fmt,...);
 
 #ifdef CONFIG_USE_ZLIB
 int gzf_open(const char *name, int mode);
include/version.h +1 -1
diff -Nur modutils-2.4.1/include/version.h modutils-2.4.2/include/version.h
@@ -1 +1 @@
-#define MODUTILS_VERSION "2.4.1"
+#define MODUTILS_VERSION "2.4.2"
insmod/modprobe.c +27 -1
diff -Nur modutils-2.4.1/insmod/modprobe.c modutils-2.4.2/insmod/modprobe.c
@@ -1503,6 +1503,17 @@
 		{"help", 0, 0, 'h'},
 		{0, 0, 0, 0}
 	};
+	int i, l = 0;
+	char *command;
+
+	for (i = 0; i < argc; ++i)
+		l += strlen(argv[i]) + 1;
+	command = alloca(l);
+	*command = '\0';
+	for (i = 0; i < argc; ++i) {
+		strcat(command, argv[i]);
+		strcat(command, " ");
+	}
 
 	error_file = "modprobe";
 
@@ -1644,6 +1655,8 @@
 	if (showconfig)
 		config_show();
 	else if (remove) {
+		if (runit)
+			snap_shot_log("start %ssafemode=%d", command, safemode);
 		if (argc > 0) {
 			int errs;
 			for (errs = 0; argc > 0; ++argv, --argc) {
@@ -1667,8 +1680,11 @@
 			struct module_stat *m;
 			int i;
 
-			if (!get_kernel_info(K_INFO | K_REFS))
+			if (!get_kernel_info(K_INFO | K_REFS)) {
+				if (runit)
+					snap_shot_log("get_kernel_info failed");
 				return 1;
+			}
 			for (m = module_stat, i = 0; i < n_module_stat; ++i, ++m) {
 				if ((m->flags & NEW_MOD_AUTOCLEAN) &&
 				    ((m->flags & NEW_MOD_VISITED) = 0) &&
@@ -1684,10 +1700,16 @@
 			 */
 			verbose("# autoclean\n");
 			if (runit && delete_module(NULL)) {
+				int save_errno = errno;
 				perror("rmmod");
+				errno = save_errno;
+				if (runit)
+					snap_shot_log("delete_module(NULL) failed %m");
 				return 1;
 			}
 		}
+		if (runit)
+			snap_shot_log("rmmod returned %d", ret);
 	} else if (list) {
 		if (argc > 0)
 			for (; argc > 0 && ret = 0; ++argv, --argc) {
@@ -1696,11 +1718,15 @@
 		else
 			modprobe_printlist("*", type);
 	} else { /* probe module list */
+		if (runit)
+			snap_shot_log("start %ssafemode=%d", command, safemode);
 		if (argc > 0) {
 			ret = modprobe_fromlist(argc, argv, type, loadall);
 		}
 		else
 			modprobe_nothing("load");
+		if (runit)
+			snap_shot_log("probe ended");
 	}
 
 	return ret;
man/modprobe.8 +9 -1
diff -Nur modutils-2.4.1/man/modprobe.8 modutils-2.4.2/man/modprobe.8
@@ -2,7 +2,7 @@
 .\" Copyright (c) 1995, 1999 Bjorn Ekwall ([email protected])
 .\" This program is distributed according to the Gnu General Public License.
 .\" See the file COPYING in the base distribution directory
-.\" $Id: modprobe.8 1.1 Fri, 05 Jan 2001 12:45:19 +1100 kaos $
+.\" $Id: modprobe.8 1.2 Fri, 19 Jan 2001 17:26:33 +1100 kaos $
 .\"
 .TH MODPROBE 8 "March 15, 1999" Linux "Linux Module Support"
 .SH NAME
@@ -275,6 +275,14 @@
 This detects modprobe execution from the kernel on kernels 2.2 though
 2.4.0-test11, even if uid = euid, which it does on the earlier
 kernels.
+.SH "LOGGING COMMANDS"
+If directory /var/log/ksymoops exists and modprobe is run with an
+option that could load or a delete a module then modprobe will log its
+command and return status in /var/log/ksymoops/`date\ +%Y%m%d.log`.
+There is no switch to disable this automatic logging, if you do not
+want it to occur, do not create /var/log/ksymoops.  If that directory
+exists, it should be owned by root and be mode 644 or 600 and you
+should run script insmod_ksymoops_clean every day or so.
 .SH REQUIRED UTILITIES
 depmod(8),
 insmod(8)
modutils.spec +1 -1
diff -Nur modutils-2.4.1/modutils.spec modutils-2.4.2/modutils.spec
@@ -1,6 +1,6 @@
 Summary: Module utilities
 Name: modutils
-Version: 2.4.1
+Version: 2.4.2
 Release: 1
 Copyright: GPL
 Group: Utilities/System
util/snap_shot.c +45 -2

72 lines not on this page · raw message

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 2 lines · Miles Lane

Hey. Let's be fair here. Linus rejected your patch for reasons that had absolutely nothing to do with USB backport support issues.

On the contrary. Linus rejected the patch because

"I'd much rather just have the 2.4.0 behaviour, and no versioning. Tell people that 2.4.0-test kernels won't work. They'll notice on their own."

and

"The fact that such modutils binaries won't work with pre-2.4.0 kernels is not even on my radar screen, quite frankly. There isn't even an installed base of people using it, and I don't think anybody of the developers using it are still using pre-kernels. In short, I see absolutely no reason for even trying to maintain any backwards compatibility in this area.".

Because the USB maintainers did not want to support backwards compatibility, Linus saw no need for the patch. Which is fine, if you are happy to break backwards compatibility. It should be obvious that I disagree strongly with this attitude.

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Keith Owens
Quoted 9 lines · Keith Owens

Please test this modutils patch ASAP, at least one distribution is waiting to burn their master CD for kernel 2.4.0. Remove patch-2.4.0-hotplug from the kernel if you have installed it.

This patch is being released under protest. It completely drops support for USB device ids on kernel 2.4.0-prerelease and earlier. That will break USB support for anybody who installs modutils 2.4.2 and tries to run a kernel before 2.4.0.

Quoted 6 lines

Breaking backwards compatibility goes completely against the grain for modutils. It goes to a lot of bother to support users on older kernels and to ensure that any mix of new modutils and old kernels will work, even down to kernel 2.0. But since the USB maintainers are refusing to support USB on anything older than 2.4.0, I have no choice but to break backwards compatibility.

Hey. Let's be fair here. Linus rejected your patch for reasons that had absolutely nothing to do with USB backport support issues. Rather, the kernel version tracking was rejected because Linus wants that functionality added in 2.5 in a careful manner. I'm not saying your patch wasn't perfect and thoughtful. I thought your patch looked great, but I don't control kernel checkins.

Regarding the USB backport support, the usbd and kernel policy stuff that David Brownell and others develops works great for that environment. There are several important functional holes in the backport. One of them being in the USB Storage area. If I understand this correctly, these are holes that are intrinsic to the older kernel and are not easily worked around. All that to say that noone using a 2.2 kernel is going to be in USB nirvana anyhow, though it works quite well.
Be assured, I'll be delighted when Linus accepts your patch and modutils can support kernel version tracking so that modutils can better support and handle ABI changes. We are all just rolling with Linus. He is calling the shots, here.

I appreciate you getting this functional change into 2.4.2 so that USB users in the 2.4.0 series can use hotplugging. I'll test your patch immediately.

Best wishes,

Miles

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Keith Owens

But "pre-2.4.0" (I read between the lines) didn't include 2.2.x in this context.

Quoted 31 lines · Keith Owens
Quoted 2 lines · Miles Lane

Hey. Let's be fair here. Linus rejected your patch for reasons that had absolutely nothing to do with USB backport support issues.

On the contrary. Linus rejected the patch because

"I'd much rather just have the 2.4.0 behaviour, and no versioning. Tell people that 2.4.0-test kernels won't work. They'll notice on their own."

and

"The fact that such modutils binaries won't work with pre-2.4.0 kernels is not even on my radar screen, quite frankly. There isn't even an installed base of people using it, and I don't think anybody of the developers using it are still using pre-kernels. In short, I see absolutely no reason for even trying to maintain any backwards compatibility in this area.".

Because the USB maintainers did not want to support backwards compatibility, Linus saw no need for the patch. Which is fine, if you are happy to break backwards compatibility. It should be obvious that I disagree strongly with this attitude.

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

Signature · 12 lines
 /------------------------------+-=-=-=-=-+-------------------------\
|Stephen J. Gowdy               |A4000/040| Mail Stop 50A-2160, LBL, |
|http://www.ph.ed.ac.uk/~gowdy/ | 1GB   HD| 1 Cyclotron Rd, Berkeley,|
|                               |20MB  RAM| CA 94720, USA            |
|InterNet: [email protected]       |3.4xCDROM| Tel: +1 510 495 2796     |
 \------------------------------+-=-=-=-=-+-------------------------/


_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#4 lore raw
In reply to Keith Owens

Keith Owens wrote:

<snip>

Quoted 11 lines

"The fact that such modutils binaries won't work with pre-2.4.0 kernels is not even on my radar screen, quite frankly. There isn't even an installed base of people using it, and I don't think anybody of the developers using it are still using pre-kernels. In short, I see absolutely no reason for even trying to maintain any backwards compatibility in this area.".

Because the USB maintainers did not want to support backwards compatibility, Linus saw no need for the patch. Which is fine, if you are happy to break backwards compatibility. It should be obvious that I disagree strongly with this attitude.

Thanks for clarifying that. I hadn't quite connected all the dots.

I see why you are concerned.

Isn't it true that the /sbin/hotplug support code simply doesn't exist in older kernels? I am not sure that making /sbin/hotplug work on older kernels is possible, no matter how much USB developers might want to make it work. If it is true that backporting /sbin/hotplug support can't be done, than the current usbd/policy approach is filling an important need. Another point to consider is that if we decided to somehow backport /sbin/hotplug support, we'd need to migrate the installed based from the policy script approach. That doesn't seem like totally awesome user support to me.

Anyhow, enough said. I'll test your patch.

Sorry this hasn't worked out as you would have liked.

Miles

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#5 lore raw
In reply to Keith Owens
Quoted 20 lines · Keith Owens
Quoted 2 lines · Miles Lane

Hey. Let's be fair here. Linus rejected your patch for reasons that had absolutely nothing to do with USB backport support issues.

On the contrary. Linus rejected the patch because

"I'd much rather just have the 2.4.0 behaviour, and no versioning. Tell people that 2.4.0-test kernels won't work. They'll notice on their own."

and

"The fact that such modutils binaries won't work with pre-2.4.0 kernels is not even on my radar screen, quite frankly. There isn't even an installed base of people using it, and I don't think anybody of the developers using it are still using pre-kernels. In short, I see absolutely no reason for even trying to maintain any backwards compatibility in this area.".

Quoted 4 lines

Because the USB maintainers did not want to support backwards compatibility, Linus saw no need for the patch. Which is fine, if you are happy to break backwards compatibility. It should be obvious that I disagree strongly with this attitude.

Just to clarify, I see no reason for supporting backwards compatibility with development kernels. I completely agree with Linus wrt to this decision.

As for 2.2 kernels, that's a different matter. It's essentially a fork the 2.4 code which has been tracking changes and backporting them as necessary.

Hotplugging is another whole ball of wax in 2.2.

JE

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#6 lore raw
In reply to Keith Owens

Thanks for the modutils update, Keith. Too bad this has been such a mess to get straight -- that 2.4.0final patch caught most folk by surprise!

Quoted 4 lines
Quoted 4 lines

Because the USB maintainers did not want to support backwards compatibility, Linus saw no need for the patch. Which is fine, if you are happy to break backwards compatibility. It should be obvious that I disagree strongly with this attitude.

Put it differently: If you want to use 2.4.0-test (and prerelease) kernels, use the 2.3.* modutils.

As it stands, we saw a bug report this morning about how 2.4 modutils broke hotplugging with 2.2 kernels, since it created unusable (empty) "usbmap" files ... you're not as backwards-compatible as you may think you are!

I think it's reasonable not to want to support 2.4-test kernels; anyone trying to use one of them has no reason to expect support.

Quoted 2 lines

Isn't it true that the /sbin/hotplug support code simply doesn't exist in older kernels?

No; it's in the 2.2 backport (thanks to Greg) and current hotplug scripts should work on 2.2 kernels too. If (!) people don't try to use the 2.4 modutils ... the empty/unusable "usbmap" breaks things. One more point on the "no *_device_id => no mapfile" side. That can be kluged around in usermode, but it's an incompatibility.

- Dave

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#7 lore raw
In reply to Keith Owens
Quoted 4 lines · David Brownell

As it stands, we saw a bug report this morning about how 2.4 modutils broke hotplugging with 2.2 kernels, since it created unusable (empty) "usbmap" files ... you're not as backwards-compatible as you may think you are!

Switching between kernels is not supposed to require changes to user space utilities. Now you have to use modutils 2.3 on 2.2 kernels and modutils 2.4 on 2.4 kernels, that will really annoy people flipping from one kernel to the other. If somebody would tell me about these things then I could fix them! I even asked about 2.2 support for USB earlier in the week and got no replies. Where is the 2.2 backport for USB?

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#8 lore raw
In reply to Keith Owens
Quoted 7 lines · Keith Owens
Quoted 4 lines · David Brownell

As it stands, we saw a bug report this morning about how 2.4 modutils broke hotplugging with 2.2 kernels, since it created unusable (empty) "usbmap" files ... you're not as backwards-compatible as you may think you are!

Quoted 7 lines

Switching between kernels is not supposed to require changes to user space utilities. Now you have to use modutils 2.3 on 2.2 kernels and modutils 2.4 on 2.4 kernels, that will really annoy people flipping from one kernel to the other. If somebody would tell me about these things then I could fix them! I even asked about 2.2 support for USB earlier in the week and got no replies. Where is the 2.2 backport for USB?

It was integrated into the main kernel tree somewhere in the 2.2.18 pre patches.

JE

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#9 lore raw
In reply to Keith Owens
Quoted 4 lines · David Brownell

As it stands, we saw a bug report this morning about how 2.4 modutils broke hotplugging with 2.2 kernels, since it created unusable (empty) "usbmap" files ... you're not as backwards-compatible as you may think you are!

Having found the 2.2 backport, it is obvious that it does not use _any_ modutils support. So an empty usbmap is perfectly correct and is backwards compatible. No modules have MODULE_DEVICE_TABLE(usb) so the usbmap file is empty. Where's your problem?

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#10 lore raw
In reply to Keith Owens
Quoted 7 lines · Keith Owens
Quoted 4 lines · David Brownell

As it stands, we saw a bug report this morning about how 2.4 modutils broke hotplugging with 2.2 kernels, since it created unusable (empty) "usbmap" files ... you're not as backwards-compatible as you may think you are!

Quoted 7 lines

Switching between kernels is not supposed to require changes to user space utilities. Now you have to use modutils 2.3 on 2.2 kernels and modutils 2.4 on 2.4 kernels, that will really annoy people flipping from one kernel to the other. If somebody would tell me about these things then I could fix them! I even asked about 2.2 support for USB earlier in the week and got no replies. Where is the 2.2 backport for USB?

It's in the 2.2.18 kernel proper now. And there are updates in the 2.2.19-pre series.

But you are correct, there is no module table support yet.

If I do get hotplug support working in 2.2.x with the modtables stuff, I will use the same format that 2.4.x has, so no change will be needed for modutils (you will not have to switch modutils between kernel versions) and you will not have to upgrade if you do not want to have the hotplug stuff work as well as it could.

Also, I sent the following message both to you and the list last week when you asked about USB hotplug support in 2.2.x:

--------------------------------------------------------

Quoted 3 lines · Keith Owens

Some people have mentioned usb hotplug support on 2.2 kernels, as an add on patch. Does it use depmod or does it use a separate hand built table? If it uses depmod, what does struct usb_device_id look like?

I had talked about doing the backport patch if others thought it would be a good idea, but hadn't gotten to it yet. I don't know of any existing patches that do this (if there are, could someone point me to them?)

I was thinking of using depmod, but due to the latest "mess" with the structures, I hadn't decided what the usb_device_id format would look like. I am leaning toward whatever 2.4.x looks like, to try to preserve compatibility as much as I can.

I also was/am going to test the crap out of it with older versions of modutils, so as not to require any upgrades if the user didn't want to have hotplug support (one of the 2.2.x requirements).

Does that all sound ok?

thanks,

greg k-h

Signature · 6 lines
greg@(kroah|wirex).com

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#11 lore raw
In reply to Keith Owens

Ah, but the hotplug utilities use it.

A pure 2.2 system (kernel + modutils) has no "modules.*map" files. A pure 2.4 system (ditto) does have them.

But 2.2.18 kernel + 2.4 modutils will generate "modules.*map" files, which is not compatible with the previous behavior of 2.2 modutils with such kernels.

I forget (haven't used 2.2 in a long time) -- does 2.4 modutils keep to the 2.2 style module tree on 2.2 kernels, or does it change that around too?

- Dave

----- Original Message -----
From: Keith Owens <[email protected]>
To: David Brownell <[email protected]>
Cc: <[email protected]>
Sent: Monday, January 22, 2001 2:51 PM
Subject: Re: modutils 2.4.2, please test asap

Quoted 7 lines
Quoted 4 lines · David Brownell

As it stands, we saw a bug report this morning about how 2.4 modutils broke hotplugging with 2.2 kernels, since it created unusable (empty) "usbmap" files ... you're not as backwards-compatible as you may think you are!

Quoted 5 lines

Having found the 2.2 backport, it is obvious that it does not use _any_ modutils support. So an empty usbmap is perfectly correct and is backwards compatible. No modules have MODULE_DEVICE_TABLE(usb) so the usbmap file is empty. Where's your problem?

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#12 lore raw
In reply to Keith Owens

Hi Keith,

Your patch is working great for me.
I have tested a USB Mouse, a USB port aggregator (3 USB, 1 Parallel, 1 Serial) and my USB Storage device (a Castlewood ORB drive). They all hotplugged beautifully.

I have been running up against USB bugs, but your 2.4.2 modutils is working like a charm.

Thanks again,

Miles

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#13 lore raw
In reply to Keith Owens
Quoted 8 lines · David Brownell

Ah, but the hotplug utilities use it.

A pure 2.2 system (kernel + modutils) has no "modules.*map" files. A pure 2.4 system (ditto) does have them.

But 2.2.18 kernel + 2.4 modutils will generate "modules.*map" files, which is not compatible with the previous behavior of 2.2 modutils with such kernels.

Tricky. Something has to know whether to use modules.usbmap or not on 2.2. This is one occasion when _not_ creating a file might be the correct approach. If I change modutils 2.4.2 to unlink existing map files and only create a new map file if at least one module contains that map, will that fix the 2.2 problem?

What, if anything, will break if maps files are not always created?

Quoted 3 lines

I forget (haven't used 2.2 in a long time) -- does 2.4 modutils keep to the 2.2 style module tree on 2.2 kernels, or does it change that around too?

Modutils 2.4 handles both directory styles under /lib/modules/<version>, for backwards compatibility. It is the kernel Makefile which sets the directory style for /lib/modules and there are no plans to backport the 2.4 style to 2.2. AC will not take a 2.2 kernel patch that forces users to upgrade their user space utilities.

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#14 lore raw
In reply to Keith Owens
Quoted 10 lines

From: Keith Owens <[email protected]>
Sent: Monday, January 22, 2001 3:42 PM

Quoted 5 lines · David Brownell

Ah, but the hotplug utilities use it.

A pure 2.2 system (kernel + modutils) has no "modules.*map" files. A pure 2.4 system (ditto) does have them.

Quoted 7 lines
Quoted 3 lines

But 2.2.18 kernel + 2.4 modutils will generate "modules.*map" files, which is not compatible with the previous behavior of 2.2 modutils with such kernels.

Tricky. Something has to know whether to use modules.usbmap or not on 2.2. This is one occasion when _not_ creating a file might be the correct approach.

It'd certainly be more convenient for 2.2 based systems.

Quoted 3 lines

If I change modutils 2.4.2 to unlink existing map
files and only create a new map file if at least one module contains that map, will that fix the 2.2 problem?

Yes. Though given what you say below, I wonderif a better fix would be to never create "modules.usbmap" if there are 2.2 style /lib/modules/ directories. (That is, make the backwards compatibility mode cover all the features that changed.)

Quoted 1 line

What, if anything, will break if maps files are not always created?

Likely nothing will break, but the 2.4 systems might get a bit confused (falling back to usb.distmap)which _might_ cause something to break. I'll have to think about it.

- Dave

Quoted 10 lines
Quoted 3 lines

I forget (haven't used 2.2 in a long time) -- does 2.4 modutils keep to the 2.2 style module tree on 2.2 kernels, or does it change that around too?

Modutils 2.4 handles both directory styles under /lib/modules/<version>, for backwards compatibility. It is the kernel Makefile which sets the directory style for /lib/modules and there are no plans to backport the 2.4 style to 2.2. AC will not take a 2.2 kernel patch that forces users to upgrade their user space utilities.

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#15 lore raw
In reply to Keith Owens
Quoted 4 lines · David Brownell

Yes. Though given what you say below, I wonderif a better fix would be to never create "modules.usbmap" if there are 2.2 style /lib/modules/ directories. (That is, make the backwards compatibility mode cover all the features that changed.)

Not reliable enough. Some installers still create 2.2 style libraries even on 2.4. Modutils handles both styles, giving preference to modules stored in the 2.4 style, but it reads all modules under /lib/modules/<version>.

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel