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: Wed, 28 Oct 2009 14:07:17 -0800 [thread overview]
Message-ID: <1256767637.2683.410.camel@sbs-t61.sc.intel.com> (raw)
In-Reply-To: <1256760953.26028.1770.camel@gandalf.stny.rr.com>
On Wed, 2009-10-28 at 13:15 -0700, Steven Rostedt wrote:
> On Wed, 2009-10-28 at 11:56 -0800, Suresh Siddha wrote:
> > CPA_DEBUG is setting/clearing unused bit 9. It has no interaction with
> > RW bits. Though the random page and random length selections may end up
>
> Actually it does. When you call the clear_page_attribute, and go to set
> or clear bit 9, the static_protections() function is called against the
> new_prot. This will clear the RW bit if it is set, even if the original
> caller did not touch that bit.
True. It can happen if the debug test or someone does cpa() before we
mark the text as RO.
> > For CONFIG_DEBUG_RODATA, during the boot we change it to RO.
>
> We do that at the end of boot up. I'm sure there's a reason for this :-/
Well, alternate_instructions() is one :(. I am convinced that I should
add a check of kernel_set_to_readonly, and if set, I should prevent the
write attribute for the whole large page mapping kernel text, so that we
don't end up breaking it to small pages..
> Yes, because the code clears the RW bit whenever something changes any
> attribute of that page table. Including bit 9.
Yep, noticed it after your earlier comments.
Will send another patch to fix this too. You are ok with the ftrace
change right? I will send both of these shortly.
thanks,
suresh
next prev parent reply other threads:[~2009-10-28 21:08 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
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 [this message]
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=1256767637.2683.410.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®