All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Aloni <dan@kernelim.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: paul@paul-moore.com, selinux@vger.kernel.org,
	keescook@chromium.org, omosnace@redhat.com, jeffv@google.com
Subject: Re: [RFC PATCH] selinux: randomize layout of key structures
Date: Sat, 14 Dec 2019 20:50:02 +0200	[thread overview]
Message-ID: <20191214185002.GA8076@gmail.com> (raw)
In-Reply-To: <20191213202838.7323-1-sds@tycho.nsa.gov>

On Fri, Dec 13, 2019 at 03:28:38PM -0500, Stephen Smalley wrote:
> I would have expected that two kernels built with the same config
> with this enabled would have yielded different struct layouts in
> pahole vmlinux output, but that doesn't appear to be the case. They
> do have different seeds.  Am I doing something wrong?
> Also, does DEBUG_INFO_BTF effectively undermine/negate the benefits of this
> change if enabled?

There's currently a long-standing bug with the GCC plugin where the
generated debug info is in declaration order, not build order (see:
[1]).  So, to verify it, try looking at the generated machine code.

Planned Clang implementation of this feature does not have this bug.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?format=multiple&id=84052

-- 
Dan Aloni

  reply	other threads:[~2019-12-14 18:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13 20:28 [RFC PATCH] selinux: randomize layout of key structures Stephen Smalley
2019-12-14 18:50 ` Dan Aloni [this message]
2019-12-16 14:22   ` Stephen Smalley
2019-12-16 23:46     ` Paul Moore
2019-12-17 13:44       ` Stephen Smalley
2019-12-19  2:35         ` Paul Moore
2019-12-17 23:50 ` Kees Cook
     [not found]   ` <CAOSEQ1qFpLX5hTyNZ+QZuhunH3gr+KAB5PDgcoFjUcyNojEVMQ@mail.gmail.com>
2019-12-18  0:16     ` Kees Cook
     [not found]       ` <CAOSEQ1ow2XGQ4faoFekK9s3HfmfcvnVKZgGC6tPm0ChJ0F+-vw@mail.gmail.com>
2019-12-18  0:47         ` Kees Cook
     [not found]           ` <CAOSEQ1quzmnB4700JdOob=DNgbF5ma2rt7O-ayZwWeWBjymcjw@mail.gmail.com>
2019-12-19 18:29             ` 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=20191214185002.GA8076@gmail.com \
    --to=dan@kernelim.com \
    --cc=jeffv@google.com \
    --cc=keescook@chromium.org \
    --cc=omosnace@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@vger.kernel.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.