Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751815AbeADATy (ORCPT + 1 other); Wed, 3 Jan 2018 19:19:54 -0500 Received: from twin.jikos.cz ([91.219.245.39]:41097 "EHLO twin.jikos.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751744AbeADATw (ORCPT ); Wed, 3 Jan 2018 19:19:52 -0500 Date: Thu, 4 Jan 2018 01:19:22 +0100 (CET) From: Jiri Kosina To: Andi Kleen cc: Thomas Gleixner , Linus Torvalds , 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: <20180104001501.3jof7zkrfkehnd3r@two.firstfloor.org> Message-ID: References: <20180103230934.15788-1-andi@firstfloor.org> <20180104000927.co5umvfzfwliqvqt@two.firstfloor.org> <20180104001501.3jof7zkrfkehnd3r@two.firstfloor.org> User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, 3 Jan 2018, Andi Kleen wrote: > > It should be a CPU_BUG bit as we have for the other mess. And that can be > > used for patching. > > It has to be done at compile time because it requires a compiler option. If gcc anotates indirect calls/jumps in a way that we could patch them using alternatives in runtime, that'd be enough. -- Jiri Kosina SUSE Labs