All of lore.kernel.org
 help / color / mirror / Atom feed
From: P J P <ppandit@redhat.com>
To: Kees Cook <keescook@chromium.org>
Cc: Kernel Hardening <kernel-hardening@lists.openwall.com>,
	Florian Weimer <fweimer@redhat.com>,
	P J P <pjp@fedoraproject.org>, Laura Abbott <labbott@redhat.com>
Subject: Re: [PATCH 0/1] Zero initialise kernel stack variables
Date: Wed, 28 Feb 2018 11:34:00 +0530 (IST)	[thread overview]
Message-ID: <nycvar.YSQ.7.76.1802281122170.21989@wniryva> (raw)
In-Reply-To: <CAGXu5j+-qUrt-8kQ6WRUM=DH8K3Zgmm2ejRgiKJMLDrSXRtmdg@mail.gmail.com>

  Hello Kees, Laura,

Thank you so much for the kind review, I appreciate it.

+-- On Tue, 27 Feb 2018, Kees Cook wrote --+
| Unfortunately "noticeable" isn't going to be a viable metric. You'll need to 
| do some real-world benchmarks (i.e. kernel builds, hackbench, etc), and 
| compare the results.

  Yes, okay. I'll do this exercise and get back with the results.

| Even just initializing passed-by-reference variables 
| (GCC_PLUGIN_STRUCTLEAK_BYREF_ALL) had measurable performance impact.

  I see.
 
| It would be nice to have four options/features available from the
| compiler, from least to most performance impact:
| 
| - initialize padding to zero when static initializers are used (this would 
|   make foo = { .field = something }; identical to memset(&foo, 0, 
|   sizeof(foo)); foo.field = something for all structures, but now, any 
|   structures with padding _must_ use the latter to be safe, which is highly 
|   error-prone).
| 
| - initialize all uninitialized variables that contain a structure marked 
|   with a special attribute (e.g.  __attribute__((force_initialize)) ).
| 
| - initialize all uninitialized variables that are passed by reference (see 
|   GCC_PLUGIN_STRUCTLEAK_BYREF_ALL).
| 
| - initialize all uninitialized variables (-finit-local-vars seems to do 
|   this)

  I see, will check about these.
 
| > The patch here adds a kbuild menu option to enable/disable '-finit-local-vars'
| > compiler flag while building the Linux kernel.
| 
| Since this is a single patch, I think it'd be better to fold this
| entire cover letter into patch 1.

  Right, okay.

Thank you so much.
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

  parent reply	other threads:[~2018-02-28  6:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 11:15 [PATCH 0/1] Zero initialise kernel stack variables P J P
2018-02-27 11:15 ` [PATCH 1/1] Add an option to build kernel with -finit-local-vars P J P
2018-02-27 19:22   ` Laura Abbott
2018-02-27 19:33     ` Kees Cook
2018-02-28  5:49     ` P J P
2018-02-27 19:28 ` [PATCH 0/1] Zero initialise kernel stack variables Kees Cook
2018-02-27 23:26   ` Laura Abbott
2018-02-27 23:38     ` Kees Cook
2018-02-28  6:22       ` P J P
2018-02-28  8:25       ` Florian Weimer
2018-02-28  6:04   ` P J P [this message]
2018-03-02 19:52   ` Nick Kralevich
2018-03-02 21:01     ` Casey Schaufler
2018-03-05 20:42       ` Kees Cook

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=nycvar.YSQ.7.76.1802281122170.21989@wniryva \
    --to=ppandit@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=labbott@redhat.com \
    --cc=pjp@fedoraproject.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.