All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emese Revfy <re.emese@gmail.com>
To: Mathias Krause <minipli@ld-linux.so>
Cc: kernel-hardening@lists.openwall.com, pageexec@freemail.hu,
	spender@grsecurity.net, mmarek@suse.com, keescook@chromium.org,
	linux-kernel@vger.kernel.org, yamada.masahiro@socionext.com,
	linux-kbuild@vger.kernel.org, linux@armlinux.org.uk,
	catalin.marinas@arm.com, linux@rasmusvillemoes.dk,
	david.brown@linaro.org, benh@kernel.crashing.org,
	tglx@linutronix.de, akpm@linux-foundation.org,
	jlayton@poochiereds.net, arnd@arndb.de
Subject: Re: [PATCH v1 0/2] Introduce the initify gcc plugin
Date: Tue, 28 Jun 2016 22:29:41 +0200	[thread overview]
Message-ID: <20160628222941.3f76a4a09767c0134a03a70b@gmail.com> (raw)
In-Reply-To: <20160628170022.GH22554@ld-linux.so>

On Tue, 28 Jun 2016 19:00:22 +0200
Mathias Krause <minipli@ld-linux.so> wrote:

> > section         vanilla                 vanilla + initify        change
> > -----------------------------------------------------------------------
> > .rodata         39059688 (0x25400e8)    38527210 (0x24be0ea)    -532478
> > .data           45744128 (0x2ba0000)    45404160 (0x2b4d000)    -339968
> > .init.data       1361144  (0x14c4f8)     1674200  (0x198bd8)    +313056
> > .text           77615128 (0x4a05018)    77576664 (0x49fb9d8)     -38464
> > .init.text       1108455  (0x10e9e7)     1137618  (0x115bd2)     +29163
> 
> You should probably provide numbers for .init.rodata.str, .exit.rodata.str
> and .exit.text as well. Otherwise this delta calculation suggests a rather
> gigantic image size reduction which is probably not the case ;)

init.rodata.str is an input section that merges into the INIT_DATA output section.
I didn't make statistics for exit* yet because I have a problem with that (I asked
for help in a previous e-mail).
 
> Also a comparison of the final kernel image size would be nice to see if

I no longer have the vmlinux images but I saved away the readelf outputs,
here's the PT_LOAD size data:

        FileSiz (vanilla)       FileSiz (vanilla+initify)       change
-----------------------------------------------------------------------
00      119189504 (0x71ab000)   118657024 (0x7129000)           -532480
01       45838336 (0x2bb7000)    45498368 (0x2b64000)           -339968
03        2830336  (0x2b3000)     3198976  (0x30d000)           +368640


00     .text .text.exit .text.startup .notes __ex_table .rodata __bug_table .pci_fixup
       .builtin_fw .tracedata __ksymtab __ksymtab_gpl __ksymtab_strings __init_rodata __param __modver
01     .data .fini_array .vvar
03     .init.text .altinstr_aux .init.data .x86_cpu_dev.init .parainstructions .altinstructions
       .altinstr_replacement .iommu_table .apicdrivers .exit.text .exit.data .smp_locks .bss .brk

I think the smaller .data section is wrong, so I'll look into it.

-- 
Emese

WARNING: multiple messages have this Message-ID (diff)
From: Emese Revfy <re.emese@gmail.com>
To: Mathias Krause <minipli@ld-linux.so>
Cc: kernel-hardening@lists.openwall.com, pageexec@freemail.hu,
	spender@grsecurity.net, mmarek@suse.com, keescook@chromium.org,
	linux-kernel@vger.kernel.org, yamada.masahiro@socionext.com,
	linux-kbuild@vger.kernel.org, linux@armlinux.org.uk,
	catalin.marinas@arm.com, linux@rasmusvillemoes.dk,
	david.brown@linaro.org, benh@kernel.crashing.org,
	tglx@linutronix.de, akpm@linux-foundation.org,
	jlayton@poochiereds.net, arnd@arndb.de
Subject: [kernel-hardening] Re: [PATCH v1 0/2] Introduce the initify gcc plugin
Date: Tue, 28 Jun 2016 22:29:41 +0200	[thread overview]
Message-ID: <20160628222941.3f76a4a09767c0134a03a70b@gmail.com> (raw)
In-Reply-To: <20160628170022.GH22554@ld-linux.so>

On Tue, 28 Jun 2016 19:00:22 +0200
Mathias Krause <minipli@ld-linux.so> wrote:

> > section         vanilla                 vanilla + initify        change
> > -----------------------------------------------------------------------
> > .rodata         39059688 (0x25400e8)    38527210 (0x24be0ea)    -532478
> > .data           45744128 (0x2ba0000)    45404160 (0x2b4d000)    -339968
> > .init.data       1361144  (0x14c4f8)     1674200  (0x198bd8)    +313056
> > .text           77615128 (0x4a05018)    77576664 (0x49fb9d8)     -38464
> > .init.text       1108455  (0x10e9e7)     1137618  (0x115bd2)     +29163
> 
> You should probably provide numbers for .init.rodata.str, .exit.rodata.str
> and .exit.text as well. Otherwise this delta calculation suggests a rather
> gigantic image size reduction which is probably not the case ;)

init.rodata.str is an input section that merges into the INIT_DATA output section.
I didn't make statistics for exit* yet because I have a problem with that (I asked
for help in a previous e-mail).
 
> Also a comparison of the final kernel image size would be nice to see if

I no longer have the vmlinux images but I saved away the readelf outputs,
here's the PT_LOAD size data:

        FileSiz (vanilla)       FileSiz (vanilla+initify)       change
