This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: updated uprobes patches
On Tue, May 29, 2007 at 03:24:20PM -0700, Jim Keniston wrote:
> On Sat, 2007-05-26 at 18:44 -0700, Roland McGrath wrote:
> > I didn't catch up on the threads from Ernie's review until after Jim posted
> > this new version. I have not reviewed the current code in great detail.
> > Had I been active in the discussion a couple of weeks ago, I would have
> > expressed by strong opposition to keeping the mm_struct change.
>
> There are two issues here: (a) allowing uprobes to be a module; and (b)
> removing the uprobes field from mm_struct. See below.
>
> > I think
> > it's essential that the code be turned into an independent module requiring
> > no changes in the base kernel (unless they are changes to the formal utrace
> > interfaces). From skimming the code, the mm_struct field seems to be the
> > only thing preventing it now.
>
> The last time I checked, there were 3 things standing in the way of
> implementing uprobes as a module:
>
> 1. __put_task_struct() wasn't exported, so uprobes couldn't call
> put_task_struct().
> 2. access_process_vm() wasn't exported, so uprobes couldn't call that.
> 3. I couldn't figure out how to build a module consisting of
> kernel/uprobes.o and arch/i386/kernel/uprobes.o. (So I put 'em both in
> the same directory for my experiment.)
>
> #1 and #2 are still a problem in Linus's kernel, but (thanks to Rusty's
> lguest module) not in recent -mm kernels. I still haven't figured out
> #3, but will ask around.
>
> > This would also be a boon to developers
> > immediately, since they could hack on the modules using e.g. their standard
> > Fedora kernels already installed.
>
> Er, do Fedora kernels export access_process_vm() and
> __put_task_struct()? (I'm currently running a kernel.org kernel.) If
> not, is it still worthwhile to modularize uprobes?
I think you are in luck :-) IIRC Rusty put out patches to export both
those 'cos they are needed for lguest - currently 2.6.22-rc2-mm1 has the
patches.
Ananth