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: <20091117174204.GD5476@lenovo>
Date:	Tue, 17 Nov 2009 20:42:04 +0300
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	hpa@...or.com, mingo@...e.hu, travis@....com, tglx@...utronix.de,
	akpm@...ux-foundation.org, heiko.carstens@...ibm.com,
	rdreier@...co.com, rdunlap@...otime.net, tj@...nel.org,
	andi@...stfloor.org, gregkh@...e.de, yhlu.kernel@...il.com,
	rientjes@...gle.com, rostedt@...dmis.org, rusty@...tcorp.com.au,
	seto.hidetoshi@...fujitsu.com, steiner@....com, fweisbec@...il.com,
	x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] INIT: Limit the number of per cpu calibration
	bootup messages

On Tue, Nov 17, 2009 at 08:29:28AM -0800, David Miller wrote:
> From: Cyrill Gorcunov <gorcunov@...il.com>
> Date: Tue, 17 Nov 2009 18:59:46 +0300
> 
> > Perhaps for other archs like SPARC64, where as you said no need to
> > remember boot cpu id at all, we should define some __weak per-kernel
> > global helper which would return 0 and every arch would implement
> > own helper boot_cpu_id().
> 
> On many of my machines none of my cpus are numbered "0", so that
> wouldn't be a legitimate implementation on sparc64.
> 
> I see no reason for a platform the be required to remember the boot
> cpu ID, there is nothing special about that processor generically.

I fear we still need it and it's special due to code structure at
least. For SMP compiled kernel say callin() do change its behaviour
depending on which cpu it's called.

Also iy seems a differ techhique used to find out on which cpu
the code is running: there is smp_processor_id() == 0 and raw version
and boot_cpu_id and cpu == 0, so having one general boot_cpu_id() would
be more clear (though we will need to clean code up then :)

So plain hard_smp_processor_id() wouldn't help since it doesn't
say if this is a boot cpu or not.

> 
> And if we do need it generically, it's available there as
> hard_smp_processor_id() when start_kernel() is called.  So init/main.c
> could remember that value in an __initdata annotated static variable.
> 
> But just using a boolean for this "did I print the bogomips message
> already?" thing seems more than sufficient.
> 

Yes. As I see Mike already pick it up. Thanks David!

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