]> git.itanic.dy.fi Git - linux-stable/commit
parisc: Correct completer in lws start
authorJohn David Anglin <dave.anglin@bell.net>
Tue, 21 Dec 2021 18:21:22 +0000 (13:21 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Dec 2021 11:20:46 +0000 (12:20 +0100)
commitceeeb3a197463950827a81b41443ed30e6e82002
tree94c85c656ac0792537575e471aaa59ea5ca10cc7
parenteb84855d3e8799b67cdbadc7a5c53997cbfc3580
parisc: Correct completer in lws start

commit 8f66fce0f46560b9e910787ff7ad0974441c4f9c 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>
arch/parisc/kernel/syscall.S