* [RFC] ppc64le: Enable emulation support for simple Load/Store instructions
@ 2016-10-20 6:31 Ravi Bangoria
2016-10-20 8:15 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Ravi Bangoria @ 2016-10-20 6:31 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel, mpe
Cc: anton, benh, paulus, oohall, lsorense, naveen.n.rao, stable,
Ravi Bangoria
emulate_step() uses a number of underlying kernel functions that were
initially not enabled for LE. This has been rectified since. So, fix
emulate_step() for LE for the corresponding instructions.
Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
---
Note: This patch only enables LOAD, STORE, LARX and STCX instructions.
I'll send a subsequent patch for other types like LOAD_FP,
LOAD_VMX etc.
arch/powerpc/lib/sstep.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index 3362299..82323ef 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -1807,8 +1807,6 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
goto instr_done;
case LARX:
- if (regs->msr & MSR_LE)
- return 0;
if (op.ea & (size - 1))
break; /* can't handle misaligned */
err = -EFAULT;
@@ -1832,8 +1830,6 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
goto ldst_done;
case STCX:
- if (regs->msr & MSR_LE)
- return 0;
if (op.ea & (size - 1))
break; /* can't handle misaligned */
err = -EFAULT;
@@ -1859,8 +1855,6 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
goto ldst_done;
case LOAD:
- if (regs->msr & MSR_LE)
- return 0;
err = read_mem(®s->gpr[op.reg], op.ea, size, regs);
if (!err) {
if (op.type & SIGNEXT)
@@ -1913,8 +1907,6 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
goto instr_done;
case STORE:
- if (regs->msr & MSR_LE)
- return 0;
if ((op.type & UPDATE) && size == sizeof(long) &&
op.reg == 1 && op.update_reg == 1 &&
!(regs->msr & MSR_PR) &&
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC] ppc64le: Enable emulation support for simple Load/Store instructions
2016-10-20 6:31 [RFC] ppc64le: Enable emulation support for simple Load/Store instructions Ravi Bangoria
@ 2016-10-20 8:15 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-10-20 8:15 UTC (permalink / raw)
To: Ravi Bangoria
Cc: linuxppc-dev, linux-kernel, mpe, anton, benh, paulus, oohall,
lsorense, naveen.n.rao, stable
On Thu, Oct 20, 2016 at 12:01:55PM +0530, Ravi Bangoria wrote:
> emulate_step() uses a number of underlying kernel functions that were
> initially not enabled for LE. This has been rectified since. So, fix
> emulate_step() for LE for the corresponding instructions.
>
> Reported-by: Anton Blanchard <anton@samba.org>
> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
> ---
> Note: This patch only enables LOAD, STORE, LARX and STCX instructions.
> I'll send a subsequent patch for other types like LOAD_FP,
> LOAD_VMX etc.
>
> arch/powerpc/lib/sstep.c | 8 --------
> 1 file changed, 8 deletions(-)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-20 8:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-20 6:31 [RFC] ppc64le: Enable emulation support for simple Load/Store instructions Ravi Bangoria
2016-10-20 8:15 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).