Re: [PATCH] x86: kprobes change kprobe_handler flow

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Abhishek Sagar <sagar.abhishek@...>
Cc: Ingo Molnar <mingo@...>, Harvey Harrison <harvey.harrison@...>, H. Peter Anvin <hpa@...>, LKML <linux-kernel@...>, Thomas Gleixner <tglx@...>, <qbarnes@...>, <ananth@...>, <jkenisto@...>
Date: Wednesday, January 2, 2008 - 2:09 pm

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, 9:44 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Mon Dec 31, 9:03 am)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Masami Hiramatsu, (Tue Jan 1, 1:49 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Tue Jan 1, 4:24 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Masami Hiramatsu, (Wed Jan 2, 12:00 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Ingo Molnar, (Tue Jan 1, 11:35 am)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Tue Jan 1, 3:40 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Masami Hiramatsu, (Wed Jan 2, 2:09 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Wed Jan 2, 3:31 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Masami Hiramatsu, (Wed Jan 2, 5:56 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Thu Jan 3, 2:12 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Masami Hiramatsu, (Thu Jan 3, 4:11 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Fri Jan 4, 2:43 am)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Masami Hiramatsu, (Thu Jan 3, 1:15 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Masami Hiramatsu, (Thu Jan 3, 5:31 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Fri Jan 4, 2:34 am)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Ingo Molnar, (Wed Jan 2, 4:23 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Harvey Harrison, (Tue Jan 1, 4:19 pm)
Re: [PATCH] x86: kprobes change kprobe_handler flow, Abhishek Sagar, (Tue Jan 1, 4:54 pm)