lkml.org 
[lkml]   [2009]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] [GIT PULL] tracing: allow to change permissions for text with dynamic ftrace enabled
From
Date
On Tue, 2009-10-27 at 10:53 -0700, Steven Rostedt wrote:
> commit 883242dd0e5faaba041528a9a99f483f2a656c83
> Author: Steven Rostedt <srostedt@redhat.com>
> Date: Tue Oct 27 13:15:11 2009 -0400
>
> tracing: allow to change permissions for text with dynamic ftrace enabled
>
> The commit 74e081797bd9d2a7d8005fe519e719df343a2ba8
> x86-64: align RODATA kernel section to 2MB with CONFIG_DEBUG_RODATA
> prevents text sections from becoming read/write using set_memory_rw.
>
> The dynamic ftrace changes all text pages to read/write just before
> converting the calls to tracing to nops, and vice versa.
>
> I orginally just added a flag to allow this transaction when ftrace
> did the change, but I also found that when the CPA testing was running
> it would remove the read/write as well, and ftrace does not do the text
> conversion on boot up, and the CPA changes caused the dynamic tracer
> to fail on self tests.
>
> The current solution I have is to simply not to prevent
> change_page_attr from setting the RW bit for kernel text pages.


Steven, Is it possible for dynamic ftrace to use the kernel identity
mapping instead of the kernel text mapping for converting the tracing
calls to nops etc.

That way, we can still retain large page mappings for kernel text, while
allowing the text to be changed.

I need to think through this to see if there are any subtle issues. What
do you think?

thanks,
suresh



\
 
 \ /
  Last update: 2009-10-27 19:25    [W:0.075 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site