]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/32s: fix allow/prevent_user_access() when crossing segment boundaries.
authorChristophe Leroy <christophe.leroy@c-s.fr>
Mon, 14 Oct 2019 16:51:28 +0000 (16:51 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Oct 2019 21:57:43 +0000 (08:57 +1100)
commit1a6f62e2bac530bc2bf6c8d036b00d0d550af7e8
tree04055f423810aea371f77a733419234e78f070f5
parenta612ac70cc9884b690cc6f74d7bb5fe40285f0be
powerpc/32s: fix allow/prevent_user_access() when crossing segment boundaries.

Make sure starting addr is aligned to segment boundary so that when
incrementing the segment, the starting address of the new segment is
below the end address. Otherwise the last segment might get  missed.

Fixes: dcc0ed4ef001 ("powerpc/32s: Implement Kernel Userspace Access Protection")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/067a1b09f15f421d40797c2d04c22d4049a1cee8.1571071875.git.christophe.leroy@c-s.fr
arch/powerpc/include/asm/book3s/32/kup.h