From: mingo@kernel.org (Ingo Molnar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] use -fstack-protector-strong
Date: Wed, 27 Nov 2013 12:27:32 +0100 [thread overview]
Message-ID: <20131127112731.GA10435@gmail.com> (raw)
In-Reply-To: <20131126203727.GA352@www.outflux.net>
* Kees Cook <keescook@chromium.org> wrote:
> On a defconfig x86_64 build (with CONFIG_CC_STACKPROTECTOR enabled), the
> delta in size is just under 9% larger:
>
> -rwxrwxr-x 1 kees kees 22134340 Nov 26 10:28 vmlinux.gcc-4.8
> -rwxrwxr-x 1 kees kees 22123870 Nov 26 10:40 vmlinux.gcc-4.9
> -rwxrwxr-x 1 kees kees 24225118 Nov 26 10:42 vmlinux.gcc-4.9+strong
Please run it through 'size' so that we know the real text size
increases.
If the cost of -fstack-protector-strong is really +9% in kernel text
size then that's rather significant!
If this option blows up our performance critical codepaths as well
then this will likely cause a runtime slowdown as well, in addition to
the increase in I$ footprint. That needs to be measured.
CONFIG_CC_STACKPROTECTOR=y is relatively cheap today. For example on
x86-64 defconfig:
text data bss dec filename
11378972 1455056 1191936 14025964 vmlinux # CONFIG_CC_STACKPROTECTOR is not set
11420243 1455056 1191936 14067235 vmlinux CONFIG_CC_STACKPROTECTOR=y
that's a +0.3% cost currently.
Thanks,
Ingo
WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@kernel.org>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org,
Nicolas Pitre <nicolas.pitre@linaro.org>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Russell King <linux@arm.linux.org.uk>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, Shawn Guo <shawn.guo@linaro.org>,
Olof Johansson <olofj@chromium.org>,
linux-arm-kernel@lists.infradead.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] use -fstack-protector-strong
Date: Wed, 27 Nov 2013 12:27:32 +0100 [thread overview]
Message-ID: <20131127112731.GA10435@gmail.com> (raw)
In-Reply-To: <20131126203727.GA352@www.outflux.net>
* Kees Cook <keescook@chromium.org> wrote:
> On a defconfig x86_64 build (with CONFIG_CC_STACKPROTECTOR enabled), the
> delta in size is just under 9% larger:
>
> -rwxrwxr-x 1 kees kees 22134340 Nov 26 10:28 vmlinux.gcc-4.8
> -rwxrwxr-x 1 kees kees 22123870 Nov 26 10:40 vmlinux.gcc-4.9
> -rwxrwxr-x 1 kees kees 24225118 Nov 26 10:42 vmlinux.gcc-4.9+strong
Please run it through 'size' so that we know the real text size
increases.
If the cost of -fstack-protector-strong is really +9% in kernel text
size then that's rather significant!
If this option blows up our performance critical codepaths as well
then this will likely cause a runtime slowdown as well, in addition to
the increase in I$ footprint. That needs to be measured.
CONFIG_CC_STACKPROTECTOR=y is relatively cheap today. For example on
x86-64 defconfig:
text data bss dec filename
11378972 1455056 1191936 14025964 vmlinux # CONFIG_CC_STACKPROTECTOR is not set
11420243 1455056 1191936 14067235 vmlinux CONFIG_CC_STACKPROTECTOR=y
that's a +0.3% cost currently.
Thanks,
Ingo
next prev parent reply other threads:[~2013-11-27 11:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-26 20:37 [PATCH v2] use -fstack-protector-strong Kees Cook
2013-11-26 20:37 ` Kees Cook
2013-11-27 11:27 ` Ingo Molnar [this message]
2013-11-27 11:27 ` Ingo Molnar
2013-11-27 17:21 ` Kees Cook
2013-11-27 17:21 ` Kees Cook
2013-11-27 17:54 ` Ingo Molnar
2013-11-27 17:54 ` Ingo Molnar
2013-11-27 17:55 ` H. Peter Anvin
2013-11-27 17:55 ` H. Peter Anvin
2013-11-27 18:11 ` Kees Cook
2013-11-27 18:11 ` Kees Cook
2013-12-17 0:57 ` Kees Cook
2013-12-17 0:57 ` Kees Cook
2013-12-17 11:29 ` Ingo Molnar
2013-12-17 11:29 ` Ingo Molnar
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=20131127112731.GA10435@gmail.com \
--to=mingo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.