Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12188027rwd; Fri, 23 Jun 2023 02:36:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6hCOPND85veOBN4ZR3jdmAcFlugtlmwLaKG4EO7giAVM5oToPfsTCjf44oyWiVS81FDfVR X-Received: by 2002:a05:6a20:3d26:b0:10f:52e2:49ec with SMTP id y38-20020a056a203d2600b0010f52e249ecmr17818958pzi.53.1687512979765; Fri, 23 Jun 2023 02:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687512979; cv=none; d=google.com; s=arc-20160816; b=LvIBI8XFrlEx9elsUUvNDSkPhXsVgZkPBTN3MxCjhMWDVAM0ns4wUN93vZSt1NlLbJ sKkvEsHIs3cU8s/hDPDBCmwhaN1ckEUmhwepL/+d0lnrppzTPE/tYC6GxGXuQkP2e6o9 BbtAtpHInf+gy4rtjTaUuoFqv9c7wf4vwhUMG0lHk+wIfsPAAVdVNqPcMNxmi8vjrEJl dvyRsehGg8syE+kjwDhQaPUX20coHsjw0YKJSSazZbMf0xo1NGMcLT9rPh0uUBF14/nm bg3QJ/M16a/cjhdTWJyjpZlXUFxUqFWu5ua2Dl6p6WEgWRS6/v4/4k9jGbpyA9hR4CGA B6Gw== 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=DZQQmjQ1drwcgq6Oa05wX61/L3ksY1VFD/yuj1ZSbCU=; b=By6ze+HzjXeaIEyvBmhfFtyPpdo100KwrgK75ZB40kfpzpaBJUyZcG61dUrYWTitov bYWAG0Vp9HtRsA7Otb5JKpVnsvNeI6HydFsfxDAFMfU8GND3K25TRV0RGVz8e0QfmZM7 zM55feOPS9igpuskH9iTeZqWpLBO8R4okfutjyJ+dQmGc0sPsPsJIqQH6TrdkJPpWL1y O97tZa/Yxd42lJYCVYyNtAYgMOWEqksnBpj6W8MGUQio8IaqJPgwt4VfFWEagjq4x5EV yFwxzSdlcRp4M/2X6/I202ZnaXjPmwGf+n4qHyhmwOMtfxjhbYRfimv6Hxuf2ioAGlNd mXww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=Slb6Zo8n; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a20-20020aa79714000000b0066883879b55si8319782pfg.245.2023.06.23.02.36.08; Fri, 23 Jun 2023 02:36:19 -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=@infradead.org header.s=desiato.20200630 header.b=Slb6Zo8n; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230189AbjFWJNi (ORCPT + 99 others); Fri, 23 Jun 2023 05:13:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjFWJNg (ORCPT ); Fri, 23 Jun 2023 05:13:36 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30327C2; Fri, 23 Jun 2023 02:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=DZQQmjQ1drwcgq6Oa05wX61/L3ksY1VFD/yuj1ZSbCU=; b=Slb6Zo8nbLsH9VzI4HIiUYvaGW XkE1nMQYkl1kV6+8WonAHB6G+7fY0d7KSiDeHoRWGCWc27CZrUoqco1Yl3WAl6vILgCyQQ/kbWt9X aGPf2QPuzSpW2uaReFapa7G8lxByjtd599oist8mgTHM6TLIEFBiSUjVV5Tsbf5H8C6nNti1tVwvS S32Ned2ANqs3HF7JeLYu3VFHb7LiRAdRKKoImXHGaI+OJS5b1+RHKVswUENLsTm81A+I0DfpbVZc1 Q1AcHtKA0B7qBHXXK2LRW+cg8SLoKsjy6b54p7/5liYFhVAvoEtI75WuwXqr1QchE6PuIuP6vuX6c spL1xD5w==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qCcqy-002Bi3-23; Fri, 23 Jun 2023 09:13:17 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 36C3B300392; Fri, 23 Jun 2023 11:13:13 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1C460245257D7; Fri, 23 Jun 2023 11:13:13 +0200 (CEST) Date: Fri, 23 Jun 2023 11:13:13 +0200 From: Peter Zijlstra To: Sami Tolvanen Cc: Masahiro Yamada , Kees Cook , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Tom Rix , linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] Fix CFI failures with GCOV_PROFILE_ALL Message-ID: <20230623091313.GS4253@hirez.programming.kicks-ass.net> References: <20230623001140.1111494-4-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230623001140.1111494-4-samitolvanen@google.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 On Fri, Jun 23, 2023 at 12:11:41AM +0000, Sami Tolvanen wrote: > Hi folks, > > The following two patches fix CFI failures with GCOV_PROFILE_ALL, > where the compiler injects indirectly called functions to object > files that otherwise contain no executable code, and are not > processed by objtool or don't have CFI enabled. This results in > missing or incorrect type hashes during boot and when modules are > loaded. > > Sami Tolvanen (2): > kbuild: Fix CFI failures with GCOV > kbuild: Disable GCOV for *.mod.o > > init/Makefile | 1 + > scripts/Makefile.modfinal | 2 +- > scripts/Makefile.vmlinux | 1 + > 3 files changed, 3 insertions(+), 1 deletion(-) > Urgh, tricky stuff this. Acked-by: Peter Zijlstra (Intel) And yes, objtool essentially assumes vmlinux.o is complete and does LTO like passes. Is there something kbuild can do to ensure noting else gets linked in after this?