aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2017-01-18 22:19:10 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-26 02:24:39 -0500
commitbf15e45eee7ab5df30cc9ec0f7030fbccf1d55b0 (patch)
tree1e1d708412c79ac4114202f3c1c44b46da9bf50e
parente097785467134635a99a223168ff3825c6fb9d01 (diff)
powerpc: Ignore reserved field in DCSR and PVR reads and writes
commit 178f358208ceb8b38e5cff3f815e0db4a6a70a07 upstream. IBM bit 31 (for the rest of us - bit 0) is a reserved field in the instruction definition of mtspr and mfspr. Hardware is encouraged to (and does) ignore it. As a result, if userspace executes an mtspr DSCR with the reserved bit set, we get a DSCR facility unavailable exception. The kernel fails to match against the expected value/mask, and we silently return to userspace to try and re-execute the same mtspr DSCR instruction. We loop forever until the process is killed. We should do something here, and it seems mirroring what hardware does is the better option vs killing the process. While here, relax the matching of mfspr PVR too. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/powerpc/include/asm/ppc-opcode.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
index c56ea8c84abb..c4ced1d01d57 100644
--- a/arch/powerpc/include/asm/ppc-opcode.h
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -157,7 +157,7 @@
157#define PPC_INST_MCRXR 0x7c000400 157#define PPC_INST_MCRXR 0x7c000400
158#define PPC_INST_MCRXR_MASK 0xfc0007fe 158#define PPC_INST_MCRXR_MASK 0xfc0007fe
159#define PPC_INST_MFSPR_PVR 0x7c1f42a6 159#define PPC_INST_MFSPR_PVR 0x7c1f42a6
160#define PPC_INST_MFSPR_PVR_MASK 0xfc1fffff 160#define PPC_INST_MFSPR_PVR_MASK 0xfc1ffffe
161#define PPC_INST_MFTMR 0x7c0002dc 161#define PPC_INST_MFTMR 0x7c0002dc
162#define PPC_INST_MSGSND 0x7c00019c 162#define PPC_INST_MSGSND 0x7c00019c
163#define PPC_INST_MSGCLR 0x7c0001dc 163#define PPC_INST_MSGCLR 0x7c0001dc
@@ -174,13 +174,13 @@
174#define PPC_INST_RFDI 0x4c00004e 174#define PPC_INST_RFDI 0x4c00004e
175#define PPC_INST_RFMCI 0x4c00004c 175#define PPC_INST_RFMCI 0x4c00004c
176#define PPC_INST_MFSPR_DSCR 0x7c1102a6 176#define PPC_INST_MFSPR_DSCR 0x7c1102a6
177#define PPC_INST_MFSPR_DSCR_MASK 0xfc1fffff 177#define PPC_INST_MFSPR_DSCR_MASK 0xfc1ffffe
178#define PPC_INST_MTSPR_DSCR 0x7c1103a6 178#define PPC_INST_MTSPR_DSCR 0x7c1103a6
179#define PPC_INST_MTSPR_DSCR_MASK 0xfc1fffff 179#define PPC_INST_MTSPR_DSCR_MASK 0xfc1ffffe
180#define PPC_INST_MFSPR_DSCR_USER 0x7c0302a6 180#define PPC_INST_MFSPR_DSCR_USER 0x7c0302a6
181#define PPC_INST_MFSPR_DSCR_USER_MASK 0xfc1fffff 181#define PPC_INST_MFSPR_DSCR_USER_MASK 0xfc1ffffe
182#define PPC_INST_MTSPR_DSCR_USER 0x7c0303a6 182#define PPC_INST_MTSPR_DSCR_USER 0x7c0303a6
183#define PPC_INST_MTSPR_DSCR_USER_MASK 0xfc1fffff 183#define PPC_INST_MTSPR_DSCR_USER_MASK 0xfc1ffffe
184#define PPC_INST_MFVSRD 0x7c000066 184#define PPC_INST_MFVSRD 0x7c000066
185#define PPC_INST_MTVSRD 0x7c000166 185#define PPC_INST_MTVSRD 0x7c000166
186#define PPC_INST_SLBFEE 0x7c0007a7 186#define PPC_INST_SLBFEE 0x7c0007a7