Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic jump patching without stop_machine

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Masami Hiramatsu
Date: Wednesday, January 13, 2010 - 11:57 pm

Mathieu Desnoyers wrote:

Hmm, in that case, how can we reuse the breakpoint handler for another
text poke site? Even if we leave the handler, I think we need to clear
fixup information for next poking...


So, let me check the actual replacement steps.

(1) lock text_mutex
(2) setup breakpoint fixup addresses (source and destination)
(3) store int3 to 1st byte, and smp_wmb()
(4) send IPI and issue smp_mb() (or cpuid) with for sync all cores.
(5) store new instruction except 1st byte, and smp_wmb()
(6) store 1st byte of new instruction
(7) send IPI to all cores for waiting for all running breakpoint handlers.
(8) clear fixup addresses
(9) unlock text_mutex

Is this correct?

Thank you,

-- 
Masami Hiramatsu

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

e-mail: mhiramat@redhat.com

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

Messages in current thread:
[RFC PATCH 0/8] jump label v4 , Jason Baron, (Tue Jan 12, 9:26 am)
[RFC PATCH 5/8] jump label v4 - base patch, Jason Baron, (Tue Jan 12, 9:26 am)
[RFC PATCH 6/8] jump label v4 - x86 support, Jason Baron, (Tue Jan 12, 9:26 am)
[RFC PATCH 7/8] jump label v4 - tracepoint support, Jason Baron, (Tue Jan 12, 9:26 am)
[RFC PATCH 8/8] jump label v4 - add module support, Jason Baron, (Tue Jan 12, 9:26 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Tue Jan 12, 7:06 pm)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Masami Hiramatsu, (Tue Jan 12, 10:38 pm)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Wed Jan 13, 7:30 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Masami Hiramatsu, (Wed Jan 13, 11:57 pm)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Thu Jan 14, 8:39 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Masami Hiramatsu, (Thu Jan 14, 11:45 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Sun Jan 17, 11:55 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Arjan van de Ven, (Sun Jan 17, 12:16 pm)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Mon Jan 18, 9:52 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Mon Jan 18, 9:54 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Masami Hiramatsu, (Mon Jan 18, 11:21 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Mon Jan 18, 11:33 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Mon Jan 18, 2:32 pm)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Tue Apr 13, 10:16 am)