“a1b6aba723f2ab3f2248aeebbc5371b223f31b73”上不存在“...sample/nio/git@gitcode.net:openanolis/dragonwell8_jdk.git”
提交 070132d1 编写于 作者: A Ananth N Mavinakayanahalli 提交者: Zheng Zengkai

powerpc/sstep: Fix incorrect return from analyze_instr()

stable inclusion
from stable-5.10.21
commit 686fa5a0c647721f24721a53e9d78972eb673e02
bugzilla: 50609

--------------------------------

commit 718aae91 upstream.

We currently just percolate the return value from analyze_instr()
to the caller of emulate_step(), especially if it is a -1.

For one particular case (opcode = 4) for instructions that aren't
currently emulated, we are returning 'should not be single-stepped'
while we should have returned 0 which says 'did not emulate, may
have to single-step'.

Fixes: 930d6288 ("powerpc: sstep: Add support for maddhd, maddhdu, maddld instructions")
Signed-off-by: NAnanth N Mavinakayanahalli <ananth@linux.ibm.com>
Suggested-by: NMichael Ellerman <mpe@ellerman.id.au>
Tested-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: NSandipan Das <sandipan@linux.ibm.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/161157999039.64773.14950289716779364766.stgit@thinktux.localSigned-off-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e4c0a635
...@@ -1382,6 +1382,11 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, ...@@ -1382,6 +1382,11 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
#ifdef __powerpc64__ #ifdef __powerpc64__
case 4: case 4:
/*
* There are very many instructions with this primary opcode
* introduced in the ISA as early as v2.03. However, the ones
* we currently emulate were all introduced with ISA 3.0
*/
if (!cpu_has_feature(CPU_FTR_ARCH_300)) if (!cpu_has_feature(CPU_FTR_ARCH_300))
goto unknown_opcode; goto unknown_opcode;
...@@ -1409,7 +1414,7 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, ...@@ -1409,7 +1414,7 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
* There are other instructions from ISA 3.0 with the same * There are other instructions from ISA 3.0 with the same
* primary opcode which do not have emulation support yet. * primary opcode which do not have emulation support yet.
*/ */
return -1; goto unknown_opcode;
#endif #endif
case 7: /* mulli */ case 7: /* mulli */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册