lkml.org 
[lkml]   [2013]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add a text_poke syscall v2
On 11/29/2013 12:05 PM, Oleg Nesterov wrote:
> On 11/29, Andi Kleen wrote:
>>
>>> Andi, et al. I am going to discuss the things I do not really
>>> understand, probably this can't make any sense, but...
>>
>> I think it's enough to set the dirty bit in the underlying
>> struct page, no need to play games with the PTE.
>
> Ah, sorry for confusion, I guess you misunderstood.
>
> I meant, perhaps sys_text_poke() doesn't the in-kernel text_poke
> machinery altogether?
>
> Can't we invalidate pte (so that any user will stuck in page fault),
> update the page(s), restore the pte and drop the locks?
>
> This way sys_text_poke() won't be x86-specific, and it will be per-mm.
>

Hmmm... if we hold mmap_sem() this pretty much will be the net result,
no? That would mean no additional tests needed on the page fault path.
What I'm not sure of is whether or not it is actually safe to hold
mmap_sem across all the code we need -- on the other hand, we may very
well need to do so.

-hpa




\
 
 \ /
  Last update: 2013-11-30 06:41    [W:0.188 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site