From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5842EC433E0 for ; Wed, 24 Jun 2020 21:47:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1E9FF2081A for ; Wed, 24 Jun 2020 21:47:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="grkKDX1m"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="kAzFiuub" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E9FF2081A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SK66Wnmn8z7vHC/dahiIIOkxvtKMmLV1p+eiWgHZong=; b=grkKDX1m+QisUgSRb0Iilji1l k/sU0zbZvVTMSW4eL89HkkLEFn8oZNwdbvrd2OdyCLm87vmb6XepXFVAw9H6DqOtK9o9hjhAQbacw a3U9tc4Jk1o/u/6ZznO1c+JSJu6m4OMkKVq/vLmx2S+Utv3W0PJGbdregZnF6woQy/1lR+K9sLeK5 wXpQrULU2QODxPNivR+EwaFdGwO3O8PPRAbzh0nWi8wKcKfafsu6KYoI4s+Anqj/n3NjkJ9Kw+pn3 IPpzDSkR+nOGs7YdvjHroWxUTaKwnFoM35271wi4cF1nZ3k0RPxUhhwRtFGgV9asItTkK9IvIKaiG /pIZDpjIA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joDDC-000411-AX; Wed, 24 Jun 2020 21:45:42 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joDD9-0003zW-A2 for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 21:45:40 +0000 Received: by mail-pj1-x1043.google.com with SMTP id h22so1831324pjf.1 for ; Wed, 24 Jun 2020 14:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2I1W9/xF2d1Vj6fXUSW50a6lcRysW14cejGyX/KQrUE=; b=kAzFiuub3JptGeF8CNTcnC+CeP/FsxM38jl9PiZjmZ2NQEKCzf5W55HotGQ3RFsl47 OU28gJzz3nFm0K+qZFZj3aI4XkCmA0i32hx7kEqSPXYASiEOFWG196YJXulcZC3Y9dyz 7yrrrZ4gUvmMXog64rqdi3irHXMSe28OJl0jht0IedPAX5FdSbei28cHde7gFfC8WQTO Th94MFJ7oKpcHcW0N9ISYWBLrKFqFcAygWKu8Bgdc273Y+lpnMx+5Oa57A1RVV779WXs N9wCMhhfGA+gmYVaSfQFrOgexBHpRg0exI1Q7NtzxhM5Ml3G7MxFC3aUmhMIk7wXvif6 SpYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2I1W9/xF2d1Vj6fXUSW50a6lcRysW14cejGyX/KQrUE=; b=lMvp+9muKbFDJyXyXmqxJMUvwSjm4krOTjEnN6uhzyIT3RszKyjOxs/MM9/scWqPxh rf2stBQWXrVAfchdYy9cEO5kG1OgtOW1Ul434boJXgfEaKubf03Ug5PntTKrg3MgiiVM I/IbQyDVwxsujyZKeG2DZwNVs4hdZ34qSnl31ZuGfYFP1qeF6N5I40v3NlSmh/1IlHDq G3YI0k8DlUF7HOmeQXBm1OB4nJ1n5x3+91cl1uI4n3Y6V0asdarUxL5C2BzXu620oydV n4ZvzQ5GYCQ+0gR8AqlBkU5wTiVBr5KYI67RTM6Q7xl4NZKms3nxr9Pxe1jAT/sfYNBx 8rSQ== X-Gm-Message-State: AOAM531s2t+pIJ5AX7kQu6GIYjV0QrLndBWhSaydtFv6EA+F7sFrYKOE K3tuF/IezCrj4vPSj9/eS5Rr6w== X-Google-Smtp-Source: ABdhPJxJmUZYMRaQyfOp9XANW1+HBk5Vx8x0dWsfSmu7dydDXvUxNLtKKWPkOY7MNgSE/tyVCHzLvA== X-Received: by 2002:a17:90b:916:: with SMTP id bo22mr7503001pjb.100.1593035136962; Wed, 24 Jun 2020 14:45:36 -0700 (PDT) Received: from google.com ([2620:15c:201:2:ce90:ab18:83b0:619]) by smtp.gmail.com with ESMTPSA id x1sm20175037pfn.76.2020.06.24.14.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 14:45:36 -0700 (PDT) Date: Wed, 24 Jun 2020 14:45:30 -0700 From: Sami Tolvanen To: Peter Zijlstra , Steven Rostedt Subject: Re: [PATCH 04/22] kbuild: lto: fix recordmcount Message-ID: <20200624214530.GA120457@google.com> References: <20200624203200.78870-1-samitolvanen@google.com> <20200624203200.78870-5-samitolvanen@google.com> <20200624212737.GV4817@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200624212737.GV4817@hirez.programming.kicks-ass.net> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, x86@kernel.org, Kees Cook , "Paul E. McKenney" , kernel-hardening@lists.openwall.com, Greg Kroah-Hartman , Masahiro Yamada , linux-kbuild@vger.kernel.org, Nick Desaulniers , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, linux-pci@vger.kernel.org, Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 24, 2020 at 11:27:37PM +0200, Peter Zijlstra wrote: > 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. Normally, recordmcount ignores each ftrace.o file, but since we are running it on vmlinux.o, we need another way to stop it from looking at references to mcount/fentry that are not calls. Here's a comment from recordmcount.c: /* * The file kernel/trace/ftrace.o references the mcount * function but does not call it. Since ftrace.o should * not be traced anyway, we just skip it. */ But I agree, the commit message could use more defails. Also +Steven for thoughts about this approach. Sami _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel