linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: treat PF_IO_WORKER like PF_KTHREAD for mitigations
@ 2023-01-25 16:43 Jens Axboe
  2023-01-26 14:00 ` Will Deacon
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2023-01-25 16:43 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon; +Cc: linux-arm-kernel

Like PF_KTHREAD, PF_IO_WORKER never exit to userspace. They exist
entirely within the kernel, and hence don't need any task mitigations
applied.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

---

diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c
index fca9cc6f5581..25a21c3d446c 100644
--- a/arch/arm64/kernel/proton-pack.c
+++ b/arch/arm64/kernel/proton-pack.c
@@ -654,7 +654,7 @@ static void __update_pstate_ssbs(struct pt_regs *regs, bool state)
 void spectre_v4_enable_task_mitigation(struct task_struct *tsk)
 {
 	struct pt_regs *regs = task_pt_regs(tsk);
-	bool ssbs = false, kthread = tsk->flags & PF_KTHREAD;
+	bool ssbs = false, kthread = tsk->flags & (PF_KTHREAD | PF_IO_WORKER);
 
 	if (spectre_v4_mitigations_off())
 		ssbs = true;

-- 
Jens Axboe


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-28 16:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-25 16:43 [PATCH] arm64: treat PF_IO_WORKER like PF_KTHREAD for mitigations Jens Axboe
2023-01-26 14:00 ` Will Deacon
2023-01-26 14:07   ` Jens Axboe
2023-01-26 15:04     ` Catalin Marinas
2023-03-28 14:14     ` Will Deacon
2023-03-28 16:47       ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).