x86: Fix off-by-one in instruction decoder
authorPeter Zijlstra <peterz@infradead.org>
Tue, 16 Dec 2014 10:46:14 +0000 (11:46 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 9 Jan 2015 10:12:26 +0000 (11:12 +0100)
commit0f363b250b15af0f218bb2876d101fe5cd413f8b
treeee748df1510d58c7895c0e151218ed6991ab4957
parent300176af031a2b1b9cb08ce1459845dcb2fac1b9
x86: Fix off-by-one in instruction decoder

Stephane reported that the PEBS fixup was broken by the recent commit to
the instruction decoder. The thing had an off-by-one which resulted in
not being able to decode the last instruction and always bail.

Reported-by: Stephane Eranian <eranian@google.com>
Fixes: 6ba48ff46f76 ("x86: Remove arbitrary instruction size limit in instruction decoder")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org # 3.18
Cc: <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Liang Kan <kan.liang@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Link: http://lkml.kernel.org/r/20141216104614.GV3337@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/lib/insn.c