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: <20081025213638.GA27356@uranus.ravnborg.org>
Date:	Sat, 25 Oct 2008 23:36:38 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Arjan van de Ven <arjan@...radead.org>,
	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	Matt Mackall <mpm@...enic.com>
Subject: Re: [pull request] getting rid of __cpuinit

> > > I tried to look a the numbers of a defconfig build here.
> > > cpuinit.text equals 0x5d97 = 23959
> > > cpuinit.data equals 0x3574 = 13684
> > > 
> > > [objdump of vmlinux.o gives you the size of the cpuinit sections]
> > > 
> > > So if we decide to drop cpuinit then it should be based on the
> > > above figure and not the 2k figure you gave in the original mail.
> > > 
> > > Or even better we should see the difference with a typical
> > > embedded configuration and not some big defconfig build.
> > > I will assume the saving is less on a typical embedded
> > > configuration.
> > 
> > it will be; on x86 you end up inheriting all cpu vendors init code.
> > on embedded you only have  the dedicated CPU code.
> > 
> > ... just that on x86... nobody seems to be in this position, it's
> > almost impossble to have HOTPLUG_CPU even be asked.
> 
> FWIW, I like the idea of removing __cpuinit.  It often is quite difficult to
> determine if given piece of code should be marked as __cpuinit and that leads
> to bugs that are not so easy to resolve.

Getting rid of __cpuinit would be good - I do not questions this.
I only want the decision to be taken based on the correct numbers,
which Arjan failed to provide initially.

I decided to try to build a typical arm target - netwinder.
It had HOTPLUG disabled which is why I took this one.

objdump -h a/vmlinux.o | grep cpu
  4 .cpuinit.text 000006ac  00000000  00000000  0023e3e4  2**2
 41 .cpuinit.data 00000040  00000000  00000000  002c31a8  2**2

objdump -h a/vmlinux.o | grep text
  0 .text         00227b44  00000000  00000000  00000040  2**5
  1 .text.head    00000240  00000000  00000000  00227ba0  2**5
  2 .init.text    000150b0  00000000  00000000  00227de0  2**5
  4 .cpuinit.text 000006ac  00000000  00000000  0023e3e4  2**2
  7 .devinit.text 00005c24  00000000  00000000  0023f78c  2**2
  9 .exit.text    00001124  00000000  00000000  002453e4  2**2
 11 .meminit.text 000002d4  00000000  00000000  002482b0  2**2
 12 .devexit.text 00000348  00000000  00000000  00248584  2**2

So we see that for this config on arm we only save ~1700 bytes
by the cpuinit stuff. And for data we save even less.

__cpuinit is almost not used in arm specific code so what we
have here is the savings from the shared code.

Considering these numbers the gain/pain ratio is too low
and I agree that the cpuinit stuff should go.

The reports that removing cpuinit/exit stuff adds a new set
of warnings should just be looked at.
Except from the tricky __cpuinit cases it is almost always
trivial to fix when you have understood the problem.

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