From: Mathieu Desnoyers <compudj@krystal.dyndns.org>
To: ltt-dev@lists.casi.polymtl.ca, linux-kernel@vger.kernel.org,
Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
Subject: Immedate Values Optimized Jump Fix
Date: Wed, 16 Jul 2008 22:57:38 -0400 [thread overview]
Message-ID: <20080717025738.GA23277@Krystal> (raw)
In-Reply-To: <20080715024754.GA26471@Krystal>
I rarely emit a single patch for a fix wrt LTTng (I usually just release
a new version), but this one is worth it. It will be in 0.11 pretty
soon, but if you want to apply it to 0.10 meanwhile, it's highly
recommended.
Caused a kernel OOPS when loading the tracepoint probes once in a while
on a 8-way x86_64.
Immedate Values Optimized Jump Fix
Fix the immediate values optimized jump fallback, which parameters were wrong
following the last changes. It should be a 5 bytes instruction (not 2) with a 4
bytes operand.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
---
arch/x86/kernel/immediate.c | 2 +-
include/asm-x86/immediate.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6-lttng/arch/x86/kernel/immediate.c
===================================================================
--- linux-2.6-lttng.orig/arch/x86/kernel/immediate.c 2008-07-16 22:50:35.000000000 -0400
+++ linux-2.6-lttng/arch/x86/kernel/immediate.c 2008-07-16 22:51:07.000000000 -0400
@@ -500,7 +500,7 @@ __kprobes int arch_imv_update(struct __i
"Jump target fallback at %lX, nr fail %d\n",
imv->imv, ++nr_fail);
#endif
- imv->size = 1;
+ imv->size = 4; /* Fallback on movl */
} else {
#ifdef DEBUG_IMMEDIATE
static int nr_success;
Index: linux-2.6-lttng/include/asm-x86/immediate.h
===================================================================
--- linux-2.6-lttng.orig/include/asm-x86/immediate.h 2008-07-16 22:49:19.000000000 -0400
+++ linux-2.6-lttng/include/asm-x86/immediate.h 2008-07-16 22:51:07.000000000 -0400
@@ -132,7 +132,7 @@ struct __imv {
BUILD_BUG_ON(sizeof(__typeof__(name##__imv)) > 1); \
asm (".section __imv,\"aw\",@progbits\n\t" \
_ASM_PTR "%c1, (3f)-4\n\t" \
- ".byte 0, 2\n\t" \
+ ".byte 0, 5\n\t" \
".previous\n\t" \
"mov $0,%0\n\t" \
"3:\n\t" \
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
next parent reply other threads:[~2008-07-17 2:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080715024754.GA26471@Krystal>
2008-07-17 2:57 ` Mathieu Desnoyers [this message]
2008-07-17 3:10 ` [ltt-dev] LTTng 0.11 Mathieu Desnoyers
[not found] ` <000001c8e7aa$b9548600$2bfd9200$@css.fujitsu.com>
[not found] ` <20080717024550.GA22869@Krystal>
[not found] ` <487ED503.2060503@oracle.com>
2008-07-17 7:03 ` [PATCH] Fix markers duplicate modpost entry Mathieu Desnoyers
2008-07-17 7:16 ` Andrew Morton
2008-07-17 14:13 ` Mathieu Desnoyers
2008-07-17 14:52 ` [PATCH] Fix markers duplicate modpost entry (update) Mathieu Desnoyers
2008-07-17 22:28 ` Andrew Morton
2008-07-17 22:40 ` Randy Dunlap
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=20080717025738.GA23277@Krystal \
--to=compudj@krystal.dyndns.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ltt-dev@lists.casi.polymtl.ca \
--cc=t-nishiie@np.css.fujitsu.com \
/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