Files
android_kernel_xiaomi_sm8450/arch/powerpc/include/asm
Christophe Leroy 2679f9bd0a powerpc/8xx: Add Kernel Userspace Access Protection
This patch adds Kernel Userspace Access Protection on the 8xx.

When a page is RO or RW, it is set RO or RW for Key 0 and NA
for Key 1.

Up to now, the User group is defined with Key 0 for both User and
Supervisor.

By changing the group to Key 0 for User and Key 1 for Supervisor,
this patch prevents the Kernel from being able to access user data.

At exception entry, the kernel saves SPRN_MD_AP in the regs struct,
and reapply the protection. At exception exit it restores SPRN_MD_AP
with the value saved on exception entry.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[mpe: Drop allow_read/write_to/from_user() as they're now in kup.h]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-04-21 23:11:46 +10:00
..
2019-04-21 23:06:04 +10:00
2019-02-22 00:10:14 +11:00
2016-03-04 23:50:27 -06:00
2018-06-03 20:32:02 +10:00
2018-12-19 18:56:32 +11:00
2016-03-01 19:27:20 +11:00
2019-01-14 20:39:27 +11:00
2019-02-23 22:31:40 +11:00
2019-03-17 12:56:31 +09:00
2019-02-18 22:41:03 +11:00
2016-06-14 13:58:26 +10:00
2018-09-18 17:52:15 -05:00
2019-02-23 22:31:40 +11:00
2016-06-14 13:58:26 +10:00
2018-05-25 12:04:43 +10:00
2018-06-03 21:19:40 +10:00
2018-07-30 22:48:21 +10:00
2018-10-20 13:26:47 +11:00
2016-06-14 13:58:26 +10:00
2017-11-12 09:03:10 +11:00