lkml.org 
[lkml]   [2008]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: Use is_kprobe_fault to better match usage
Harvey Harrison wrote:
> On Wed, 2008-01-02 at 21:36 -0500, Masami Hiramatsu wrote:
>> Hi Harvey,
>>
>> Harvey Harrison wrote:
>>> Currently the notify_page_fault helper is used to test it the page
>>> fault was caused by a kprobe causing an early return from do_page_fault.
>>>
>>> Change the name of the helper to is_kprobe_fault to match the usage and
>>> remove the preempt_disable/enable pair around kprobe_running() with an
>>> explicit test for preemption. The idea for this comes from a patch
>>> by Quentin Barnes to kprobes.c
>> Sure, that's right.
>> However, since other architectures also have notify_page_fault(),
>> I think all of those code might better be changed same time for
>> maintainability.
>>
>
> How about a static inline in linux/kprobes.h with a big comment above
> about when/why the !preemptible() check is sufficient?

Hmm, fault handling depends on the architecture. But current
notify_page_fault()s are very similar. I think unifying it is good idea.
We will be happy to review that if you send it.

Many thanks!

>
> Harvey
>
>
>

--
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com, masami.hiramatsu.pt@hitachi.com



\
 
 \ /
  Last update: 2008-01-03 04:25    [W:0.142 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site