From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753939AbeAIOMf (ORCPT + 1 other); Tue, 9 Jan 2018 09:12:35 -0500 Received: from merlin.infradead.org ([205.233.59.134]:39802 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753504AbeAIOMb (ORCPT ); Tue, 9 Jan 2018 09:12:31 -0500 Date: Tue, 9 Jan 2018 15:12:15 +0100 From: Peter Zijlstra To: David Woodhouse Cc: Andi Kleen , pjt@google.com, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, gregkh@linux-foundation.org, tim.c.chen@linux.intel.com, dave.hansen@intel.com, tglx@linutronix.de, luto@amacapital.net, Andi Kleen Subject: Re: [PATCH] x86/retpoline: Also fill return buffer after idle Message-ID: <20180109141215.GJ6176@hirez.programming.kicks-ass.net> References: <20180108235126.28736-1-andi@firstfloor.org> <20180109093756.GF6176@hirez.programming.kicks-ass.net> <1515506318.22302.46.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515506318.22302.46.camel@infradead.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 09, 2018 at 01:58:38PM +0000, David Woodhouse wrote: > Clever GCC, have biscuit. Well, we requested this feature exactly because of this. It had better work. > However, you are suggesting that we turn the static_cpu_has() trick > from a "nice to have" optimisation which is all very well when it pans > out, to something we *rely* on for secure operation of the system. It must work, we 'rely' on it already. GCC doing something stupid there is a GCC bug. Any GCC bug is a royal pain, they happen, life goes on. > It never ends well when we rely on all versions of GCC optimising > things precisely how we want. > > If you can build in a sanity check to ensure that the build will *fail* > when GCC doesn't do what we want, I suppose we could live with that. > But we don't have such a sanity check at the moment, do we? We have STATIC_KEYS_SELFTEST, which might or might not qualify.