Re: [PATCH] x86: kprobes change kprobe_handler flow

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Masami Hiramatsu
Date: Wednesday, January 2, 2008 - 11:09 am

Hi Abhishek,

Thank you for good work.

Abhishek Sagar wrote:

I think setup_singlestep() in your first patch is better, because it avoided
code duplication(*).


Why would you modify it?


I think preepmt_enable here is good idea.


If my thought is correct, we don't need to use swich-case here,
Because there are only 2 cases, KPROBE_HIT_SSDONE (x86-64 only)
or others.
As a result, this function just setups re-entrance.


I think no need to check that here.


I think this block changing would better be separated from this patch,
because it changes code flow logically.


I think you don't need "cur", because kprobe_running() is called
just once on each path.


(*) duplication 1


(*) duplication 2


I think this is a bit ugly...
Why would you avoid using mutiple "return"s in this function?
I think you can remove "ret" from this function.


Thank you,

-- 
Masami Hiramatsu

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

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

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86: kprobes change kprobe_handler flow, Harvey Harrison, (Thu Dec 27, 6:44 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Mon Dec 31, 6:03 am)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Tue Jan 1, 12:40 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Harvey Harrison, (Tue Jan 1, 1:19 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Tue Jan 1, 1:24 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Tue Jan 1, 1:54 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Masami Hiramatsu, (Wed Jan 2, 11:09 am)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Wed Jan 2, 12:31 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Ingo Molnar, (Wed Jan 2, 1:23 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Masami Hiramatsu, (Wed Jan 2, 2:56 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Masami Hiramatsu, (Thu Jan 3, 10:15 am)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Thu Jan 3, 11:12 am)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Masami Hiramatsu, (Thu Jan 3, 1:11 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Masami Hiramatsu, (Thu Jan 3, 2:31 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Thu Jan 3, 11:34 pm)