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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871rmxgw4d.fsf@nanos.tec.linutronix.de>
Date:   Tue, 02 Jun 2020 20:28:50 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Ingo Molnar <mingo@...nel.org>,
        Balbir Singh <sblbir@...zon.com>
Cc:     torvalds@...ux-foundation.org, a.p.zijlstra@...llo.nl,
        akpm@...ux-foundation.org, bp@...en8.de,
        linux-kernel@...r.kernel.org, luto@...nel.org
Subject: Re: [GIT PULL] x86/mm changes for v5.8

Benjamin Herrenschmidt <benh@...nel.crashing.org> writes:
> On Tue, 2020-06-02 at 09:33 +0200, Ingo Molnar wrote:
>> Or rather, we should ask a higher level question as well, maybe we 
>> should not do this feature at all?
>
> Well, it does solve a real issue in some circumstances and there was a
> reasonable discussion about this on the list that lead to it being
> merged with Kees and Thomas (and others) agreeing :)
>
> But yes, it is pointless with SMT and yes maybe we should make it
> explicitly do nothing on SMT, but let's not throw the baby out with the
> bath water shall we ?

It's trivial enough to fix. We have a static key already which is
telling us whether SMT scheduling is active.

Thanks,

        tglx
---
 arch/x86/mm/tlb.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -8,6 +8,7 @@
 #include <linux/export.h>
 #include <linux/cpu.h>
 #include <linux/debugfs.h>
+#include <linux/sched/smt.h>
 
 #include <asm/tlbflush.h>
 #include <asm/mmu_context.h>
@@ -457,7 +458,7 @@ static void cond_mitigation(struct task_
 			indirect_branch_prediction_barrier();
 	}
 
-	if (prev_mm & LAST_USER_MM_L1D_FLUSH) {
+	if (!sched_smt_active() && prev_mm & LAST_USER_MM_L1D_FLUSH) {
 		/*
 		 * Don't populate the TLB for the software fallback flush.
 		 * Populate TLB is not needed for this use case.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