Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp64490rdb; Thu, 5 Oct 2023 17:05:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/BcfdqRxPYhTs9sotXA34C0rxvtNzEYdcQ6/4nTB70l23l/ixO9SJIRSHAV93NKpmdgmV X-Received: by 2002:a05:6a00:1792:b0:68f:c8b4:1a2b with SMTP id s18-20020a056a00179200b0068fc8b41a2bmr4676636pfg.17.1696550741386; Thu, 05 Oct 2023 17:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696550741; cv=none; d=google.com; s=arc-20160816; b=kZLTDHUn6VC6WYUL+9ohj3mlAKbn7ptpafLXU/W+EgAt3k3TVAR4YHGipwtZOE4/7J xRYcHlwFiUxOlp3wRB6Ft7WTpnhML+30tY5r/flmShKg0/ggZ+WioIrbrkoX9FXfEgmY /3/Ct26fERXexYSd9QgPD1NbcpYw9mN0enT7FFFPNaEbKpDzqXExbqud875EWX28VJgS mHDUydA2cRPHmOWJiVI2rOYhnzvDUpSD584SvHFX+mrlg/6TEcq4DMlpJjkRTCh5QHid HyQBeu+AMmc4cVtY3kWjy0HuQ48rYJ9v0u2Xdctkei8eKvuvjLP2fLFwe+5hzJt/fAN1 BnrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4UFQuddsdBCn+ZDRKq1UnGxNJDrlOKXS2Fnl7LFh0oQ=; fh=PjRRp8/yMjoumm1Qj5l2bSBkKm6CsDWdVEX7KYisCFs=; b=C7KiknWU8MXomzwe2xlXWAPLjMJ3Q6jHkG9zZMdGIpZQGlj2UcLPqt5ikSI/oT3Z7a Aq5KbPxSKmVHhAgACk/R02r7REq+lu96H+dOadWVKELOIIMmC6oPvcS7nFx9A0/uVt2W iGf6/kbjigW1fXrJkx6w5VrYRMrRjzDxzCPsWD8msUMEAZKBYghy5YYdOwlUKYOTuedv v2/ZyhmFB/fcFn9G2VUsUmxDXnf9130l6RoPjZx1CPW2T7c0wF9/SvLHVj5yWoCAq8S/ NO/qIgPtpyvyzKgM5UZoD3SHC4JLxVTOlusfQ+FPqG2vD8pJ5iBl5E2IcKZFLsurh6nZ jJJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ct7ocAOf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id ea21-20020a056a004c1500b00690d33fed3asi311820pfb.53.2023.10.05.17.05.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 17:05:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ct7ocAOf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0B53485BF62C; Thu, 5 Oct 2023 17:05:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229492AbjJEX6H (ORCPT + 99 others); Thu, 5 Oct 2023 19:58:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229455AbjJEX6G (ORCPT ); Thu, 5 Oct 2023 19:58:06 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0DBFA6 for ; Thu, 5 Oct 2023 16:58:04 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 290E2C433C7; Thu, 5 Oct 2023 23:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696550284; bh=kBlVLaA21krd9feQ7wMSdSFAFLcQzCQ+AKkA/TdNdOU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ct7ocAOfWjlG6DCIpWt/ePGaFZd8HFmxofkP1LHqTGGa4RTbxQUXIqtescLvY4T+7 RLIAp4R01fJhrNLnFOCb95kUfktCpCDK7XMXYHOGWV4qdlZh7a+79yCcmmvb22UMPn ryuyGiXDeovIincXVKzd5GA+1Bz0AVcSo957y1l54tqn6eKf/52pcrcphesdMPC8fb +xw2rZJ5cpMu3Od59YywJQ2eoBdeu3y7/oxL1//OlgN67lZAbIhELH8QO7ZszTN1UQ ojjtIq43ssJ56SVJNWFnDBDw2/dzW7FIr0g/R7wK6NWNPr1GcgV58pIyDixr4s+ZbU Be5x4NKX0k2wA== Date: Thu, 5 Oct 2023 16:58:02 -0700 From: Josh Poimboeuf To: Aaron Plattner Cc: linux-kernel@vger.kernel.org, Peter Zijlstra Subject: Re: [PATCH 0/2] Fix objtool error reporting and handling of very long symbol names Message-ID: <20231005235802.iura4jotkvpswrwa@treble> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 05 Oct 2023 17:05:12 -0700 (PDT) On Wed, Oct 04, 2023 at 05:08:17PM -0700, Aaron Plattner wrote: > Two patches in this series: > > First, when objtool encounters an error, it carefully propagates the return > code all the way up to main(), which proceeds to ignore it and return 0 no > matter what. This can cause problems with objtool to be missed because the > overall build succeeds. This appears to be a regression in commit > b51277eb9775c, which dropped a call to exit(ret) when a subcommand fails. > > Fix that by returning the status code from main(). Note most objtool errors are currently ignored anyway, due to check() unconditionally returning 0. But as the patch mentions, it will indeed fix early errors. > Second, very long symbol names with .cold variants cause objtool to fail. > This is due to using a small max length, which in turn is due to allocating > on the stack. However, there is not actually a requirement to allocate on > the stack in this (user space) code path, and in fact, the code is cleaner > with this fix: MAX_NAME_LEN is gone and the ugly manual NULL termination > is also removed. One benefit of the stack array is that reusing it is more performant than doing a bunch of allocations. But this is only for cold symbols, so the slowdown should (hopefully) be negligible. I'll run it through some testing. Thanks! -- Josh