From patchwork Mon Mar 27 16:00:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 7273 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3404:b0:112:7285:5352 with SMTP id h4csp1523641rwd; Mon, 27 Mar 2023 09:04:00 -0700 (PDT) X-Google-Smtp-Source: AKy350aDKgeBwCYla95wjd/ysBbtGprNdmeISjmGo91NqxkJgtJER0Ze6xaJqU38YUBVCVLSapuA X-Received: by 2002:a17:903:cc:b0:19e:6e00:4676 with SMTP id x12-20020a17090300cc00b0019e6e004676mr9755419plc.61.1679933021292; Mon, 27 Mar 2023 09:03:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679933021; cv=none; d=google.com; s=arc-20160816; b=CpH8NBXX9YBO43YmkWzo8WXwoUr3+hRaZRQfWJf2lZlOywXe8G2wBmngUGzobv0on5 H+Ge7dyk0iS1dvEnki03EFg30sdqlg+SjuTUne2P2lTBP8Ve1y1UvnJn0tmj9eQlZm/9 JhygXW9gA+SvoO74u1/U7PEtgwA4XZLWCOiUFoDqEXLdqBa7MmHalVrY1GkouL6HIuo/ gutu6ip5yznqDTW20DbcEys3v7o/tvL1Zd9lbljeeKdZDHhiPqxwIzucSbPmSgfL4Qh+ dFUaz38h3k3VJCoLxRB3ohFmLBG8VcLPk6rg+eb3IMZ8GclwEdGRRi8enMnXI33Psd+F XdtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=7muUEXcyZOi7VfPQlIrAKTtmBvSyUBRAwZ1qucouSLI=; b=kSvtx/pbL2N2eI8f/BxGy6tdtNTrZDkaZhyCId5ywr1U/NOhTx72ow2LRDPpXMoR2M twBkI5b3+qBBxuARZTutmtnrQyDsQGopySbDiecbPwcnNnIQ3FgY0uqiy1lieyTZBxPn uVVCP9Z4FjCgHZZPpObhhOtGD5x8Z8y6tUa5naWOOOkHAQD8l8i8dTpYKlyqa27lUTMS 0mTvfrhdQG9ynB2CIRFjAKE4qhHE/mY2s1bW+Ot2zl0CE9CGifkjllSI+fWtJIMtI2/h lhQau6SQ6rzzUKEDqkaFu8JHIfCGRTmBVeeJrJsntHP/E0XFpE0RRZX+FEpt12UOm1Og euxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z5ESoB9V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 13-20020a63070d000000b0050fbb5b4bccsi13856980pgh.105.2023.03.27.09.03.13; Mon, 27 Mar 2023 09:03:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z5ESoB9V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232987AbjC0QB1 (ORCPT + 99 others); Mon, 27 Mar 2023 12:01:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232880AbjC0QBM (ORCPT ); Mon, 27 Mar 2023 12:01:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADA796599 for ; Mon, 27 Mar 2023 09:00:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EF06E61300 for ; Mon, 27 Mar 2023 16:00:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B00CC433D2; Mon, 27 Mar 2023 16:00:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679932855; bh=pDEwLF+kUL8Y/39fHcZt14EVNn++vLRYxhexDs/fnZ0=; h=From:To:Cc:Subject:Date:From; b=Z5ESoB9VsipYWtfd5Dugvq9Rsz50lWuqO6aITQRasxdT9DR6tlAShDWMkmrael4HK YJAwNzXDY58WyR5upUmaWSaZMDGLcf/t0GujdZKJFez5xp+snCTv4fxB1wBDwaEsZO 6JJzbjaE4CkiNeuzgxUDeDZT8HcWhUjUmwZGz0t6n5Jdh7eOQiSt/LoSeraP9hc7NE QeCSVquS/5Tkb678pnmgxkfnOxiWbz47PHqidHQns44kb4Bk3wqA9SNCa4U3L4rMtJ 0ynd/OBOrF83WpWFueZH32SgQCK7X9/nl6VyCQr5M9MMJO6etvIWRDERLnCdm/ocbr FLQ75NaT0a89Q== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra Subject: [PATCH 0/5] objtool: warning improvements Date: Mon, 27 Mar 2023 09:00:43 -0700 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761537447744332232?= X-GMAIL-MSGID: =?utf-8?q?1761537447744332232?= Add some user-friendliness to the warnings: - Add OBJTOOL_ARGS="--verbose" option for making it easier to debug objtool warnings over email - Remove per-file rate limiting (doesn't make sense for vmlinux.o) - Add "missing __noreturn" warning Josh Poimboeuf (5): objtool: Add '--verbose' option for disassembling affected functions objtool: Combine '--backtrace' with '--verbose' objtool: Remove superfluous dead_end_function() check objtool: Add per-function rate limiting for unreachable warnings objtool: Add "missing __noreturn" warning tools/objtool/Documentation/objtool.txt | 12 ++++++ tools/objtool/builtin-check.c | 2 +- tools/objtool/check.c | 45 ++++++++++++--------- tools/objtool/include/objtool/builtin.h | 2 +- tools/objtool/include/objtool/elf.h | 1 + tools/objtool/include/objtool/warn.h | 52 ++++++++++++++++++++++--- 6 files changed, 88 insertions(+), 26 deletions(-)