mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suresh Siddha <suresh.b.siddha@intel.com>
To: "rostedt@goodmis.org" <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] [GIT PULL] tracing: allow to change permissions for text with dynamic ftrace enabled
Date: Tue, 27 Oct 2009 11:20:27 -0800	[thread overview]
Message-ID: <1256671227.2691.15.camel@sbs-t61.sc.intel.com> (raw)
In-Reply-To: <1256666023.26028.411.camel@gandalf.stny.rr.com>

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


  parent reply	other threads:[~2009-10-27 18:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-27 17:53 Steven Rostedt
2009-10-27 18:11 ` Ingo Molnar
2009-10-27 19:20 ` Suresh Siddha [this message]
2009-10-27 18:33   ` Steven Rostedt
2009-10-27 22:26     ` Suresh Siddha
2009-10-27 21:35       ` Steven Rostedt
2009-10-27 23:23         ` Suresh Siddha
2009-10-27 23:31           ` Steven Rostedt
2009-10-28 19:56             ` Suresh Siddha
2009-10-28 20:15               ` Steven Rostedt
2009-10-28 22:07                 ` Suresh Siddha
2009-10-29  1:20                   ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1256671227.2691.15.camel@sbs-t61.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®