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: <20150304202227.GA6826@gmail.com>
Date:	Wed, 4 Mar 2015 21:22:27 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Borislav Petkov <bp@...en8.de>
Cc:	x86-ml <x86@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Andy Lutomirski <luto@...capital.net>,
	lkml <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [GIT PULL] x86/alternatives padding


* Borislav Petkov <bp@...en8.de> wrote:

> On Wed, Mar 04, 2015 at 12:22:06PM +0100, Borislav Petkov wrote:
> > Well, kernel image doesn't change while vmlinux shows only a very small
> > .text increase of about 2K. I'm not sure yet why that happens though
> > because it shouldn't be the padding. Because we will have to do it
> > anyway, this patchset makes it automatic instead of by-hand, so to
> > speak.
> > 
> > Let me bisect it and see which patch adds the increase.
> 
> Doh, of course. I've added u8 padlen to the alternative instruction
> entry struct. For 2Kish alt sites in total, this explains the almost
> exact same increase in text size:
> 
>    text    data     bss     dec     hex filename
> 12290539        1595264 1085440 14971243         e4716b vmlinux
> 
> 338ea55579d1... x86/lib/copy_user_64.S: Remove FIX_ALIGNMENT define
>    text    data     bss     dec     hex filename
> 12290539        1595264 1085440 14971243         e4716b vmlinux
> 
> db477a3386de... x86/alternatives: Cleanup DPRINTK macro
>    text    data     bss     dec     hex filename
> 12290539        1595264 1085440 14971243         e4716b vmlinux
> 
> 4332195c5615... x86/alternatives: Add instruction padding
>    text    data     bss     dec     hex filename
> 12293030        1595264 1085440 14973734         e47b26 vmlinux
> ^^^^^^^

So you could have a look at the detailed section dump itself via:

   objdump -h vmlinux

there .text will be the raw text and .alt* will be listed separately. 
The 'size' tool will add up executable sections IIRC, mixing these 
sections.

.alt* is freed after init, so it's not really a kernel image size 
increase, right?

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