Re: [PATCH 2/2] kgdb,debug_core,kgdbts: End DEBUG_RODATA limitationusing kprobe breakpoints
From: Masami Hiramatsu
Date: Mon Mar 26 2012 - 05:46:16 EST
(2012/03/23 23:38), Jason Wessel wrote:
> On 03/23/2012 09:08 AM, Masami Hiramatsu wrote:
>> (2012/03/22 20:57), Jason Wessel wrote:
>>> I will use the arch specific provision to override the
>>> kgdb_arch_set_breakpoint() and use the text_poke() directly.
>> Thanks! that's what I meant. You can use __weak attribute.
> I created and tested a patch yesterday which is show below. I will
> post a new series at some point soon which addresses this problem as
> well as a number of problems found with the kgdb test suite.
Yeah, that's better.
BTW, I'm not sure the policy of kgdb about mutex, but it seems
that you need to hold a text_mutex when you call the text_poke()
since it uses a fixmap page-area for mapping read-only text page
to writable page. So, without locking (at least ensuring no one
using) text_mutex, it seems not be safe. (some other code may be
trying to change the code by using same fixmap pages)
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/