Re: CONFIG_DEBUG_RODATA prevents kprobes from working on 2.6.22-rc2

2007-05-25 Thread Andi Kleen
William Cohen <[EMAIL PROTECTED]> writes:
> 
> Shouldn't mark_rodata_ro be less agressive when CONFIG_KPROBES is
> enabled? Or should kprobes temporarily change the page to be
> writeable, set the break point, and then return the page to read only?

The later.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: CONFIG_DEBUG_RODATA prevents kprobes from working on 2.6.22-rc2

2007-05-25 Thread Andi Kleen
William Cohen [EMAIL PROTECTED] writes:
 
 Shouldn't mark_rodata_ro be less agressive when CONFIG_KPROBES is
 enabled? Or should kprobes temporarily change the page to be
 writeable, set the break point, and then return the page to read only?

The later.

-Andi
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


CONFIG_DEBUG_RODATA prevents kprobes from working on 2.6.22-rc2

2007-05-23 Thread William Cohen
The recent changes in the 2.6.22-rc2 kernel to the write protection of read only 
data enable by CONFIG_DEBUG_RODATA prevents kprobes from working. At least on 
the on i386 and x86_64 machine the mark_rodata_ro() function marks memory 
starting from _text as read only. Thus, when kprobes attempts to write a break 
point into a location in the kernel it faults.


There is a description of the problem at:

http://sources.redhat.com/bugzilla/show_bug.cgi?id=4531

Shouldn't mark_rodata_ro be less agressive when CONFIG_KPROBES is enabled? Or 
should kprobes temporarily change the page to be writeable, set the break point, 
and then return the page to read only?


-Will
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


CONFIG_DEBUG_RODATA prevents kprobes from working on 2.6.22-rc2

2007-05-23 Thread William Cohen
The recent changes in the 2.6.22-rc2 kernel to the write protection of read only 
data enable by CONFIG_DEBUG_RODATA prevents kprobes from working. At least on 
the on i386 and x86_64 machine the mark_rodata_ro() function marks memory 
starting from _text as read only. Thus, when kprobes attempts to write a break 
point into a location in the kernel it faults.


There is a description of the problem at:

http://sources.redhat.com/bugzilla/show_bug.cgi?id=4531

Shouldn't mark_rodata_ro be less agressive when CONFIG_KPROBES is enabled? Or 
should kprobes temporarily change the page to be writeable, set the break point, 
and then return the page to read only?


-Will
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/