Skip to content

Commit 5deeb9a

Browse files
danglin44gregkh
authored andcommitted
parisc: Correct completer in lws start
commit 8f66fce upstream. The completer in the "or,ev %r1,%r30,%r30" instruction is reversed, so we are not clipping the LWS number when we are called from a 32-bit process (W=0). We need to nulify the following depdi instruction when the least-significant bit of %r30 is 1. If the %r20 register is not clipped, a user process could perform a LWS call that would branch to an undefined location in the kernel and potentially crash the machine. Signed-off-by: John David Anglin <dave.anglin@bell.net> Cc: stable@vger.kernel.org # 4.19+ Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8b74561 commit 5deeb9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/parisc/kernel/syscall.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ lws_start:
478478
extrd,u %r1,PSW_W_BIT,1,%r1
479479
/* sp must be aligned on 4, so deposit the W bit setting into
480480
* the bottom of sp temporarily */
481-
or,ev %r1,%r30,%r30
481+
or,od %r1,%r30,%r30
482482

483483
/* Clip LWS number to a 32-bit value for 32-bit processes */
484484
depdi 0, 31, 32, %r20

0 commit comments

Comments
 (0)