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-next>] [day] [month] [year] [list]
Date:	Tue, 12 Aug 2014 20:45:44 +0800
From:	Chen Yucong <slaoub@...il.com>
To:	tony.luck@...el.com
Cc:	gong.chen@...ux.intel.com, andi@...stfloor.org,
	linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org,
	Chen Yucong <slaoub@...il.com>
Subject: [PATCH] x86, MCE: support raising machine check poll for software MCE injection in IRQ context

At present MCJ_NMI_BROADCAST(same for raise_local) supports both raise_exception()
and raise_poll(), but MCJ_IRQ_BROADCAST only supports raise_exception(). The goal
of this patch is that MCJ_IRQ_BROADCAST can support raising machine check poll.

Signed-off-by: Chen Yucong <slaoub@...il.com>
---
 arch/x86/kernel/cpu/mcheck/mce-inject.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c
index 5ac2d1f..97e4f7a 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c
@@ -99,11 +99,13 @@ static void mce_irq_ipi(void *info)
 	int cpu = smp_processor_id();
 	struct mce *m = &__get_cpu_var(injectm);
 
-	if (cpumask_test_cpu(cpu, mce_inject_cpumask) &&
-			m->inject_flags & MCJ_EXCEPTION) {
-		cpumask_clear_cpu(cpu, mce_inject_cpumask);
+	if (!cpumask_test_cpu(cpu, mce_inject_cpumask))
+		return;
+	cpumask_clear_cpu(cpu, mce_inject_cpumask);
+	if (m->inject_flags & MCJ_EXCEPTION)
 		raise_exception(m, NULL);
-	}
+	else if (m->status)
+		raise_poll(m);
 }
 
 /* Inject mce on current CPU */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists