From nobody Mon Feb 9 07:27:06 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8545EB64DC for ; Thu, 22 Jun 2023 10:55:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231451AbjFVKzV (ORCPT ); Thu, 22 Jun 2023 06:55:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230504AbjFVKzL (ORCPT ); Thu, 22 Jun 2023 06:55:11 -0400 Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99FB41BD0 for ; Thu, 22 Jun 2023 03:55:10 -0700 (PDT) Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4Qmy1x1hLcz9sRq; Thu, 22 Jun 2023 12:55:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wrVW5_Sg7hsw; Thu, 22 Jun 2023 12:55:01 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4Qmy1v41MDz9sRl; Thu, 22 Jun 2023 12:54:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 85B4C8B781; Thu, 22 Jun 2023 12:54:59 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id IkVAEYjgjW-B; Thu, 22 Jun 2023 12:54:59 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [192.168.232.14]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2BA4A8B763; Thu, 22 Jun 2023 12:54:59 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 35MAssDW2382579 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 22 Jun 2023 12:54:54 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 35MAssoA2382578; Thu, 22 Jun 2023 12:54:54 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Michael Ellerman , Nicholas Piggin , Josh Poimboeuf , Peter Zijlstra , Sathvika Vasireddy , Naveen N Rao Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 07/14] objtool: Allow an architecture to disable objtool on ASM files Date: Thu, 22 Jun 2023 12:54:29 +0200 Message-Id: <247d738f8907045b1910cd6aff8efbb08ed57a84.1687430631.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1687431272; l=1429; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=JMHcrTE+ZNL5DPWKb6wzfxgfrGY7fEc11+Jar29nty8=; b=R3PKeOmYJP5Q0fBoGRwqMrbCkL8MN/BqJY4+G0JXtTemJkL/PFK0Rr9pGqjThgaeU6hG0TesY 5l8KYAzNgdUATEnjFeU6fTFGS5QaBU2OrZJ9rbBSYjY/c7bk9BkIYGp X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Supporting objtool on ASM files requires quite an effort. Features like UACCESS validation don't require ASM files validation. In order to allow architectures to enable objtool validation without spending unnecessary effort on cleaning up ASM files, provide an option to disable objtool validation on ASM files. Suggested-by: Naveen N Rao Signed-off-by: Christophe Leroy --- arch/Kconfig | 5 +++++ scripts/Makefile.build | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 205fd23e0cad..dd66b884bcfb 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -1091,6 +1091,11 @@ config ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT config HAVE_OBJTOOL bool =20 +config ARCH_OBJTOOL_SKIP_ASM + bool + help + Architecture doesn't support objtool on ASM files + config HAVE_JUMP_LABEL_HACK bool =20 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 9f94fc83f086..878027cf4faf 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -359,7 +359,11 @@ $(obj)/%.s: $(src)/%.S FORCE $(call if_changed_dep,cpp_s_S) =20 quiet_cmd_as_o_S =3D AS $(quiet_modtag) $@ +ifndef CONFIG_ARCH_OBJTOOL_SKIP_ASM cmd_as_o_S =3D $(CC) $(a_flags) -c -o $@ $< $(cmd_objtool) +else + cmd_as_o_S =3D $(CC) $(a_flags) -c -o $@ $< +endif =20 ifdef CONFIG_ASM_MODVERSIONS =20 --=20 2.40.1