From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Arjan van de Ven <arjan@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: problem with x86-prepare-kprobes-code-for-unification.patch
Date: Fri, 09 Nov 2007 16:27:32 -0800 [thread overview]
Message-ID: <4734FAF4.40800@goop.org> (raw)
Hi,
This code in kprobes_64.c from
x86-prepare-kprobes-code-for-unification.patch is problematic:
+static __always_inline int is_IF_modifier(kprobe_opcode_t *insn)
+{
+ switch (*insn) {
+ case 0xfa: /* cli */
+ case 0xfb: /* sti */
+ case 0xcf: /* iret/iretd */
+ case 0x9d: /* popf/popfd */
+ return 1;
+ }
+
+ /*
+ * on 64 bit x86, 0x40-0x4f are prefixes so we need to look
+ * at the next byte instead.. but of course not recurse infinitely
+ */
+ if (*insn >= 0x40 && *insn <= 0x4f && *insn > 0x4f)
+ return is_IF_modifier(++insn);
+ return 0;
+}
Firstly, the conditional in the if() doesn't seem to make much sense.
It appears to be miscopied from:
- if (*insn >= 0x40 && *insn <= 0x4f && *++insn == 0xcf)
- return 1;
Secondly, the recursive inlining is making 4.0.2 complain:
/home/jeremy/hg/xen/paravirt/linux/arch/x86/kernel/kprobes_64.c: In function 'set_current_kprobe':
/home/jeremy/hg/xen/paravirt/linux/arch/x86/kernel/kprobes_64.c:152: sorry, unimplemented: inlining failed in call to 'is_IF_modifier': recursive inlining
/home/jeremy/hg/xen/paravirt/linux/arch/x86/kernel/kprobes_64.c:166: sorry, unimplemented: called from here
J
reply other threads:[~2007-11-10 0:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4734FAF4.40800@goop.org \
--to=jeremy@goop.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox