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]
Message-ID: <20080922102524.GB30137@elte.hu>
Date:	Mon, 22 Sep 2008 12:25:24 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Andrea Righi <righi.andrea@...il.com>
Cc:	robert.richter@....com, akpm@...ux-foundation.org,
	oprofile-list@...ts.sf.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -mm] oprofile: BUG: using smp_processor_id() in
	preemptible code


* Andrea Righi <righi.andrea@...il.com> wrote:

> Add local_irq_save() / local_irq_restore() before setting per cpu 
> variable switch_index, to avoid the following BUG:

that just papers over the bug:

> +	local_irq_save(flags);
>  	__get_cpu_var(switch_index) = 0;
> +	local_irq_restore(flags);

either use __raw_get_cpu_var() if we are for sure not preemptible here, 
or fix the preemption status of this codepath.

	Ingo
--
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