Skip to contentSkip to conversation

Add EXPORT_SYMBOL for hotplug_path

PATCH In review Tom Rini 7 participants 13 messages May 19, 2005 – May 20, 2005

Subsystems (3)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 Add EXPORT_SYMBOL for hotplug_path

If CONFIG_INPUT is set as a module, it will not load as hotplug_path is not a defined symbol. Trivial fix is to EXPORT_SYMBOL hotplug_path.

lib/kobject_uevent.c (mode:100644) +2 -0
Index: lib/kobject_uevent.c
===================================================================
@@ -21,6 +21,7 @@
 #include <linux/string.h>
 #include <linux/kobject_uevent.h>
 #include <linux/kobject.h>
+#include <linux/module.h>
 #include <net/sock.h>
 
 #define BUFFER_SIZE	1024	/* buffer for the hotplug env */
@@ -178,6 +179,7 @@
 
 #ifdef CONFIG_HOTPLUG
 char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug";
+EXPORT_SYMBOL(hotplug_path);
 u64 hotplug_seqnum;
 static DEFINE_SPINLOCK(sequence_lock);
 
Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#1 lore raw
Quoted 2 lines · Tom Rini

If CONFIG_INPUT is set as a module, it will not load as hotplug_path is not a defined symbol. Trivial fix is to EXPORT_SYMBOL hotplug_path.

shouldn't this be a _GPL export since it's quite internal to linux...

author
#2 lore raw
Quoted 5 lines · Arjan van de Ven
Quoted 2 lines · Tom Rini

If CONFIG_INPUT is set as a module, it will not load as hotplug_path is not a defined symbol. Trivial fix is to EXPORT_SYMBOL hotplug_path.

shouldn't this be a _GPL export since it's quite internal to linux...

Doesn't matter to me.

lib/kobject_uevent.c (mode:100644) +2 -0
Index: lib/kobject_uevent.c
===================================================================
@@ -21,6 +21,7 @@
 #include <linux/string.h>
 #include <linux/kobject_uevent.h>
 #include <linux/kobject.h>
+#include <linux/module.h>
 #include <net/sock.h>
 
 #define BUFFER_SIZE	1024	/* buffer for the hotplug env */
@@ -178,6 +179,7 @@
 
 #ifdef CONFIG_HOTPLUG
 char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug";
+EXPORT_SYMBOL_GPL(hotplug_path);
 u64 hotplug_seqnum;
 static DEFINE_SPINLOCK(sequence_lock);
 
Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#3 lore raw
Quoted 24 lines · Tom Rini
Quoted 5 lines · Arjan van de Ven
Quoted 2 lines · Tom Rini

If CONFIG_INPUT is set as a module, it will not load as hotplug_path is not a defined symbol. Trivial fix is to EXPORT_SYMBOL hotplug_path.

shouldn't this be a _GPL export since it's quite internal to linux...

Doesn't matter to me.

Index: lib/kobject_uevent.c
===================================================================

lib/kobject_uevent.c (mode:100644) +1 -0
@@ -21,6 +21,7 @@
 #include <linux/string.h>
 #include <linux/kobject_uevent.h>
 #include <linux/kobject.h>
+#include <linux/module.h>
 #include <net/sock.h>
 
 #define BUFFER_SIZE	1024	/* buffer for the hotplug env */

lib/kobject_uevent.c (mode:100644) line 184

Quoted 6 lines
lib/kobject_uevent.c (mode:100644) +1 -0
@@ -178,6 +179,7 @@
 
 #ifdef CONFIG_HOTPLUG
 char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug";
+EXPORT_SYMBOL_GPL(hotplug_path);
 u64 hotplug_seqnum;
 static DEFINE_SPINLOCK(sequence_lock);

ACK, I hit this a few days ago too, and did an identical patch for the Fedora kernel. In addition, there was also this one..

Signed-off-by Dave Jones <davejredhat.com>

WARNING:
/usr/src/build/566509-ppc64iseries/install/lib/modules/2.6.11-1.1311_FC4/kernel/drivers/input/input.ko needs unknown symbol add_input_randomness

drivers/char/random.c renamed from drivers/char/random.c~ +1 -0
@@ -646,6 +646,7 @@ extern void add_input_randomness(unsigne
 	add_timer_randomness(&input_timer_state,
 			     (type << 4) ^ code ^ (code >> 4) ^ value);
 }
