Re: [RFC v2 5/7] arm64: initialize and switch ptrauth kernel keys
From: Kristina Martsenko <hidden>
Date: 2019-05-30 16:27:12
On 30/05/2019 04:34, Kees Cook wrote:
On Wed, May 29, 2019 at 08:03:30PM +0100, Kristina Martsenko wrote:quoted
Set up keys to use pointer authentication within the kernel. The kernel will be compiled with APIAKey instructions, the other keys are currently unused. Each task is given its own APIAKey, which is initialized during fork. The key is changed during context switch and on kernel entry from EL0. A function that changes the key cannot return, so compile such functions without pointer auth (using __no_ptrauth which will be defined to a compiler function attribute later). Signed-off-by: Kristina Martsenko <redacted>Just so I'm reading this right: the kernel is only using APIAKey?
Yes, that's right. The compiler options (in patch #7) will compile the kernel with only APIAKey instructions, so the kernel will only use APIAKey. We don't initialize or install the other 4 keys for the kernel (only for userspace). Let me know if the commit message could be clearer in some way.
Reviewed-by: Kees Cook <redacted>
Thanks for all the review! Kristina _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel