[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1209343883-7991-1-git-send-email-jirislaby@gmail.com>
Date: Mon, 28 Apr 2008 02:51:23 +0200
From: Jiri Slaby <jirislaby@...il.com>
To: David Miller <davem@...emloft.net>
Cc: torvalds@...ux-foundation.org, zdenek.kabelac@...il.com,
rjw@...k.pl, paulmck@...ux.vnet.ibm.com, akpm@...ux-foundation.org,
linux-ext4@...r.kernel.org, herbert@...dor.apana.org.au,
penberg@...helsinki.fi, clameter@....com,
linux-kernel@...r.kernel.org, Jiri Slaby <jirislaby@...il.com>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
Andi Kleen <andi@...stfloor.org>, pageexec@...email.hu,
"H. Peter Anvin" <hpa@...or.com>,
Jeremy Fitzhardinge <jeremy@...p.org>,
Ingo Molnar <mingo@...e.hu>
Subject: [PATCH 1/1] x86: fix text_poke
David Miller <davem@...emloft.net> wrote:
> From: Jiri Slaby <jirislaby@...il.com>
> Date: Fri, 25 Apr 2008 19:10:37 +0200
>
> > I'm going to bisect it, will be back in few hours ;).
>
> Thanks for all of this hard work and investigation Jiri!
Thanks. Bisected mm down to git-x86.patch, bisected git-x86-latest down to
x86: enhance DEBUG_RODATA support - alternatives
The patch below fixes the problem for me. Comments welcome.
The 0xf0 pattern comes from alternatives_smp_lock:
text_poke(*ptr, ((unsigned char []){0xf0}), 1);
I grepped for it a long time ago, but not in a form of coumpound literal :/.
*Never* more :).
--
kernel_text_address returns true even for modules which is not wanted
in text_poke. Use core_kernel_text instead.
This is a regression introduced in e587cadd8f47e202a30712e2906a65a0606d5865
which caused occasionaly crashes after suspend/resume.
Signed-off-by: Jiri Slaby <jirislaby@...il.com>
CC: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
CC: Andi Kleen <andi@...stfloor.org>
CC: pageexec@...email.hu
CC: H. Peter Anvin <hpa@...or.com>
CC: Jeremy Fitzhardinge <jeremy@...p.org>
CC: Ingo Molnar <mingo@...e.hu>
---
arch/x86/kernel/alternative.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 5412fd7..0b074cb 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -515,7 +515,7 @@ void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
BUG_ON(len > sizeof(long));
BUG_ON((((long)addr + len - 1) & ~(sizeof(long) - 1))
- ((long)addr & ~(sizeof(long) - 1)));
- if (kernel_text_address((unsigned long)addr)) {
+ if (core_kernel_text((unsigned long)addr)) {
struct page *pages[2] = { virt_to_page(addr),
virt_to_page(addr + PAGE_SIZE) };
if (!pages[1])
--
1.5.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists