[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190828163433.4ltoxmtuujkqspar@treble>
Date: Wed, 28 Aug 2019 11:34:33 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Randy Dunlap <rdunlap@...radead.org>
Subject: Re: linux-next: Tree for Aug 27 (objtool)
On Wed, Aug 28, 2019 at 11:13:31AM -0500, Josh Poimboeuf wrote:
> Turns out this patch does break something:
>
> arch/x86/xen/enlighten_pv.o: warning: objtool: xen_cpuid()+0x25: can't find jump dest instruction at .text+0x9c
>
> I'll need to figure out a better way to whitelist that
> XEN_EMULATE_PREFIX fake instruction thing. I'll probably just teach
> the objtool decoder about it.
Hi Masami,
Is it possible for the kernel x86 decoder to recognize the
XEN_EMULATE_PREFIX prefix?
asm(XEN_EMULATE_PREFIX "cpuid"
: "=a" (*ax),
"=b" (*bx),
"=c" (*cx),
"=d" (*dx)
: "0" (*ax), "2" (*cx));
is disassembled to:
33: 0f 0b ud2
35: 78 65 js 9c <xen_store_tr+0xc>
37: 6e outsb %ds:(%rsi),(%dx)
38: 0f a2 cpuid
which confuses objtool. Presumably that would confuse other users of
the decoder as well.
That's a highly unlikely sequence of instructions, maybe the kernel
decoder should recognize it as a single instruction.
--
Josh
Powered by blists - more mailing lists