All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
To: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Patrick McLean <chutzpah@gentoo.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] kconfig.h: Include compiler types to avoid missed struct attributes
Date: Thu, 22 Feb 2018 16:56:56 +0100	[thread overview]
Message-ID: <36583adc-9c01-fd21-074a-e3df2cbb3dee@maciej.szmigiero.name> (raw)
In-Reply-To: <20180222002854.GA29269@beast>

On 22.02.2018 01:28, Kees Cook wrote:
> The header files for some structures could get included in such a way
> that struct attributes (specifically __randomize_layout from path.h) would
> be parsed as variable names instead of attributes. This could lead to
> some instances of a structure being unrandomized, causing nasty GPFs, etc.
> 
> This patch makes sure the compiler_types.h header is included in
> kconfig.h so that we've always got types and struct attributes defined,
> since kconfig.h is included from the compiler command line.
> 
> Reported-by: Patrick McLean <chutzpah@gentoo.org>
> Root-caused-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
> Fixes: 3859a271a003 ("randstruct: Mark various structs for randomization")
> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Kees Cook <keescook@chromium.org>

I can confirm that this patch fixes the original nfsd GPF issue.
Also, struct path members offsets are consistent now between nfs4xdr.s
and other files.

> ---
> Updated Maciej's tag.

Thanks.

Maciej

  reply	other threads:[~2018-02-22 15:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22  0:28 [PATCH v2] kconfig.h: Include compiler types to avoid missed struct attributes Kees Cook
2018-02-22 15:56 ` Maciej S. Szmigiero [this message]
     [not found] ` <201802230613.8bqOOUnw%fengguang.wu@intel.com>
2018-02-23  0:03   ` Kees Cook
2018-02-23  0:19     ` 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=36583adc-9c01-fd21-074a-e3df2cbb3dee@maciej.szmigiero.name \
    --to=mail@maciej.szmigiero.name \
    --cc=chutzpah@gentoo.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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.