arm64: ssbd: Introduce thread flag to control userspace mitigation
commitcf14b896e77685eb89c8b02951f3b8d428e8dce0
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 20 Jul 2018 09:56:29 +0000 (20 10:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Jul 2018 12:27:42 +0000 (22 14:27 +0200)
tree7d4bdf7d6c20fe1288e067db13db5f7e27e2fdba
parentd8fbc84469f3b796c574740b3f4a0a8df51cb9b6
arm64: ssbd: Introduce thread flag to control userspace mitigation

commit 9dd9614f5476687abbff8d4b12cd08ae70d7c2ad upstream.

In order to allow userspace to be mitigated on demand, let's
introduce a new thread flag that prevents the mitigation from
being turned off when exiting to userspace, and doesn't turn
it on on entry into the kernel (with the assumption that the
mitigation is always enabled in the kernel itself).

This will be used by a prctl interface introduced in a later
patch.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/thread_info.h
arch/arm64/kernel/entry.S