lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 13 Sep 2021 13:37:17 +0800
From:   wangyangbo <yangbonis@...oud.com>
To:     tsbogend@...ha.franken.de, hejinyang@...ngson.cn,
        chenhuacai@...nel.org, peterz@...radead.org, frederic@...nel.org,
        axboe@...nel.dk
Cc:     linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        xiehuanjun@...ontech.com, wangyangbo <yangbonis@...oud.com>
Subject: [PATCH 1/1] MIPS: Fix fpu trap invoked by io-worker

From: wangyangbo <wangyangbo@...ontech.com>

Create worker thread from original user task in mips, possibly copying
FPU flag from user task, introducing save_fp when switch_to, triggering
do_cpu trap. So clear USEDFPU flag for IO_WORKER in copy_thread.

Signed-off-by: wangyangbo <yangbonis@...oud.com>
---
 arch/mips/kernel/process.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 95aa86fa6077..0095006d48c7 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -135,6 +135,9 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
 		status |= ST0_EXL;
 #endif
 		childregs->cp0_status = status;
+
+		if (p->flags & PF_IO_WORKER)
+			clear_tsk_thread_flag(p, TIF_USEDFPU);
 		return 0;
 	}
 
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