Re: [PATCH] x86: x86-opcode-map.txt: explain CALLW discrepancy between Intel and AMD

2015-02-13 Thread Borislav Petkov
On Fri, Feb 13, 2015 at 02:25:20PM +0100, Denys Vlasenko wrote: > > Well, according to the SDM, Intel truncates too, see the LOOP/LOOPcc > > Operation section: > > > > ... > > IF BranchCond = 1 > > THEN > > IF OperandSize = 32 > > THEN EIP ← EIP + SignExtend(

Re: [PATCH] x86: x86-opcode-map.txt: explain CALLW discrepancy between Intel and AMD

2015-02-13 Thread Denys Vlasenko
On Fri, Feb 13, 2015 at 1:01 PM, Borislav Petkov wrote: > On Thu, Feb 12, 2015 at 08:06:57PM +0100, Denys Vlasenko wrote: >> In 64-bit mode, AMD and Intel CPUs treat 0x66 prefix before branch >> insns differently. For near branches, it affects decode too since >> immediate offset's width is differ

Re: [PATCH] x86: x86-opcode-map.txt: explain CALLW discrepancy between Intel and AMD

2015-02-13 Thread Masami Hiramatsu
(2015/02/13 4:06), Denys Vlasenko wrote: > In 64-bit mode, AMD and Intel CPUs treat 0x66 prefix before branch > insns differently. For near branches, it affects decode too since > immediate offset's width is different. You'd better add a link to your investigation report :) http://marc.info/?l=li

Re: [PATCH] x86: x86-opcode-map.txt: explain CALLW discrepancy between Intel and AMD

2015-02-13 Thread Borislav Petkov
On Thu, Feb 12, 2015 at 08:06:57PM +0100, Denys Vlasenko wrote: > In 64-bit mode, AMD and Intel CPUs treat 0x66 prefix before branch > insns differently. For near branches, it affects decode too since > immediate offset's width is different. > > Signed-off-by: Denys Vlasenko > CC: Masami Hiramats

[PATCH] x86: x86-opcode-map.txt: explain CALLW discrepancy between Intel and AMD

2015-02-12 Thread Denys Vlasenko
In 64-bit mode, AMD and Intel CPUs treat 0x66 prefix before branch insns differently. For near branches, it affects decode too since immediate offset's width is different. Signed-off-by: Denys Vlasenko CC: Masami Hiramatsu CC: Ingo Molnar CC: Oleg Nesterov CC: linux-kernel@vger.kernel.org ---