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, 17 Feb 2012 13:01:46 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Gilad Ben-Yossef <gilad@...yossef.com>
Cc:	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Milton Miller <miltonm@....com>,
	x86@...nel.org, Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] x86: drop false warning of empty cpumask in IPI


* Gilad Ben-Yossef <gilad@...yossef.com> wrote:

> With current generic SMP infrastructure, it is feasible
> for the target CPUs to begin processing an IPI work item
> even before we sent them the actual IPI in the case that
> an IPI from another CPU woke them first.
> 
> This can lead to generating a false warning in a valid
> state of trying to send IPI with an empty cpumask when
> multiple concurrent IPIs are being sent.
> 
> This patch was triggered by the following LKML discussion:
> https://lkml.org/lkml/2012/1/13/308
> 
> Signed-off-by: Gilad Ben-Yossef <gilad@...yossef.com>
> CC: Thomas Gleixner <tglx@...utronix.de>
> CC: Ingo Molnar <mingo@...hat.com>
> CC: "H. Peter Anvin" <hpa@...or.com>
> CC: Milton Miller <miltonm@....com>
> CC: x86@...nel.org
> ---
>  arch/x86/kernel/apic/ipi.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/apic/ipi.c b/arch/x86/kernel/apic/ipi.c
> index cce91bf..00b68a3 100644
> --- a/arch/x86/kernel/apic/ipi.c
> +++ b/arch/x86/kernel/apic/ipi.c
> @@ -106,7 +106,10 @@ void default_send_IPI_mask_logical(const struct cpumask *cpumask, int vector)
>  	unsigned long mask = cpumask_bits(cpumask)[0];
>  	unsigned long flags;
>  
> -	if (WARN_ONCE(!mask, "empty IPI mask"))
> +	if (!mask)
> +		/* The target CPUs must have already processed the
> +		 * work items due to a concurrent IPI
> +		 */
>  		return;

This could potentially hide real bugs on other callsites.

So why not do the checking at the call site? In almost every 
other scenario it's invalid to send an empty mask.

Thanks,

	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