Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755152AbeAMOML (ORCPT + 1 other); Sat, 13 Jan 2018 09:12:11 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:47160 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751571AbeAMOMJ (ORCPT ); Sat, 13 Jan 2018 09:12:09 -0500 Date: Sat, 13 Jan 2018 15:12:09 +0100 From: Greg KH To: Andi Kleen Cc: 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, Andi Kleen , jeyu@kernel.org Subject: Re: [PATCH] retpoline/module: Taint kernel for missing retpoline in module Message-ID: <20180113141209.GA13015@kroah.com> References: <20180112175507.31750-1-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180112175507.31750-1-andi@firstfloor.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 Fri, Jan 12, 2018 at 09:55:07AM -0800, Andi Kleen wrote: > From: Andi Kleen > > There's a risk that a kernel that has full retpoline mitigations > becomes vulnerable when a module gets loaded that hasn't been > compiled with the right compiler or the right option. > > We cannot fix it, but should at least warn the user when that > happens. > > Add a flag to each module if it has been compiled with RETPOLINE > > 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 type of check to catch this type of problem no matter what type of feature/option it is trying to catch? thanks, greg k-h