Re: [PATCH v2 7/11] Uprobes Implementation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Srikar Dronamraju
Date: Thursday, April 22, 2010 - 6:31 am

* Oleg Nesterov <oleg@redhat.com> [2010-04-21 18:05:15]:


uproc->tg_leader was used to validate looked up uproc belongs to the
process.  It was used to check if the uproc belonged to the process for
which we are currently trying to register/unregister uprobes.

Since we want to share the uproc with process that share the same mm, I
agree that its better off we remove the tg_leader.


Okay, I will add the forward declaration in the include file and update
the function prototypes accordingly.


Yeah, since tracehook_notify_resume() is in fast path, its worth adding
a new TIF flag.


All callers of write_opcodes should have taken uproc->mutex. 
If there are other users of write_opcode, we will have to add a way to
synchronize this. 


That's a bug, I will fix it. remove_bkpt() clearly says it needs to be
called with uproc->mutex held.


Okay. 


I dont think so. 
If uprobes runs on hosts, it would be calling replace_page() on text
pages. KSM for now works on anonymous pages. Even the replaced page we
add still belongs to the text VMA.

If uprobes runs on guest, KSM should be taking care of cases where
similar pages are inserted/deleted 


I still need to verify this. I shall get back to you on this.
However are there applications that mprotect(PROT_WRITE) text pages?



I dont think we handle this case now. I think even munmap of the region
where there are probes inserted also can have the same problem.

Are there ways to handle this. 
I think taking a write lock on mmap_sem instead of the read lock could
handle this problem.

I am copying Mel Gorman and Andrea Arcangeli so that they can provide
their inputs on VM and KSM related issues.

--
Thanks and Regards
Srikar
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v2 0/11] Uprobes patches., Srikar Dronamraju, (Wed Mar 31, 8:51 am)
[PATCH v2 1/11] Move Macro W to insn.h, Srikar Dronamraju, (Wed Mar 31, 8:51 am)
[PATCH v2 2/11] Move replace_page() to mm/memory.c, Srikar Dronamraju, (Wed Mar 31, 8:51 am)
[PATCH v2 3/11] Enhance replace_page() to support pagecache, Srikar Dronamraju, (Wed Mar 31, 8:51 am)
[PATCH v2 4/11] User Space Breakpoint Assistance Layer, Srikar Dronamraju, (Wed Mar 31, 8:51 am)
[PATCH v2 5/11] X86 details for user space breakpoint assi ..., Srikar Dronamraju, (Wed Mar 31, 8:52 am)
[PATCH v2 6/11] Slot allocation for Execution out of line, Srikar Dronamraju, (Wed Mar 31, 8:52 am)
[PATCH v2 7/11] Uprobes Implementation, Srikar Dronamraju, (Wed Mar 31, 8:52 am)
[PATCH v2 8/11] X86 details for uprobes., Srikar Dronamraju, (Wed Mar 31, 8:52 am)
[PATCH v2 9/11] Uprobes Documentation patch, Srikar Dronamraju, (Wed Mar 31, 8:52 am)
[PATCH v2 10/11] Uprobes samples., Srikar Dronamraju, (Wed Mar 31, 8:52 am)
[PATCH v2 11/11] Uprobes traceevents patch., Srikar Dronamraju, (Wed Mar 31, 8:53 am)
Re: [PATCH v2 11/11] Uprobes traceevents patch., Steven Rostedt, (Wed Mar 31, 2:24 pm)
Re: [PATCH v2 11/11] Uprobes traceevents patch., Masami Hiramatsu, (Wed Mar 31, 9:16 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Oleg Nesterov, (Tue Apr 13, 11:35 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Srikar Dronamraju, (Thu Apr 15, 2:35 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Oleg Nesterov, (Mon Apr 19, 12:31 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Srikar Dronamraju, (Tue Apr 20, 5:43 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Oleg Nesterov, (Tue Apr 20, 8:30 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Srikar Dronamraju, (Tue Apr 20, 11:59 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Oleg Nesterov, (Wed Apr 21, 9:05 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Srikar Dronamraju, (Thu Apr 22, 6:31 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Oleg Nesterov, (Thu Apr 22, 8:40 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Srikar Dronamraju, (Fri Apr 23, 7:58 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Oleg Nesterov, (Fri Apr 23, 11:53 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Peter Zijlstra, (Tue May 11, 1:32 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Peter Zijlstra, (Tue May 11, 1:43 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Peter Zijlstra, (Tue May 11, 1:44 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Peter Zijlstra, (Tue May 11, 1:45 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Peter Zijlstra, (Tue May 11, 1:47 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Frank Ch. Eigler, (Tue May 11, 1:57 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Peter Zijlstra, (Tue May 11, 2:01 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Srikar Dronamraju, (Wed May 12, 3:31 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Srikar Dronamraju, (Wed May 12, 3:41 am)
Re: [PATCH v2 11/11] Uprobes traceevents patch., Frederic Weisbecker, (Wed May 12, 4:02 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Peter Zijlstra, (Wed May 12, 4:12 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Srikar Dronamraju, (Wed May 12, 7:24 am)
Re: [PATCH v2 11/11] Uprobes traceevents patch., Srikar Dronamraju, (Wed May 12, 7:34 am)
Re: [PATCH v2 11/11] Uprobes traceevents patch., Frederic Weisbecker, (Wed May 12, 7:57 am)
Re: [PATCH v2 11/11] Uprobes traceevents patch., Frederic Weisbecker, (Wed May 12, 8:15 am)
Re: [PATCH v2 7/11] Uprobes Implementation, Oleg Nesterov, (Thu May 13, 12:40 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Linus Torvalds, (Thu May 13, 12:59 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Andi Kleen, (Thu May 13, 3:12 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Linus Torvalds, (Thu May 13, 3:25 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Roland McGrath, (Thu May 13, 5:56 pm)
Re: [PATCH v2 7/11] Uprobes Implementation, Srikar Dronamraju, (Thu May 13, 10:42 pm)