[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070503184450.GA5836@martell.zuzino.mipt.ru>
Date: Thu, 3 May 2007 22:44:50 +0400
From: Alexey Dobriyan <adobriyan@...il.com>
To: Christoph Hellwig <hch@...radead.org>,
Roland McGrath <roland@...hat.com>,
Christoph Hellwig <hch@....de>, akpm@...l.org,
linux-kernel@...r.kernel.org
Subject: Re: [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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists