Re: [PATCH] utrace: remove exports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux