]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Ignore reserved field in DCSR and PVR reads and writes
authorAnton Blanchard <anton@samba.org>
Thu, 19 Jan 2017 03:19:10 +0000 (14:19 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 20 Jan 2017 04:21:35 +0000 (15:21 +1100)
commit5b753b463426a14d4b3d5ed82f73c1819dd4bbe4
tree87500f67fd6a68b6e43b3fc5513088c825804cf1
parentdb699d2210a5f3a91926f0bcfd94b22e945d354c
powerpc: Ignore reserved field in DCSR and PVR reads and writes

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.

Cc: stable@vger.kernel.org
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/ppc-opcode.h