LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: x86-ml <x86@kernel.org>, Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Andy Lutomirski <luto@amacapital.net>,
lkml <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [GIT PULL] x86/alternatives padding
Date: Wed, 4 Mar 2015 21:22:27 +0100 [thread overview]
Message-ID: <20150304202227.GA6826@gmail.com> (raw)
In-Reply-To: <20150304114151.GD3516@pd.tnic>
* Borislav Petkov <bp@alien8.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
next prev parent reply other threads:[~2015-03-04 20:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 17:06 Borislav Petkov
2015-03-04 7:32 ` Ingo Molnar
2015-03-04 11:22 ` Borislav Petkov
2015-03-04 11:41 ` Borislav Petkov
2015-03-04 20:22 ` Ingo Molnar [this message]
2015-03-04 21:02 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150304202227.GA6826@gmail.com \
--to=mingo@kernel.org \
--cc=acme@kernel.org \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
--subject='Re: [GIT PULL] x86/alternatives padding' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).