linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why is hotplug a kernel helper?
@ 2003-12-04  0:04 Fredrik Tolf
  2003-12-04  1:13 ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: Fredrik Tolf @ 2003-12-04  0:04 UTC (permalink / raw)
  To: linux-kernel

If you don't mind me asking, I would like to know why the kernel calls
a usermode helper for hotplug events? Wouldn't a chrdev be a better
solution (especially considering that programs like magicdev could
listen in to it as well)? Correct me if I'm wrong, but the kobject
code never does check the return value from the usermode helper,
right?

Fredrik Tolf


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why is hotplug a kernel helper?
  2003-12-04  0:04 Why is hotplug a kernel helper? Fredrik Tolf
@ 2003-12-04  1:13 ` Greg KH
  2003-12-04  2:00   ` Fredrik Tolf
  0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2003-12-04  1:13 UTC (permalink / raw)
  To: Fredrik Tolf; +Cc: linux-kernel

On Thu, Dec 04, 2003 at 01:04:44AM +0100, Fredrik Tolf wrote:
> If you don't mind me asking, I would like to know why the kernel calls
> a usermode helper for hotplug events? Wouldn't a chrdev be a better
> solution (especially considering that programs like magicdev could
> listen in to it as well)? 

Please see the archives for why this is, it's been argued many times.

> Correct me if I'm wrong, but the kobject code never does check the
> return value from the usermode helper, right?

That is correct.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why is hotplug a kernel helper?
  2003-12-04  1:13 ` Greg KH
@ 2003-12-04  2:00   ` Fredrik Tolf
  2003-12-04  2:29     ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: Fredrik Tolf @ 2003-12-04  2:00 UTC (permalink / raw)
  To: Greg KH; +Cc: Fredrik Tolf, linux-kernel

Greg KH writes:
 > On Thu, Dec 04, 2003 at 01:04:44AM +0100, Fredrik Tolf wrote:
 > > If you don't mind me asking, I would like to know why the kernel calls
 > > a usermode helper for hotplug events? Wouldn't a chrdev be a better
 > > solution (especially considering that programs like magicdev could
 > > listen in to it as well)? 
 > 
 > Please see the archives for why this is, it's been argued many times.

I am sincerely sorry for being a bother, but I have spent several
hours searching far and wide for information on it, both in the
archives and generally on the web, without any luck in finding
anything. If it's not too much to ask, would you be as kind as to
provide a pointer?

Btw., Is there any preferred method of announcing hotplug events to
user interfaces?

Fredrik Tolf


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why is hotplug a kernel helper?
  2003-12-04  2:00   ` Fredrik Tolf
@ 2003-12-04  2:29     ` Greg KH
  2003-12-04  2:37       ` Tim Hockin
  2003-12-04  3:38       ` Fredrik Tolf
  0 siblings, 2 replies; 10+ messages in thread
From: Greg KH @ 2003-12-04  2:29 UTC (permalink / raw)
  To: Fredrik Tolf; +Cc: linux-kernel

On Thu, Dec 04, 2003 at 03:00:51AM +0100, Fredrik Tolf wrote:
> Greg KH writes:
>  > On Thu, Dec 04, 2003 at 01:04:44AM +0100, Fredrik Tolf wrote:
>  > > If you don't mind me asking, I would like to know why the kernel calls
>  > > a usermode helper for hotplug events? Wouldn't a chrdev be a better
>  > > solution (especially considering that programs like magicdev could
>  > > listen in to it as well)? 
>  > 
>  > Please see the archives for why this is, it's been argued many times.
> 
> I am sincerely sorry for being a bother, but I have spent several
> hours searching far and wide for information on it, both in the
> archives and generally on the web, without any luck in finding
> anything. If it's not too much to ask, would you be as kind as to
> provide a pointer?

Here was the latest thread where this was brought up:
	http://marc.theaimsgroup.com/?t=105544548100008

I would suggest reading this post from Linus for a quick summary:
	http://marc.theaimsgroup.com/?l=linux-kernel&m=105552804303171

> Btw., Is there any preferred method of announcing hotplug events to
> user interfaces?

Yes there is a standard.  Have you read the docs at
http://linux-hotplug.sf.net/ ?  Also my 2001 OLS paper details the
format the messages should be in, but it's a bit out of date as to the
new values that the 2.6 kernel sends.

What do you want to use the hotplug interface for that it currently does
not do?

