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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Apr 2008 11:45:26 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Priit Laes <plaes@...es.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Jack Steiner <steiner@....com>
Subject: Re: [REGRESSION] x86: support for new UV apic

Ingo Molnar <mingo@...e.hu> writes:

> * Priit Laes <plaes@...es.org> wrote:
>
>> Hey,
>> 
>> I am getting two following warnings (probable one per each CPU core) 
>> using the latest Linus's git:
>> 
>> WARNING: at arch/x86/kernel/genapic_64.c:86 read_apic_id+0x30/0x62()
>> Modules linked in:
>> Pid: 1, comm: swapper Not tainted 2.6.25-03563-gf7288b1 #20
>
> thanks - could you check the patch below, does it fix the warnings?

I think it would have been better to change the WARN_ON to

WARN_ON(preemptible() && num_online_cpus() > 1)

Preemption is actually ok here because this runs before the other
CPUs are started

Alternative patch appended.

-Andi

---

Don't warn in read_apic_id() when preemptible but only one CPU online.

Signed-off-by: Andi Kleen <andi@...stfloor.org>

Index: linux/arch/x86/kernel/genapic_64.c
===================================================================
--- linux.orig/arch/x86/kernel/genapic_64.c
+++ linux/arch/x86/kernel/genapic_64.c
@@ -83,7 +83,7 @@ unsigned int read_apic_id(void)
 {
 	unsigned int id;
 
-	WARN_ON(preemptible());
+	WARN_ON(preemptible() && num_online_cpus() > 1);
 	id = apic_read(APIC_ID);
 	if (uv_system_type >= UV_X2APIC)
 		id  |= __get_cpu_var(x2apic_extra_bits);
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