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: <5533B6D7.9050101@roeck-us.net>
Date:	Sun, 19 Apr 2015 07:08:23 -0700
From:	Guenter Roeck <linux@...ck-us.net>
To:	Ingo Molnar <mingo@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	Rabin Vincent <rabin@....in>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"Paul E. McKenney" <paulmck@...ibm.com>
Subject: Re: qemu:arm test failure due to commit 8053871d0f7f (smp: Fix smp_call_function_single_async()
 locking)

On 04/19/2015 02:31 AM, Ingo Molnar wrote:
>
> * Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>
>> On Sun, Apr 19, 2015 at 4:48 AM, Linus Torvalds
>> <torvalds@...ux-foundation.org> wrote:
>>>
>>> Does that smaller patch work equally well?
>>
>> .. and here's a properly formatted email and patch.
>>
>>             Linus
>
>>   kernel/smp.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/kernel/smp.c b/kernel/smp.c
>> index 2aaac2c47683..07854477c164 100644
>> --- a/kernel/smp.c
>> +++ b/kernel/smp.c
>> @@ -159,8 +159,10 @@ static int generic_exec_single(int cpu, struct call_single_data *csd,
>>   	}
>>
>>
>> -	if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu))
>> +	if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu)) {
>> +		csd_unlock(csd);
>>   		return -ENXIO;
>> +	}
>
> Acked-by: Ingo Molnar <mingo@...nel.org>
>
Tested-by: Guenter Roeck <linux@...ck-us.net>

> Btw., in this case we should probably also generate a WARN_ONCE()
> warning?
>
> I _think_ most such callers calling an SMP function call for offline
> or out of range CPUs are at minimum racy.
>
Not really; at least the online cpu part is an absolutely normal use
case for qemu-arm.

Sure, you can argue that "this isn't the real system", and that
qemu-arm should be "fixed", but there are reasons - the emulation
is (much) slower if the number of CPUs is set to 4, and not everyone
who wants to use qemu has a system with as many CPUs as the emulated
system would normally have.

Thanks,
Guenter

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