Hope this helps,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why is hotplug a kernel helper?
  2003-12-04  2:29     ` Greg KH
@ 2003-12-04  2:37       ` Tim Hockin
  2003-12-04  3:38       ` Fredrik Tolf
  1 sibling, 0 replies; 10+ messages in thread
From: Tim Hockin @ 2003-12-04  2:37 UTC (permalink / raw)
  To: Greg KH; +Cc: Fredrik Tolf, linux-kernel

On Wed, Dec 03, 2003 at 06:29:12PM -0800, Greg KH wrote:
> I would suggest reading this post from Linus for a quick summary:
> 	http://marc.theaimsgroup.com/?l=linux-kernel&m=105552804303171

I don't really see what's so bad about acpid.  The code is dead simple.
Now, I'm not saying it is better than hotplug, but I really don't see them
as being too different.

Sorry to chime in :)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why is hotplug a kernel helper?
  2003-12-04  2:29     ` Greg KH
  2003-12-04  2:37       ` Tim Hockin
@ 2003-12-04  3:38       ` Fredrik Tolf
  2003-12-04  7:41         ` Greg KH
  2003-12-04 11:54         ` Joel Becker
  1 sibling, 2 replies; 10+ messages in thread
From: Fredrik Tolf @ 2003-12-04  3:38 UTC (permalink / raw)
  To: Greg KH; +Cc: Fredrik Tolf, linux-kernel

Greg KH writes:
 > On Thu, Dec 04, 2003 at 03:00:51AM +0100, Fredrik Tolf wrote:
 > > Greg KH writes:
 > >  > On Thu, Dec 04, 2003 at 01:04:44AM +0100, Fredrik Tolf wrote:
 > >  > > If you don't mind me asking, I would like to know why the kernel calls
 > >  > > a usermode helper for hotplug events? Wouldn't a chrdev be a better
 > >  > > solution (especially considering that programs like magicdev could
 > >  > > listen in to it as well)? 
 > >  > 
 > >  > Please see the archives for why this is, it's been argued many times.
 > > 
 > > I am sincerely sorry for being a bother, but I have spent several
 > > hours searching far and wide for information on it, both in the
 > > archives and generally on the web, without any luck in finding
 > > anything. If it's not too much to ask, would you be as kind as to
 > > provide a pointer?
 > 
 > Here was the latest thread where this was brought up:
 > 	http://marc.theaimsgroup.com/?t=105544548100008
 > 
 > I would suggest reading this post from Linus for a quick summary:
 > 	http://marc.theaimsgroup.com/?l=linux-kernel&m=105552804303171
 > 

Thank you for those references. I must have mistyped something while
searching, since all the keywords I searched for were in the
text... Sorry for wasting your time on that.

 > > Btw., Is there any preferred method of announcing hotplug events to
 > > user interfaces?
 > 
 > Yes there is a standard.  Have you read the docs at
 > http://linux-hotplug.sf.net/ ?  Also my 2001 OLS paper details the
 > format the messages should be in, but it's a bit out of date as to the
 > new values that the 2.6 kernel sends.

No, I haven't. I just put that question in the mail as a side-thing. I
had not expected more than a yes/no reply. In any case, I will read
it. Thanks again.

 > What do you want to use the hotplug interface for that it currently does
 > not do?

Admittedly, I'm still using the RH8 hotplug scripts, and I suspect
improvements have been made since then. I was mainly looking for a way
to auto-mount USB mass storage devices without having to reconfigure
anything as root. I have all the info I need now, though.

Thank you very much for your help.

Fredrik Tolf


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why is hotplug a kernel helper?
  2003-12-04  3:38       ` Fredrik Tolf
@ 2003-12-04  7:41         ` Greg KH
  2003-12-04 11:54         ` Joel Becker
  1 sibling, 0 replies; 10+ messages in thread
From: Greg KH @ 2003-12-04  7:41 UTC (permalink / raw)
  To: Fredrik Tolf; +Cc: linux-kernel

On Thu, Dec 04, 2003 at 04:38:29AM +0100, Fredrik Tolf wrote:
>  > What do you want to use the hotplug interface for that it currently does
>  > not do?
> 
> Admittedly, I'm still using the RH8 hotplug scripts, and I suspect
> improvements have been made since then. I was mainly looking for a way
> to auto-mount USB mass storage devices without having to reconfigure
> anything as root. I have all the info I need now, though.

Take a look at the devlabel package.  That should do what you are
looking for.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why is hotplug a kernel helper?
  2003-12-04  3:38       ` Fredrik Tolf
  2003-12-04  7:41         ` Greg KH
@ 2003-12-04 11:54         ` Joel Becker
  1 sibling, 0 replies; 10+ messages in thread
