Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933199AbdC2VTq (ORCPT ); Wed, 29 Mar 2017 17:19:46 -0400 Received: from mga14.intel.com ([192.55.52.115]:56395 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932822AbdC2VTo (ORCPT ); Wed, 29 Mar 2017 17:19:44 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,243,1486454400"; d="scan'208";a="80729752" Subject: Re: [PATCH] x86/fpu: move FPU state into separate cache To: Kees Cook , "H. Peter Anvin" References: <20170329203908.GA39222@beast> Cc: LKML , Rik van Riel , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , "x86@kernel.org" , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Peter Zijlstra , Yu-cheng Yu , Masahiro Yamada , Borislav Petkov , Christian Borntraeger , Thomas Garnier , Brian Gerst , He Chen , Mathias Krause , Fenghua Yu , Piotr Luc , Kyle Huey , Len Brown , KVM , "kernel-hardening@lists.openwall.com" From: Dave Hansen Message-ID: Date: Wed, 29 Mar 2017 14:19:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 527 Lines: 10 On 03/29/2017 02:09 PM, Kees Cook wrote: > They're adjacent already, which poses a problem for the struct layout > randomization plugin, since adjacency may no longer be true (after > layout randomization). This adjacency (or not) isn't really the > problem: it's that FPU state size is only known at runtime. Another > solution would be to have FPU state be a fixed size... We don't want that. It varies from a couple hundred bytes to ~3k on newer CPUs. We don't want to eat an extra 2.5k per task on the older processors.