All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Steven Rostedt <srostedt@redhat.com>
Subject: Re: [PATCH 2/5] ftrace, x86: make kernel text writable only for conversions
Date: Fri, 20 Feb 2009 18:55:35 +0100	[thread overview]
Message-ID: <20090220175535.GN24538@elte.hu> (raw)
In-Reply-To: <alpine.DEB.2.00.0902201247220.13747@gandalf.stny.rr.com>


* Steven Rostedt <rostedt@goodmis.org> wrote:

> > > +/* used by ftrace */
> > > +void set_kernel_text_rw(void)
> > 
> > i'd leave out the 'used by ftrace' bit - more uses might 
> > arise. How does kprobes get around readonly pages, it uses 
> > these APIs too, right?
> 
> kprobes uses text_poke. text_poke uses vmap to create its own 
> page table pointers to the text memory, does the modification 
> and then removes the pointers. This is quite heavy weight and 
> since ftrace needs to modify 10s of thousands of areas, 
> converting all of kernel text page tables is much more 
> efficient.
> 
> Note, if kprobes did change the original page tables, then it 
> too would have hit the split_large_page bug too.

i think the real reason is that kprobes was written before we 
had this more flexible and more usable CPA code.

	Ingo

  reply	other threads:[~2009-02-20 17:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 16:38 [git pull] updates for tip Steven Rostedt
2009-02-20 16:38 ` [PATCH 1/5] ftrace: allow archs to preform pre and post process for code modification Steven Rostedt
2009-02-20 17:25   ` Ingo Molnar
2009-02-20 17:32     ` Steven Rostedt
2009-02-20 16:38 ` [PATCH 2/5] ftrace, x86: make kernel text writable only for conversions Steven Rostedt
2009-02-20 17:30   ` Ingo Molnar
2009-02-20 17:52     ` Steven Rostedt
2009-02-20 17:55       ` Ingo Molnar [this message]
2009-02-20 18:00         ` Steven Rostedt
2009-02-20 16:38 ` [PATCH 3/5] ftrace: immediately stop code modification if failure is detected Steven Rostedt
2009-02-20 16:38 ` [PATCH 4/5] ftrace: break out modify loop immediately on detection of error Steven Rostedt
2009-02-20 17:33   ` Ingo Molnar
2009-02-20 17:54     ` Steven Rostedt
2009-02-20 16:38 ` [PATCH 5/5] ftrace, x86: do not depend on system state for kernel text info Steven Rostedt
2009-02-20 17:34   ` Ingo Molnar
2009-02-20 17:54     ` 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=20090220175535.GN24538@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=srostedt@redhat.com \
    --cc=tglx@linutronix.de \
    /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 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.