Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12747321rwd; Fri, 23 Jun 2023 10:05:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7g1f1BtCdsk9ZQpTKmyAIvyUwBwx1rPUcgg1n0DmC6P8sjMb9gfwxPqyiMGjmunsdz6eb5 X-Received: by 2002:a17:902:c40d:b0:1b5:5bf2:b7e2 with SMTP id k13-20020a170902c40d00b001b55bf2b7e2mr12837323plk.6.1687539929053; Fri, 23 Jun 2023 10:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687539929; cv=none; d=google.com; s=arc-20160816; b=IHeUUBbS4ELWlClmcorOFFkLOGwfAQ9EchZrxeh1yQDsHTMT+wal/N7rJQrmuJLEJS uH4J3XnZRecEHbY0V5uZkq9g1yJibfy2KLYNVKT4J+5CBmaiiFVNaM9rSjhqIeOqZS+r No0suPRmFxFvl31EoZc+FYqneSYwYZdZmJbZ4UnzBFqclx/6g8aMaYq8a8ioarl3RcDx waPXbFd9BS2Q8D5UCS+UQnhBi0rIzAV84Mz0i3OHp1Qylrfz88swQUfVSXZ+JQwX07dt +ogmyoaFjTCaXZ3vYuThAUuCuTKTK/4wtzGj2XjIe+yBHtmeMkFfMOzKhuJTXXfJKgrN Mvfw== 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=A/ctcywp7aSY6bqn8fc8UYikW0ADqbI6njwx/CrZFMU=; b=V+HpYSaLInjGfYiVvWyXkGSx5QEzldjznwF7LJPf3CaddLaguBfPIOUO4nDVaF/aex y4wGlvEz1fZaKKPcQySdz6+byu1OTFlc3Oe0P7ziof8d+2mqzNYC+9qP6fqsiwSW39nV 3U+WFvjKfwLzF78sX2o47U7K9ooc9pGzeizyXotosQFN/gsgkbtyYY7UJ/oLWouX7ij1 CgixacI4hkYW8bS4hsRijTU6+yOZjO45LCxWe18g7LBLE0HJL3JO0FutfRpR4/aNkxba FSEkc8vjN2SHcziBUJCbZW5qsiEaHX+iXPDipiHm5D/7UkQksB2Zk2RKhJ5yXgZBF5LC /mCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QrcLfKeb; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f11-20020a17090274cb00b001b3b5851f0dsi8851449plt.466.2023.06.23.10.05.07; Fri, 23 Jun 2023 10:05:29 -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=@chromium.org header.s=google header.b=QrcLfKeb; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229531AbjFWQco (ORCPT + 99 others); Fri, 23 Jun 2023 12:32:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjFWQcn (ORCPT ); Fri, 23 Jun 2023 12:32:43 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A461A1FE7 for ; Fri, 23 Jun 2023 09:32:42 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1b512309d18so4809495ad.3 for ; Fri, 23 Jun 2023 09:32:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1687537962; x=1690129962; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=A/ctcywp7aSY6bqn8fc8UYikW0ADqbI6njwx/CrZFMU=; b=QrcLfKebeRTWvt4YKw8UFWfYt25NNrQQfX99Oy6r+vCqro5wELxb3cYBNFN16R3mZE wFm8qKDe+LeIdcpuYKHxWJTLSCg/HePLqdZerEDwZRLgp62N7xiQGzLXsd3i5aFoj3Jt e+GfvgP5S9iBaVw76byCwgEpHcics5pmXMa7E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687537962; x=1690129962; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=A/ctcywp7aSY6bqn8fc8UYikW0ADqbI6njwx/CrZFMU=; b=fGzrZCCvn6GjTO61Zh6tY5UppfwVbU4mCszW/I0KRnLkMVxuMujtgwU4qgaOep0GwS LQ8bvswpdlg+sOfBSua0nUIYHMPlJtAaoZD8akU0nNhkzURg9FcUlEduDGN2D5YXc/rD 9PyVTK4l/dCUqDBSGDWGKzhwF/S9SH9PcyV48twF0DXOYGlu/zyoxtmXirVoQ4PsNV0/ jBgVoM7a9ZRC7e4uERG71yP0Abtb6EEjhtJBUWWanpkOX+hkCKSxoV01+clRv140PX4W b96KtfFLmg+FRg+MqLGEu8tW7r0TUevQ02nfBfDVJ1fguhKBR/MSCnWU4J93moCexH27 NXDw== X-Gm-Message-State: AC+VfDxtF1Qs2l44/0t4b/SAkPnJpYerhUSwYsAYRb4AFWaXUZ8/Rw+T el/eimT1Ey8ApLKGnX8O3O/LOruEBiQHAjZSeBo= X-Received: by 2002:a17:902:aa0a:b0:1b5:4679:568f with SMTP id be10-20020a170902aa0a00b001b54679568fmr10746105plb.45.1687537962012; Fri, 23 Jun 2023 09:32:42 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id iw13-20020a170903044d00b001aaf536b1e3sm7442562plb.123.2023.06.23.09.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 09:32:41 -0700 (PDT) Date: Fri, 23 Jun 2023 09:32:40 -0700 From: Kees Cook To: Sami Tolvanen Cc: Masahiro Yamada , "Peter Zijlstra (Intel)" , 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: <202306230932.539C9DC0@keescook> 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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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(-) Nice hunting! Reviewed-by: Kees Cook Should these get Cc: stable tags maybe? -- Kees Cook