lkml.org 
[lkml]   [2007]   [May]   [3]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 3 May 2007 22:44:50 +0400
FromAlexey Dobriyan <>
SubjectRe: [PATCH] utrace: remove exports
On Mon, Apr 30, 2007 at 10:12:44AM +0100, Christoph Hellwig wrote:
> On Sun, Apr 29, 2007 at 09:02:32PM -0700, Roland McGrath wrote:
> > > EXPORT_SYMBOL_GPL(utrace_attach);
> > > 
> > > 	There is not modular user of this, so this and the other utrace_
> > > 	functions should not be exported.  Nor do I think that exporting
> > > 	such a low-level process control is nessecary a good idea, but
> > > 	we'll have to evaluate that if patches to add users show up.
> > 
> > If you remove the exports, just throw the whole thing away.
> > The reason utrace exists is to be used by modules.
> 
> used != used by modules.  Even without things exported you can use
> things in the kernel.  Once we have a valid modular use case we can
> add exports.

Christoph, it's at
http://people.redhat.com/roland/utrace/crash-suspend.c

The file crash-suspend.c is a simple example of a loadable kernel module
using the new infrastructure.  It implements the old GNU feature of doing a
job suspend on crash, so you can attach a debugger right then instead of
just looking at the core file afterwards.  Try for example:
	$ sudo /sbin/insmod crash-suspend.ko pid=$$
to load the module and attach it to your shell.  It then attaches to any
children of your shell.  Now run something that crashes and would
ordinarily dump core--you can just run cat or sleep and hit ^\ to crash it
with a SIGQUIT.  See it suspend.  Try "jobs -l" and see it stopped with a
non-stop signal.  If you resume it with "fg" it will go ahead and dump
core.  Or, you can attach a debugger like gdb first, and then debug it.



Most certainly, it should be included into utrace patchset to pin some
exports.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-05-03 18:47    [from the cache]
©2003-2008