Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933162AbeAJF6N (ORCPT + 1 other); Wed, 10 Jan 2018 00:58:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60520 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932592AbeAJF6M (ORCPT ); Wed, 10 Jan 2018 00:58:12 -0500 Date: Tue, 9 Jan 2018 23:58:06 -0600 From: Josh Poimboeuf To: David Woodhouse Cc: Andi Kleen , Paul Turner , LKML , Linus Torvalds , Greg Kroah-Hartman , Tim Chen , Dave Hansen , tglx@linutronix.de, Kees Cook , Rik van Riel , Peter Zijlstra , Andy Lutomirski , Jiri Kosina , gnomes@lxorguk.ukuu.org.uk, x86@kernel.org Subject: Re: [PATCH v7 02/11] x86/retpoline: Temporarily disable objtool when CONFIG_RETPOLINE=y Message-ID: <20180110055806.gqdxpk4urvew253b@treble> References: <1515508997-6154-1-git-send-email-dwmw@amazon.co.uk> <1515508997-6154-3-git-send-email-dwmw@amazon.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1515508997-6154-3-git-send-email-dwmw@amazon.co.uk> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 10 Jan 2018 05:58:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 09, 2018 at 02:43:08PM +0000, David Woodhouse wrote: > From: Andi Kleen > > objtool's assembler currently cannot deal with the code generated by the > retpoline compiler and throws hundreds of warnings, mostly because it sees > calls that don't have a symbolic target. > > Exclude all the options that rely on objtool when RETPOLINE is active. > > This mainly means that the kernel has to fallback to use the frame pointer > unwinder and livepatch is not supported. > > Josh is looking into resolving the issue. I have a fix brewing for this, in two parts: - Part 1 will allow objtool to understand the flow *around* the retpolines (but not *inside* them). Which basically means that ORC will still get confused if it tries to unwind from inside a retpoline, but otherwise it should work fine. This code is pretty much done, just need to do some testing with it first. This should allow us to re-enable objtool and friends: ORC, reliable stacks, livepatch consistency model. - Part 2 will add ORC annotations for inside the retpolines. This will be a little harder, but I have my fingers crossed that it's do-able within a week or so. -- Josh