Re: [PATCH v4 24/41] powerpc/book3s64/pkeys: Store/restore userspace AMR correctly on entry and exit from kernel

2020-07-06 Thread Nicholas Piggin
Excerpts from Aneesh Kumar K.V's message of July 3, 2020 7:30 pm: > On 7/3/20 2:48 PM, Nicholas Piggin wrote: >> Excerpts from Aneesh Kumar K.V's message of June 15, 2020 4:14 pm: >>> This prepare kernel to operate with a different value than userspace AMR. >>> For this, AMR needs to be saved and r

Re: [PATCH v4 24/41] powerpc/book3s64/pkeys: Store/restore userspace AMR correctly on entry and exit from kernel

2020-07-03 Thread Aneesh Kumar K.V
On 7/3/20 2:48 PM, Nicholas Piggin wrote: Excerpts from Aneesh Kumar K.V's message of June 15, 2020 4:14 pm: This prepare kernel to operate with a different value than userspace AMR. For this, AMR needs to be saved and restored on entry and return from the kernel. With KUAP we modify kernel AMR

Re: [PATCH v4 24/41] powerpc/book3s64/pkeys: Store/restore userspace AMR correctly on entry and exit from kernel

2020-07-03 Thread Nicholas Piggin
Excerpts from Aneesh Kumar K.V's message of June 15, 2020 4:14 pm: > This prepare kernel to operate with a different value than userspace AMR. > For this, AMR needs to be saved and restored on entry and return from the > kernel. > > With KUAP we modify kernel AMR when accessing user address from t

[PATCH v4 24/41] powerpc/book3s64/pkeys: Store/restore userspace AMR correctly on entry and exit from kernel

2020-06-15 Thread Aneesh Kumar K.V
This prepare kernel to operate with a different value than userspace AMR. For this, AMR needs to be saved and restored on entry and return from the kernel. With KUAP we modify kernel AMR when accessing user address from the kernel via copy_to/from_user interfaces. If MMU_FTR_KEY is enabled we alw