Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932084AbeADQdB (ORCPT + 1 other); Thu, 4 Jan 2018 11:33:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34242 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752463AbeADQc7 (ORCPT ); Thu, 4 Jan 2018 11:32:59 -0500 Date: Thu, 4 Jan 2018 10:32:52 -0600 From: Josh Poimboeuf To: Andi Kleen Cc: Andi Kleen , tglx@linutronix.de, torvalds@linux-foundation.org, gregkh@linux-foundation.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com Subject: Re: [PATCH v2 11/12] retpoline/objtool: Disable some objtool warnings Message-ID: <20180104163252.jkc44bopf5yifbbc@treble> References: <20180104020019.1173-1-andi@firstfloor.org> <20180104020019.1173-12-andi@firstfloor.org> <20180104143814.bhvtsjiwpyhtgjph@treble> <20180104155914.GL25156@tassilo.jf.intel.com> <20180104160601.w2l2wdabuxa26xzq@treble> <20180104161308.zvudrggt6755ls5i@two.firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180104161308.zvudrggt6755ls5i@two.firstfloor.org> 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.38]); Thu, 04 Jan 2018 16:32:59 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 04, 2018 at 08:13:08AM -0800, Andi Kleen wrote: > On Thu, Jan 04, 2018 at 10:06:01AM -0600, Josh Poimboeuf wrote: > > On Thu, Jan 04, 2018 at 07:59:14AM -0800, Andi Kleen wrote: > > > > NAK. We can't blindly disable objtool warnings, that will break > > > > livepatch and the ORC unwinder. If you share a .o file (or the GCC > > > > code) I can look at adding retpoline support. > > > > > > I don't think we can wait for that. We can disable livepatch and the > > > unwinder for now. They are not essential. Frame pointers should work > > > well enough for unwinding > > > > If you want to make this feature conflict with livepatch and ORC, > > silencing objtool warnings is not the way to do it. > > I don't see why it would conflict with the unwinder anyways? > > It doesn't change the long term stack state, so it should be invisible to the > unwinder (unless you crash in the thunk, which is very unlikely) > > I actually got some unwinder backtraces during development and they seemed > to work. Those objtool warnings are places where ORC annotations are either missing or wrong. At the very least, this needs to conflict with HAVE_RELIABLE_STACKTRACE and HAVE_STACK_VALIDATION until objtool can understand the new code. Currently ORC relies on HAVE_STACK_VALIDATION, so CONFIG_UNWINDER_ORC would need to be disabled as well. > > > and afaik nobody can use livepatch in mainline anyways. > > > > Why not? The patch creation tooling is still out-of-tree, but livepatch > > itself is fully supported in mainline. > > Ok. > > Still doesn't seem critical at this point if it's some out of tree > thing. There are many livepatch users out there who would disagree. The out-of-tree bits aren't in kernel space. If your patches are ready before objtool supports them, then fine, make them conflict with objtool. But please don't introduce silent breakage. Either way we'll need to figure out a way to get objtool support ASAP. -- Josh