lkml.org 
[lkml]   [2006]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2/3 PATCH] Kprobes: User space probes support- readpage hooks
Prasanna S Panchamukhi <prasanna@in.ibm.com> wrote:
>
> This patch provides the feature of inserting probes on pages that are
> not present in the memory during registration.
>
> To add readpage and readpages() hooks, two new elements are added to
> the uprobe_module object:
> struct address_space_operations *ori_a_ops;
> struct address_space_operations user_a_ops;
>
> User-space probes allows probes to be inserted even in pages that are
> not present in the memory at the time of registration. This is done
> by adding hooks to the readpage and readpages routines. During
> registration, the address space operation object is modified by
> substituting user-space probes's specific readpage and readpages
> routines. When the pages are read into memory through the readpage and
> readpages address space operations, any associated probes are
> automatically inserted into those pages. These user-space probes
> readpage and readpages routines internally call the original
> readpage() and readpages() routines, and then check whether probes are
> to be added to these pages, inserting probes as necessary. The
> overhead of adding these hooks is limited to the application on which
> the probes are inserted.
>
> During unregistration, care should be taken to replace the readpage and
> readpages hooks with the original routines if no probes remain on that
> application.
>

So... The code's replacing the address_space's address_space_operations
with a copy which has .readpage() and .readpages() modified, because it
happens that filemap_nopage() uses those.

This is all rather hacky.

I think we need to step back and discuss what services this feature is
trying to provide, and how it is to provide them. Your covering
description didn't describe that - it dives straigt into details without
even describing what the patches are trying to achieve.

So. What are we trying to achieve here, and how are we trying to achieve
it? What problems were encountered in the development of the feature and
how were they solved? What alternative solutions were there?

I can mostly work all that out from background knowledge and looking at the
code, but I'd rather hear it from the designers please.
-
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: 2006-03-20 12:00    [W:1.698 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site