Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751716AbeADA04 (ORCPT + 1 other); Wed, 3 Jan 2018 19:26:56 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:40897 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204AbeADA0z (ORCPT ); Wed, 3 Jan 2018 19:26:55 -0500 Date: Thu, 4 Jan 2018 01:26:48 +0100 (CET) From: Thomas Gleixner To: Linus Torvalds cc: Andi Kleen , Greg Kroah-Hartman , dwmw@amazon.co.uk, Tim Chen , Linux Kernel Mailing List , Dave Hansen Subject: Re: Avoid speculative indirect calls in kernel In-Reply-To: Message-ID: References: <20180103230934.15788-1-andi@firstfloor.org> <20180104000927.co5umvfzfwliqvqt@two.firstfloor.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, 3 Jan 2018, Linus Torvalds wrote: > On Wed, Jan 3, 2018 at 4:12 PM, Thomas Gleixner wrote: > > > > It should be a CPU_BUG bit as we have for the other mess. And that can be > > used for patching. > > That would definitely be the right approach. > > However, that's also probably quite challenging for the gcc option. AFAICT, the thunk which GCC injects can be supplied to GCC, so it should be doable. Thanks, tglx