[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090220011316.379904625@goodmis.org>
Date: Thu, 19 Feb 2009 20:13:16 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org
Cc: Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Arjan van de Ven <arjan@...radead.org>,
Rusty Russell <rusty@...tcorp.com.au>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
"H. Peter Anvin" <hpa@...or.com>
Subject: [git pull] changes for tip, and a nasty x86 page table bug
Ingo,
The list of changes are to keep the kernel text read only when
CONFIG_DEBUG_RODATA is set, even when the DYNAMIC_FTRACE is configured.
What it does now is to change the kernel text to writable before
modifying the mcount call points, and changes it back to read only
when it is finished.
In doing this change, I stumbled upon a nasty bug in the page handling
of the x86 code, where we can fall into a state where the PTE
has the RW bit set, but the PMD does not. This will cause an
infinite loop of faults. The reason is that the fault handler
detects "spurious faults" when it hits a page fault but the permissions
show it as correct. This test only checks the PTE pages and not the
PMD level. Thus it will return just to fault again.
The first two patches deals with this bug directly, the rest are
ftrace related. I'm thinking ftrace may be the only user to cause
this bug, but if it is not, then we might want to consider those
changes for 29. Otherwise, the changes to hit the bug are for 30
and you can wait on fixing this bug until then.
Please pull the latest tip/tracing/ftrace tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/ftrace
Steven Rostedt (6):
x86: check PMD in spurious_fault handler
x86: keep pmd rw bit set when creating 4K level pages
ftrace: allow archs to preform pre and post process for code modification
ftrace, x86: make kernel text writable only for conversions
ftrace: immediately stop code modification if failure is detected
ftrace: break out modify loop immediately on detection of error
----
arch/x86/include/asm/ftrace.h | 10 ++++++++++
arch/x86/kernel/ftrace.c | 24 ++++++++++++++++++++++++
arch/x86/mm/fault.c | 13 ++++++++++++-
arch/x86/mm/init_32.c | 27 ++++++++++++++++++++++++---
arch/x86/mm/init_64.c | 29 ++++++++++++++++++++++++-----
arch/x86/mm/pageattr.c | 4 +++-
include/linux/ftrace.h | 3 +++
kernel/trace/ftrace.c | 34 +++++++++++++++++++++++++++++++++-
8 files changed, 133 insertions(+), 11 deletions(-)
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists