All of lore.kernel.org
 help / color / mirror / Atom feed
* CONFIG_DEBUG_RODATA prevents kprobes from working on 2.6.22-rc2
@ 2007-05-23 15:32 William Cohen
  2007-05-25 12:19 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: William Cohen @ 2007-05-23 15:32 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: CONFIG_DEBUG_RODATA prevents kprobes from working on 2.6.22-rc2
  2007-05-23 15:32 CONFIG_DEBUG_RODATA prevents kprobes from working on 2.6.22-rc2 William Cohen
@ 2007-05-25 12:19 ` Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2007-05-25 12:19 UTC (permalink / raw)
  To: William Cohen; +Cc: linux-kernel

William Cohen <wcohen@redhat.com> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-25 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-23 15:32 CONFIG_DEBUG_RODATA prevents kprobes from working on 2.6.22-rc2 William Cohen
2007-05-25 12:19 ` Andi Kleen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.