Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp928250ybt; Wed, 24 Jun 2020 15:05:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBASnYiBGChZUcdfZNyU3wSt7dVjJDTbX0nS0cMzmo70RdadUwDUIqzDJx8FYUIJ++llug X-Received: by 2002:a17:907:42d5:: with SMTP id ng5mr27228863ejb.164.1593036322257; Wed, 24 Jun 2020 15:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593036322; cv=none; d=google.com; s=arc-20160816; b=xlxH4cZb8S+TgpG4sBoleW5DIxmFUmlF8MhMcIIN8g4UqzWCsEKuYyY6guYlKq7g+m 0QJfwnsu82kI4MnwnSZOm0Z9o1xTY+pj4Q3EFdku9QbN9WShVLUYceIzkui6c1gWqtod JM6xvVdis3vT0nnH02behb87QsExRXleKVkGSfA+ICb5dBQ+wCACpvpwdDpz8Ox6hFsz xv1XrYMKfV6zSDbIp0ohGx0Z4LBPw2VtHkDCT2xsqL7ezRDDD8fEGFYHZwrof9lUolaV oQ5nbGiHY0qY4DzY99SVixoXCu08qEIdNKzrlzJeLk2oRY61+rkDgyOVlUk0taBSs8fX xuYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=dcJg1Pmd9f78D6vA5vvd8lv5yiCcj7aT/KXUxx3p85w=; b=h9WSCNwMmDQjehGaRKUcSX4BCjvIBF+KLktPckA3KMWGeAUjZe60elznasZonS8ir2 yWfxgVM++S3CPFG50yfyAMA8HZFXGX51O+lsIpEue5ubEH44XcJYY2rTBRWbj68RoK8c jKHNUVn91Vo6F1DgF6R6tSco3uCJx1e16VzWC5ETwSOHPH9bQOT0hPUhH25IdyjJGPGa +fbZRUZDQ3aO7iZMR/h4PQyaqR0w8SFZjQLkc9+CXLMSDZ2tGwyagAnxh/OGYnEX29z8 lvg3ee40VHj7Ue5bY43c1NMvnMS6Ca2y6AkguqgvQZbIkyJbqAibgDouNjOzxAIxapqT 8Jjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=kW0Gs+LL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c28si15401463edj.317.2020.06.24.15.04.59; Wed, 24 Jun 2020 15:05:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=kW0Gs+LL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403793AbgFXV16 (ORCPT + 99 others); Wed, 24 Jun 2020 17:27:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390437AbgFXV16 (ORCPT ); Wed, 24 Jun 2020 17:27:58 -0400 Received: from casper.infradead.org (unknown [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBAC1C061573; Wed, 24 Jun 2020 14:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=dcJg1Pmd9f78D6vA5vvd8lv5yiCcj7aT/KXUxx3p85w=; b=kW0Gs+LLCGSOFq3lO7r9YinA6h 7xtahaSI1ma1wfxrkYodfw/iXU/zbFsJzgSO5Db8M5Kas3qE60Cck9uyn4jrjlZvm4WgRzqG9Ooo+ jtCEqqSNm9W5tIGaN1elclBZcSfEZNv5jg8vAcfn+g1UJT8QHR4RwlPAuZfIuPNkOQap4e1qGfV0A cwt7PlLLvNImzMirpJd7/CDVC+M0Z9FaI9SC337TdLUSsHDB1EA/Z6q2MQrf71QVeEPDP0jb3OvhT EYDKEdVRjSgNUEKkA9mDDp6z8eth0zsksmz5WswtilA7uOUEs9S8I39JpTCT+viS29bezWW7uDl75 mvKP2izA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1joCvi-0004ro-5P; Wed, 24 Jun 2020 21:27:38 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id B90E3300261; Wed, 24 Jun 2020 23:27:37 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A61A722B8EBE8; Wed, 24 Jun 2020 23:27:37 +0200 (CEST) Date: Wed, 24 Jun 2020 23:27:37 +0200 From: Peter Zijlstra To: Sami Tolvanen Cc: Masahiro Yamada , Will Deacon , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux@googlegroups.com, kernel-hardening@lists.openwall.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH 04/22] kbuild: lto: fix recordmcount Message-ID: <20200624212737.GV4817@hirez.programming.kicks-ass.net> References: <20200624203200.78870-1-samitolvanen@google.com> <20200624203200.78870-5-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200624203200.78870-5-samitolvanen@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2020 at 01:31:42PM -0700, Sami Tolvanen wrote: > With LTO, LLVM bitcode won't be compiled into native code until > modpost_link. This change postpones calls to recordmcount until after > this step. > > In order to exclude specific functions from inspection, we add a new > code section .text..nomcount, which we tell recordmcount to ignore, and > a __nomcount attribute for moving functions to this section. I'm confused, you only add this to functions in ftrace itself, which is compiled with: KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)) and so should not have mcount/fentry sites anyway. So what's the point of ignoring them further? This Changelog does not explain.