From: Joel Becker @ 2003-12-04 11:54 UTC (permalink / raw)
  To: Fredrik Tolf; +Cc: Greg KH, linux-kernel

On Thu, Dec 04, 2003 at 04:38:29AM +0100, Fredrik Tolf wrote:
> Admittedly, I'm still using the RH8 hotplug scripts, and I suspect
> improvements have been made since then. I was mainly looking for a way
> to auto-mount USB mass storage devices without having to reconfigure
> anything as root. I have all the info I need now, though.

	Hotplug (murasaki in my case) finds the devices just fine.  The
automounter (autofs for local filesystems) automounts them when I change
into the directory.  Also just fine.  In 2.4, no less.  2.6 as well.

Joel


-- 

"The nice thing about egotists is that they don't talk about other
 people."
         - Lucille S. Harper

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why is hotplug a kernel helper?
@ 2003-12-04 16:38 David Brownell
  0 siblings, 0 replies; 10+ messages in thread
From: David Brownell @ 2003-12-04 16:38 UTC (permalink / raw)
  To: Fredrik Tolf; +Cc: linux-kernel

> Btw., Is there any preferred method of announcing hotplug events to
> user interfaces?

There's interest in using D-BUS, but I'm not sure how it's progressed.
Which user's interface did you have in mind?  The relevant user may
be remote ... heck, they could even be a robot!  :)

- Dave



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why is hotplug a kernel helper?
       [not found]       ` <YVjJ.7Np.9@gated-at.bofh.it>
@ 2003-12-04 11:17         ` Ihar 'Philips' Filipau
  0 siblings, 0 replies; 10+ messages in thread
From: Ihar 'Philips' Filipau @ 2003-12-04 11:17 UTC (permalink / raw)
  To: Tim Hockin; +Cc: Linux Kernel Mailing List, fredrik, greg

Tim Hockin wrote:
> On Wed, Dec 03, 2003 at 06:29:12PM -0800, Greg KH wrote:
> 
>>I would suggest reading this post from Linus for a quick summary:
>>	http://marc.theaimsgroup.com/?l=linux-kernel&m=105552804303171
> 
> 
> I don't really see what's so bad about acpid.  The code is dead simple.
> Now, I'm not saying it is better than hotplug, but I really don't see them
> as being too different.
> 
> Sorry to chime in :)

   I have no idea how acpid/cardmgr bloated.
   So will go abstract.

   But this is common observation: event managers tend to be bloated.
   Rationale: "Let's work around this bug here". Very common.

   I'm implementing couple of event daemons right now - I have had hard 
time to protect them and force bugs being fixed in right place (test 
department screams, driver developers are saying this is "just couple 
lines of codes in daemon and tens in driver" - hopefully I do have good 
management, so B.S. aka bullshit is no go here. I'm really lucky).

   So to not to have hard time doing simple things - hotplug just does 
prohibit complicated/stateful processing implicitely.

   But, yeah, sure, any one can work around it - just make event handler 
a simple redirector to event handling daemon ;-)))

   my 0.02 euros.

P.S. take a look at mount... nfs hooks, smbfs hooks... -o handling is 
just mess. All this mess for you can simply say "mount this there".
Nice ;)

-- 
Ihar 'Philips' Filipau  / with best regards from Saarbruecken.
--                                                           _ _ _
  Because the kernel depends on it existing. "init"          |_|*|_|
  literally _is_ special from a kernel standpoint,           |_|_|*|
  because its' the "reaper of zombies" (and, may I add,      |*|*|*|
  that would be a great name for a rock band).
                                 -- Linus Torvalds


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-12-04 16:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-04  0:04 Why is hotplug a kernel helper? Fredrik Tolf
2003-12-04  1:13 ` Greg KH
2003-12-04  2:00   ` Fredrik Tolf
2003-12-04  2:29     ` Greg KH
2003-12-04  2:37       ` Tim Hockin
2003-12-04  3:38       ` Fredrik Tolf
2003-12-04  7:41         ` Greg KH
2003-12-04 11:54         ` Joel Becker
     [not found] <YPev.5Y5.33@gated-at.bofh.it>
     [not found] ` <YQkL.81w.41@gated-at.bofh.it>
     [not found]   ` <YR6p.Jy.5@gated-at.bofh.it>
     [not found]     ` <YRzn.1mB.1@gated-at.bofh.it>
     [not found]       ` <YVjJ.7Np.9@gated-at.bofh.it>
2003-12-04 11:17         ` Ihar 'Philips' Filipau
2003-12-04 16:38 David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).