Messages in this thread Patch in this message | | | From | Marc Zyngier <> | Subject | [PATCH v2 17/17] arm64: ssbd: Implement arch_seccomp_spec_mitigate | Date | Tue, 29 May 2018 13:11:21 +0100 |
| |
Now that we have a way to safely implement TIF_SSBD for tasks that are not in the kernel at the point were the flag gets set, let's implement arch_seccomp_spec_mitigate().
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> --- arch/arm64/kernel/ssbd.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/arch/arm64/kernel/ssbd.c b/arch/arm64/kernel/ssbd.c index 34eafdc7fb6b..a61da5e1b2ed 100644 --- a/arch/arm64/kernel/ssbd.c +++ b/arch/arm64/kernel/ssbd.c @@ -77,6 +77,13 @@ int arch_prctl_spec_ctrl_set(struct task_struct *task, unsigned long which, } } +#ifdef CONFIG_SECCOMP +void arch_seccomp_spec_mitigate(struct task_struct *task) +{ + ssbd_prctl_set(task, PR_SPEC_FORCE_DISABLE); +} +#endif + static int ssbd_prctl_get(struct task_struct *task) { switch (arm64_get_ssbd_state()) { -- 2.14.2
| |