Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751730AbeADAkh (ORCPT + 1 other); Wed, 3 Jan 2018 19:40:37 -0500 Received: from one.firstfloor.org ([193.170.194.197]:52090 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750913AbeADAkg (ORCPT ); Wed, 3 Jan 2018 19:40:36 -0500 Date: Wed, 3 Jan 2018 16:40:35 -0800 From: Andi Kleen To: Thomas Gleixner Cc: Alan Cox , Andi Kleen , 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 Message-ID: <20180104004034.wouy454tjmitkm5g@two.firstfloor.org> References: <20180103230934.15788-1-andi@firstfloor.org> <20180104000927.co5umvfzfwliqvqt@two.firstfloor.org> <20180104001501.3jof7zkrfkehnd3r@two.firstfloor.org> <20180104002916.3ff66581@alans-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > So you say, that we finally need a perl interpreter in the kernel to do > alternative patching? I don't think perl or objtool makes sense. That would be just incredibly fragile because compilers can reorder and mix code. It could be done with a gcc change I suppose. That should be reliable. But that would need to be developed first. We don't have it right now. As the first step a compile time approach should be sufficient. We can add a CONFIG option so people can chose at compile time. Then later we can investigate run time patching. -Andi