Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1769830ybh; Tue, 14 Jul 2020 06:58:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXfJ3s/4Lg/HhFFSQUclsAGmTUxRIekgxhddTPWo5ZHWD+jEgqomMDtCoKwyrwpsH+0NvC X-Received: by 2002:a17:906:c150:: with SMTP id dp16mr4538316ejc.536.1594735116966; Tue, 14 Jul 2020 06:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594735116; cv=none; d=google.com; s=arc-20160816; b=gABKDzS5vWW++jX+SsjvfudfnFWh17hVCQCGKAFM72oMZXmbkPupG+FrKDRByTnFUv mo6BJccQzAE0agzKviB4a3Y7dIbnvyMyS1BtAGrJhKYJ2VmngHhX80NPyVOlmA9tcRYH +VT0njaOsqI3tBBKuUvLMMmygv7/FUlFFF+qrhWaY0zc0tZFM671l7/TqA9zflS5v6CY wMxgu96tvLFboRhGlglRVzoDm6ZtnmBMO/xKrxI3Ix0d1s3/DPWOgvsmEozrHJX4k7HV Wfos2VBb/XBpYLdrU2u6+ZeVgt2Kqd0w4YqJiQjWQHb7QZoJ851CjE07oVCyzYe7L3K6 /gjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=KsP+Zg2SXxpGWvQphHBj9WDMJC0wpn9ZmfS2E7PsRDA=; b=R6DCWn59vj+5ArJCl8GlRfQpvzYQmR1fW3hx74OL8tajXNXkw3H+ukepTtxVZh1bMp GGZxjfGuEuUqLiZFCERT1l13Gml59E+grEKMW8DbcQfWfQlw1MphadgOToUpF1n7av4M Na3eoeK0h2bEV2QhuNXfwjOut889ZlQx39DwuoJoeudeiha5mIMrVLfyAD59bjIGP8fu NU4+4hFPxznFJN4aXOBzvOmhaFHmN496Nl2uvL9gKPRu7U2vlEux2Nfw9BOWFTz3iPgz 061jumaZXQKyrKEwzJd1x4kcAbUe+dCDmZK8k/musXg60hTud4nJ9MQ940slT6McZ+yA fc9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Scn2/xTW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si11506465edr.502.2020.07.14.06.58.12; Tue, 14 Jul 2020 06:58:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Scn2/xTW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728437AbgGNN55 (ORCPT + 99 others); Tue, 14 Jul 2020 09:57:57 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:36248 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726450AbgGNN54 (ORCPT ); Tue, 14 Jul 2020 09:57:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594735075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KsP+Zg2SXxpGWvQphHBj9WDMJC0wpn9ZmfS2E7PsRDA=; b=Scn2/xTWKBpr9P5UiC/GOQUBA6x3vpB0t6qyVXFI8Ewqv57OnMesIfD9ZD3LyB8eROXC/A WbmTpDUXWlkgTVsXvid9i+/Gpjy+IkMKWhZwBQFobENKpJ8CxuhGXhrvNL2tWh3Z+bdNMX SBCwvKwJutBLG+nh1P9154npK4Si0Cw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-491-VBrKysQKOeejqWQNk3_Q2A-1; Tue, 14 Jul 2020 09:57:53 -0400 X-MC-Unique: VBrKysQKOeejqWQNk3_Q2A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A50F1800597; Tue, 14 Jul 2020 13:57:51 +0000 (UTC) Received: from treble (unknown [10.10.119.254]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6D5DF2E02A; Tue, 14 Jul 2020 13:57:49 +0000 (UTC) Date: Tue, 14 Jul 2020 08:57:47 -0500 From: Josh Poimboeuf To: Miroslav Benes Cc: Randy Dunlap , Stephen Rothwell , Linux Next Mailing List , Linux Kernel Mailing List , Peter Zijlstra , pmladek@suse.cz, live-patching@vger.kernel.org Subject: Re: linux-next: Tree for Jun 23 (objtool (2)) Message-ID: <20200714135747.lcgysd5joguhssas@treble> References: <20200623162820.3f45feae@canb.auug.org.au> <61df2e8f-75e8-d233-9c3c-5b4fa2b7fbdc@infradead.org> <20200702123555.bjioosahrs5vjovu@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 14, 2020 at 12:56:21PM +0200, Miroslav Benes wrote: > On Thu, 2 Jul 2020, Josh Poimboeuf wrote: > > > On Tue, Jun 23, 2020 at 08:06:07AM -0700, Randy Dunlap wrote: > > > On 6/22/20 11:28 PM, Stephen Rothwell wrote: > > > > Hi all, > > > > > > > > Changes since 20200622: > > > > > > > > > > on x86_64: > > > > > > arch/x86/kernel/cpu/mce/core.o: warning: objtool: mce_timed_out()+0x24: unreachable instruction > > > kernel/exit.o: warning: objtool: __x64_sys_exit_group()+0x14: unreachable instruction > > > > > > Full randconfig file is attached. > > > > More livepatch... > > Correct. > > Both are known and I thought Josh had fixes queued somewhere for both, but > my memory fails me quite often. See below. I did have fixes for some of them in a stash somewhere, but I never finished them because I decided it's a GCC bug. > However, I think it is time to decide how to approach this whole saga. It > seems that there are not so many places in the kernel in need of > __noreturn annotation in the end and as jikos argued at least some of > those should be fixed regardless. I would agree that global functions like do_group_exit() deserve a __noreturn annotation, though it should be in the header file. But static functions shouldn't need it. > Josh, should I prepare proper patches and submit them to relevant > maintainers to see where this path is going? If that's how you want to handle it, ok, but it doesn't seem right to me, for the static functions at least. > It would be much better to fix it in GCC, but it has been like banging > one's head against a wall so far. Josh, you wanted to create a bug > for GCC in this respect in the past? Has that happened? I didn't open a bug, but I could, if you think that would help. I haven't had a lot of success with GCC bugs in the past. > If I remember correctly, we discussed briefly a possibility to cope with > that in objtool, but no solution was presented. That would also feel like a GCC workaround and might impede objtool's ability to find bugs like this one, and possibly more serious bugs. > Removing -flive-patching is also a possibility. I don't like it much, but > we discussed it with Petr M. a couple of months ago and it might be a way > too. -flive-patching has many problems which I outlined before. None of them have been addressed. I still feel the same way, that it should be reverted until it's ready. Otherwise it's a drain on upstream. Also, if the GCC developers won't acknowledge this bug then it doesn't give me confidence in their ability to keep the feature working as optimizations are added or changed. I still think a potential alternative exists: objtool could be used as a simple tree-wide object diff tool by generating a checksum for each function. Then the patch can be applied and built to see exactly which functions have changed, based on the changed checksums. In which case this feature would no longer be needed anyway, would you agree? I also think that could be a first step for converging our patch creation processes. -- Josh