mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Kees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.org
Cc: "Rik van Riel" <riel@redhat.com>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	x86@kernel.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Yu-cheng Yu" <yu-cheng.yu@intel.com>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Borislav Petkov" <bp@suse.de>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Thomas Garnier" <thgarnie@google.com>,
	"Brian Gerst" <brgerst@gmail.com>,
	"He Chen" <he.chen@linux.intel.com>,
	"Mathias Krause" <minipli@googlemail.com>,
	"Fenghua Yu" <fenghua.yu@intel.com>,
	"Piotr Luc" <piotr.luc@intel.com>, "Kyle Huey" <me@kylehuey.com>,
	"Len Brown" <len.brown@intel.com>,
	kvm@vger.kernel.org, kernel-hardening@lists.openwall.com
Subject: Re: [PATCH] x86/fpu: move FPU state into separate cache
Date: Wed, 29 Mar 2017 13:45:32 -0700	[thread overview]
Message-ID: <ea0a7663-7318-6086-1cb8-25fd9a252f83@zytor.com> (raw)
In-Reply-To: <20170329203908.GA39222@beast>

On 03/29/17 13:39, Kees Cook wrote:
> This removes ARCH_WANTS_DYNAMIC_TASK_STRUCT from x86, leaving only s390
> still defining this config.
> 
> In order to support future structure layout randomization of the
> task_struct, none of the structure fields are allowed to have a specific
> position or dynamic size. To enable randomization of task_struct on
> x86, the FPU state must be moved to its own dynamically sized cache,
> and dereferenced from the task_struct.
> 
> This change is nearly identical to what was done in grsecurity to support
> structure layout randomization. Hopefully I found all the needed changes.
> This passes allyesconfig, and boot tests.

Is this really what we want to happen?  It seems much more sane to
simply make them adjacent; they don't need to be part of the same
structure (in practice, there are three objects: thread_info,
task_struct, and the FPU state.)

	-hpa

  reply	other threads:[~2017-03-29 21:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 20:39 Kees Cook
2017-03-29 20:45 ` H. Peter Anvin [this message]
2017-03-29 21:09   ` Kees Cook
2017-03-29 21:19     ` Dave Hansen
2017-03-29 21:30     ` Linus Torvalds
2017-03-29 21:35       ` Andy Lutomirski
2017-03-29 21:41         ` Linus Torvalds
2017-03-29 22:28           ` hpa
2017-03-29 23:56             ` Linus Torvalds
2017-03-30  1:50               ` Kees Cook
2017-03-29 21:35       ` Linus Torvalds
2017-03-31  4:59 ` kbuild test robot
2017-03-31  5:57 ` kbuild test robot

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=ea0a7663-7318-6086-1cb8-25fd9a252f83@zytor.com \
    --to=hpa@zytor.com \
    --cc=borntraeger@de.ibm.com \
    --cc=bp@suse.de \
    --cc=brgerst@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=he.chen@linux.intel.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=kvm@vger.kernel.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=me@kylehuey.com \
    --cc=mingo@redhat.com \
    --cc=minipli@googlemail.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=piotr.luc@intel.com \
    --cc=riel@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=thgarnie@google.com \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    --cc=yu-cheng.yu@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®