Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752026AbeAPUIx (ORCPT + 1 other); Tue, 16 Jan 2018 15:08:53 -0500 Received: from mga07.intel.com ([134.134.136.100]:46770 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbeAPUIw (ORCPT ); Tue, 16 Jan 2018 15:08:52 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,369,1511856000"; d="scan'208";a="20296240" Date: Tue, 16 Jan 2018 12:08:42 -0800 From: Andi Kleen To: Greg KH Cc: Andi Kleen , tglx@linutronix.de, dwmw@amazon.co.uk, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, arjan.van.de.ven@intel.com, peterz@infradead.org, jeyu@kernel.org Subject: Re: [PATCH] retpoline/module: Taint kernel for missing retpoline in module Message-ID: <20180116200842.GC7844@tassilo.jf.intel.com> References: <20180112175507.31750-1-andi@firstfloor.org> <20180113141209.GA13015@kroah.com> <20180113145259.ofw2u656h4awdyzw@two.firstfloor.org> <20180113153644.GA25956@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180113153644.GA25956@kroah.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Sat, Jan 13, 2018 at 04:36:44PM +0100, Greg KH wrote: > On Sat, Jan 13, 2018 at 06:53:00AM -0800, Andi Kleen wrote: > > > > When the a module hasn't been compiled with a retpoline > > > > aware compiler, print a warning and set a taint flag. > > > > > > Isn't that caught by the "build with a different compiler/version" check > > > that we have? Or used to have? If not, can't we just make it into that > > > > - the compiler version number may not change if a distribution backports > > the gcc changes for the new flag > > - the module might be using a custom make file that does not correctly > > set the flag, even if the compiler supports it > > > > > type of check to catch this type of problem no matter what type of > > > feature/option it is trying to catch? > > > > I suspect that would be far more complicated. > > Really? As Arjan points out, just mix it into the modversion symbol > generation, that should cause it to be caught properly and trivially. It seems it's more obvious to put it into VERMAGIC. That should be good enough too? This gives it an actual string that can be printed. Otherwise there won't be a clear error message on what's wrong. -Andi