-----------------------------------------------------------------------
00      119189504 (0x71ab000)   118657024 (0x7129000)           -532480
01       45838336 (0x2bb7000)    45498368 (0x2b64000)           -339968
03        2830336  (0x2b3000)     3198976  (0x30d000)           +368640


00     .text .text.exit .text.startup .notes __ex_table .rodata __bug_table .pci_fixup
       .builtin_fw .tracedata __ksymtab __ksymtab_gpl __ksymtab_strings __init_rodata __param __modver
01     .data .fini_array .vvar
03     .init.text .altinstr_aux .init.data .x86_cpu_dev.init .parainstructions .altinstructions
       .altinstr_replacement .iommu_table .apicdrivers .exit.text .exit.data .smp_locks .bss .brk

I think the smaller .data section is wrong, so I'll look into it.

-- 
Emese

  reply	other threads:[~2016-06-28 20:23 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28 11:34 [PATCH v1 0/2] Introduce the initify gcc plugin Emese Revfy
2016-06-28 11:34 ` [kernel-hardening] " Emese Revfy
2016-06-28 11:35 ` [PATCH v1 1/2] Add " Emese Revfy
2016-06-28 11:35   ` [kernel-hardening] " Emese Revfy
2016-06-28 21:05   ` Rasmus Villemoes
2016-06-28 21:05     ` [kernel-hardening] " Rasmus Villemoes
2016-06-29 14:50     ` Kees Cook
2016-06-29 14:50       ` [kernel-hardening] " Kees Cook
2016-06-29 14:50       ` Kees Cook
2016-06-29 19:03     ` Emese Revfy
2016-06-29 19:03       ` [kernel-hardening] " Emese Revfy
2016-06-28 11:36 ` [PATCH v1 2/2] Mark functions with the __nocapture attribute Emese Revfy
2016-06-28 11:36   ` [kernel-hardening] " Emese Revfy
2016-06-28 16:43   ` Joe Perches
2016-06-28 16:43     ` [kernel-hardening] " Joe Perches
2016-06-28 20:40     ` Emese Revfy
2016-06-28 20:40       ` [kernel-hardening] " Emese Revfy
2016-06-28 21:00       ` Joe Perches
2016-06-28 21:00         ` [kernel-hardening] " Joe Perches
2016-06-29 18:42         ` Emese Revfy
2016-06-29 18:42           ` [kernel-hardening] " Emese Revfy
2016-06-30  0:12           ` Joe Perches
2016-06-30  0:12             ` [kernel-hardening] " Joe Perches
2016-07-01 14:03             ` Emese Revfy
2016-07-01 14:03               ` [kernel-hardening] " Emese Revfy
2016-06-28 20:50   ` Rasmus Villemoes
2016-06-28 20:50     ` [kernel-hardening] " Rasmus Villemoes
2016-06-28 21:38     ` PaX Team
2016-06-28 21:38       ` [kernel-hardening] " PaX Team
2016-06-28 22:41       ` Rasmus Villemoes
2016-06-28 22:41         ` [kernel-hardening] " Rasmus Villemoes
2016-06-29 18:39     ` Emese Revfy
2016-06-29 18:39       ` [kernel-hardening] " Emese Revfy
2016-06-28 11:42 ` [PATCH v1 0/2] Introduce the initify gcc plugin Emese Revfy
2016-06-28 11:42   ` [kernel-hardening] " Emese Revfy
2016-06-28 12:57 ` [kernel-hardening] " Mark Rutland
2016-06-28 16:14   ` Emese Revfy
2016-06-28 20:46     ` Kees Cook
2016-06-28 20:46       ` Kees Cook
2016-06-29  8:21       ` Mark Rutland
2016-06-29  8:21         ` Mark Rutland
2016-06-29 17:52         ` Mark Rutland
2016-06-29 17:52           ` Mark Rutland
2016-06-29 18:28           ` Emese Revfy
2016-06-29 18:28             ` Emese Revfy
2016-06-28 16:35 ` Joe Perches
2016-06-28 16:35   ` [kernel-hardening] " Joe Perches
2016-06-28 18:48   ` Joe Perches
2016-06-28 18:48     ` [kernel-hardening] " Joe Perches
2016-06-28 19:02     ` Rasmus Villemoes
2016-06-28 19:02       ` [kernel-hardening] " Rasmus Villemoes
2016-06-28 20:29       ` Emese Revfy
2016-06-28 20:29         ` [kernel-hardening] " Emese Revfy
2016-06-28 17:00 ` Mathias Krause
2016-06-28 17:00   ` [kernel-hardening] " Mathias Krause
2016-06-28 20:29   ` Emese Revfy [this message]
2016-06-28 20:29     ` Emese Revfy
2016-06-28 21:49 ` Joe Perches
2016-06-28 21:49   ` [kernel-hardening] " Joe Perches
2016-06-28 22:07   ` Valdis.Kletnieks
2016-06-28 23:54     ` Joe Perches

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=20160628222941.3f76a4a09767c0134a03a70b@gmail.com \
    --to=re.emese@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=catalin.marinas@arm.com \
    --cc=david.brown@linaro.org \
    --cc=jlayton@poochiereds.net \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@rasmusvillemoes.dk \
    --cc=minipli@ld-linux.so \
    --cc=mmarek@suse.com \
    --cc=pageexec@freemail.hu \
    --cc=spender@grsecurity.net \
    --cc=tglx@linutronix.de \
    --cc=yamada.masahiro@socionext.com \
    /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.