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:	Tue, 24 Nov 2015 17:52:14 +0300
From:	Nikita Yushchenko <nyushchenko@....rtsoft.ru>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
CC:	Vladimir Murzin <vladimir.murzin@....com>,
	kuznetsovg@....rtsoft.ru, Ian Campbell <ian.campbell@...rix.com>,
	Mason <slash.tmp@...e.fr>,
	Ard Biesheuvel <ard.biesheuvel@...aro.org>,
	Will Deacon <will.deacon@....com>,
	Paul Kocialkowski <contact@...lk.fr>,
	linux-kernel@...r.kernel.org,
	Masahiro Yamada <yamada.m@...panasonic.com>,
	Pavel Machek <pavel@....cz>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC/PATCH] arm: do not skip SMP init calls on SMP_ON_UP case

>> Just booted mainline...  unline linux-imx, it does not try to init cpu1.
>>
>> However, imx6dl.dtsi from mainline also has both cpu@0 and cpu@1
>>
>> So missing piece in linux-imx is elsewhere :(
> 
> It works as you mentioned - and it relies upon the code you tried to
> modify.
> 
> The early boot code detects that the boot CPU is not SMP capable, so
> through SMP_ON_UP, it "turns off" SMP support by fixing up the code
> and making is_smp() return false.
> 
> This prevents smp_init_cpus() being called, which in turn prevents
> imx_smp_init_cpus() executing, which prevents the CPU possible mask
> including any CPU but the boot CPU.
> 
> As only the boot CPU is possible, this prevents the SMP code trying
> to bring any secondary CPUs online.

I'm still trying to understand what is going on, and my printk()s show
that this is not entirely true.

When smp_init() is entered on mainline om imx6s, cpu_possible_mask and
cpu_present_mask both contain two cpus. These get initialized in
arm_dt_init_cpu_maps() and stay unmodified since then.

But cpu_online() returns 1 for cpu0 and 0 from cpu1 - thus it is
cpu_online() check, not possible_mask or present_mask, that prevents
cpu1 initialization attempt.

Not sure I understand logic behind this. With the current code,
resulting cpu_possible_mask depends on CONFIG_SMP_ON_UP:
- if it is set, cpu_possible_mask contains (0 1), as initialized in
arm_dt_init_cpu_maps()
- if it is not set, cpu_possible_mask contains (0), since
imx_smp_init_cpus() removes 1 from there.

This does not seem to be intended difference.




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