+EXPORT_SYMBOL_GPL(add_input_randomness);
 
 void add_interrupt_randomness(int irq)
 {
#4 lore raw
In reply to Tom Rini
Quoted 4 lines · Tom Rini

If CONFIG_INPUT is set as a module, it will not load as hotplug_path is not a defined symbol. Trivial fix is to EXPORT_SYMBOL hotplug_path.

Ick, no, I thought we got rid of that usage. no one should be calling hotplug on their own, lots of bad things happen to udevd and HAL if they do.

What caused the input code to be added back into the kernel? I'll try to go track that down...

thanks,

greg k-h

#5 lore raw
Quoted 4 lines · Greg KH
Quoted 3 lines · Tom Rini

If CONFIG_INPUT is set as a module, it will not load as hotplug_path is not a defined symbol. Trivial fix is to EXPORT_SYMBOL hotplug_path.

Quoted 9 lines
Quoted 1 line

Ick, no, I thought we got rid of that usage. no one should be calling hotplug on their own, lots of bad things happen to udevd and HAL if they do.

What caused the input code to be added back into the kernel? I'll try to go track that down...

The change never made it into the kernel. And I need to finish proper input_dev sysfs conversion...

Signature · 1 line
Dmitry
#6 lore raw
Quoted 11 lines · Dmitry Torokhov
Quoted 10 lines · Greg KH
Quoted 4 lines · Tom Rini

If CONFIG_INPUT is set as a module, it will not load as hotplug_path is not a defined symbol. Trivial fix is to EXPORT_SYMBOL hotplug_path.

Ick, no, I thought we got rid of that usage. no one should be calling hotplug on their own, lots of bad things happen to udevd and HAL if they do.

Quoted 6 lines
Quoted 3 lines

What caused the input code to be added back into the kernel? I'll try to go track that down...

The change never made it into the kernel. And I need to finish proper input_dev sysfs conversion...

Ah, ok, thanks. So I'll ACK the EXPORT_SYMBOL_GPL() version of this patch for now.

thanks,

greg k-h

#7 lore raw
In reply to Tom Rini
Quoted 18 lines · Tom Rini

If CONFIG_INPUT is set as a module, it will not load as hotplug_path is not a defined symbol. Trivial fix is to EXPORT_SYMBOL hotplug_path.

Index: lib/kobject_uevent.c
===================================================================

lib/kobject_uevent.c (mode:100644) +1 -0
@@ -21,6 +21,7 @@
 #include <linux/string.h>
 #include <linux/kobject_uevent.h>
 #include <linux/kobject.h>
+#include <linux/module.h>
 #include <net/sock.h>
 
 #define BUFFER_SIZE	1024	/* buffer for the hotplug env */

lib/kobject_uevent.c (mode:100644) line 184

Quoted 6 lines
lib/kobject_uevent.c (mode:100644) +1 -0
@@ -178,6 +179,7 @@
 
 #ifdef CONFIG_HOTPLUG
 char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug";
+EXPORT_SYMBOL(hotplug_path);
 u64 hotplug_seqnum;
 static DEFINE_SPINLOCK(sequence_lock);

Please don't export it again. We're on the way to make it private. Nobody should ever have access to it outside of the driver core. The input layer event stuff is completely broken and we are already working on fixing this to use the driver core instead of calling /sbin/hotplug, which is completely nonsense these days.

Thanks,
Kay

author
#8 lore raw
Quoted 20 lines · Kay Sievers
Quoted 19 lines · Tom Rini

If CONFIG_INPUT is set as a module, it will not load as hotplug_path is not a defined symbol. Trivial fix is to EXPORT_SYMBOL hotplug_path.

Index: lib/kobject_uevent.c
===================================================================

lib/kobject_uevent.c (mode:100644) +1 -0
@@ -21,6 +21,7 @@
 #include <linux/string.h>
 #include <linux/kobject_uevent.h>
 #include <linux/kobject.h>
+#include <linux/module.h>
 #include <net/sock.h>
 
 #define BUFFER_SIZE	1024	/* buffer for the hotplug env */
@@ -178,6 +179,7 @@
 
Quoted 11 lines

lib/kobject_uevent.c (mode:100644) line 184

Quoted 5 lines
lib/kobject_uevent.c (mode:100644) +1 -0
 #ifdef CONFIG_HOTPLUG
 char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug";
+EXPORT_SYMBOL(hotplug_path);
 u64 hotplug_seqnum;
 static DEFINE_SPINLOCK(sequence_lock);

Please don't export it again. We're on the way to make it private. Nobody should ever have access to it outside of the driver core. The input layer event stuff is completely broken and we are already working on fixing this to use the driver core instead of calling /sbin/hotplug, which is completely nonsense these days.

So Greg said he's ACK this since the "make it private" stuff isn't done yet. Will this go in or no?

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#9 lore raw
Quoted 33 lines · Tom Rini
Quoted 20 lines · Kay Sievers
Quoted 19 lines · Tom Rini

If CONFIG_INPUT is set as a module, it will not load as hotplug_path is not a defined symbol. Trivial fix is to EXPORT_SYMBOL hotplug_path.

Index: lib/kobject_uevent.c
===================================================================

lib/kobject_uevent.c (mode:100644) +1 -0
@@ -21,6 +21,7 @@
 #include <linux/string.h>
 #include <linux/kobject_uevent.h>
 #include <linux/kobject.h>
+#include <linux/module.h>
 #include <net/sock.h>
 
 #define BUFFER_SIZE	1024	/* buffer for the hotplug env */
@@ -178,6 +179,7 @@
 
Quoted 11 lines

lib/kobject_uevent.c (mode:100644) line 184

Quoted 5 lines
lib/kobject_uevent.c (mode:100644) +1 -0
 #ifdef CONFIG_HOTPLUG
 char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug";
+EXPORT_SYMBOL(hotplug_path);
 u64 hotplug_seqnum;
 static DEFINE_SPINLOCK(sequence_lock);

Please don't export it again. We're on the way to make it private. Nobody should ever have access to it outside of the driver core. The input layer event stuff is completely broken and we are already working on fixing this to use the driver core instead of calling /sbin/hotplug, which is completely nonsense these days.

Quoted 2 lines

So Greg said he's ACK this since the "make it private" stuff isn't done yet. Will this go in or no?

Well, it doesn't depend on "make it private" it depends on Dimitry, who wanted to tweak our patch for the input layer. But we wait for weeeks for that. The SUSE kernel already ships a driver-core input layer without the /sbin/hotplug stuff.

Kay

#10 lore raw
Quoted 6 lines · Kay Sievers

Well, it doesn't depend on "make it private" it depends on Dimitry, who wanted to tweak our patch for the input layer. But we wait for weeeks for that. The SUSE kernel already ships a driver-core input layer without the /sbin/hotplug stuff.

Kay,

I am sorry for being slow with these patches but I really do spend all time that I can on kernel. Unfortunately, there are also other input problems (KVMs causing mice lose sync), and since BK is gone and there is a big backlog of input patches in Vojtech's tree I am unable to get patches easily in mm. I was thinking about creating a git tree or a quilt export but I don't have a place to host them ;(

Signature · 1 line
Dmitry
#11 lore raw
Quoted 8 lines · Dmitry Torokhov
Quoted 6 lines · Kay Sievers

Well, it doesn't depend on "make it private" it depends on Dimitry, who wanted to tweak our patch for the input layer. But we wait for weeeks for that. The SUSE kernel already ships a driver-core input layer without the /sbin/hotplug stuff.

Quoted 4 lines

Kay,

I am sorry for being slow with these patches but I really do spend all time that I can on kernel.

Oh well, I know that problem. :) We need to move completely away from unmanaged kernel-forked processes in the hotplug area. SUSE 9.3 already ships a udevd that listens only on netlink for hotplug messages and /proc/sys/kernel/hotplug is set to "".
Hannes converted the input layer to a input_device class to get the event through netlink. Maybe you can have a second look at it, so that we can get that thing upstream soon to fix the last broken hotplug-user and make hotplug_path finally private.

Thanks,
Kay

#12 lore raw
Quoted 14 lines · Kay Sievers
Quoted 8 lines · Dmitry Torokhov
Quoted 6 lines · Kay Sievers

Well, it doesn't depend on "make it private" it depends on Dimitry, who wanted to tweak our patch for the input layer. But we wait for weeeks for that. The SUSE kernel already ships a driver-core input layer without the /sbin/hotplug stuff.

Quoted 4 lines

Kay,

I am sorry for being slow with these patches but I really do spend all time that I can on kernel.

Quoted 9 lines

Oh well, I know that problem. :) We need to move completely away from unmanaged kernel-forked processes in the hotplug area. SUSE 9.3 already ships a udevd that listens only on netlink for hotplug messages and /proc/sys/kernel/hotplug is set to "".
Hannes converted the input layer to a input_device class to get the event through netlink. Maybe you can have a second look at it, so that we can get that thing upstream soon to fix the last broken hotplug-user and make hotplug_path finally private.

Could you send me the tlatest version, please? Lats time I think there were some concerns about lifetime rules...

Signature · 1 line
Dmitry