Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp441200pxk; Thu, 1 Oct 2020 06:18:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrWRD9yAOmlxrZ8vR+W4Ba2NtHtpuHdkMPjP8fAddKzYnAuKo2347PFzyMbfpDJn7x6FLP X-Received: by 2002:aa7:c259:: with SMTP id y25mr6092961edo.249.1601558337895; Thu, 01 Oct 2020 06:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601558337; cv=none; d=google.com; s=arc-20160816; b=hwM5XobPZw8Yepk1xvCNJuCDfXaadcwauuuzVubxKBRvWLFjLrFvstVpwXtS6L2fUv +yPUw6sEeP10pPXNaFK0RobEW07yzGonHt5vSNW8ELnwIsibi4569c/02B+zdg/K8OxQ ngR86Nz7wgmcATi6UN003UFGq2NK+sqfASnogXpGZ8fDqe5fzoMCkpKQBcA3M/6c9p/Q 8lNpW7gs/ql/14UeGGUDg0efsHdbJsJnnthidwsSRCPoBk1ASP8jN+Xwl2eyTiw2GDGh 5ynZZwTmEYkDPg3H1P75qNWfAXvjn2pE1ANBFjhisFW4hzQR0faJL+t9vCvA1SFk1Zk6 s2Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=3KjKMtURk2usGmT0rEknY02QPzYSnobZAYU2m1dyh00=; b=OT3zDF3Xps7olm9EfQf950Y9bmhFUXQGkEb0ySasj6cK6snSmO4E37TvEkeXZtqJr0 vxTf67UccMnSKgAVSbohYCOkgXPvrJ6Niwm6+f98Vdisnkj6eROhg3VtqPgwtORmuLzW 6VsmYoNoTlRRRSWH0vdnnPssppbfkJJVBaIPJqM4hmP+h527hKk0kafvfEBL5+/y7ucM TycA9MG7ymBPtyCJCPiVdcdo4tW4T5HZX7BOcqd/b0hgO/lo73BtsA96+BujwY6q+kLW OFVRC+eLY0+UWAKn3hAyV/lvqcSHRgiRZHTuwcgin7vSoujn89l4XUO64KUXAHIrPUjK oPJA== ARC-Authentication-Results: i=1; mx.google.com; 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 q7si3310722ejd.647.2020.10.01.06.18.34; Thu, 01 Oct 2020 06:18:57 -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; 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 S1732229AbgJANRR (ORCPT + 99 others); Thu, 1 Oct 2020 09:17:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:55250 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732018AbgJANRM (ORCPT ); Thu, 1 Oct 2020 09:17:12 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0B2A4AF59; Thu, 1 Oct 2020 13:17:08 +0000 (UTC) Date: Thu, 1 Oct 2020 15:17:07 +0200 (CEST) From: Miroslav Benes To: Sami Tolvanen cc: Masahiro Yamada , Will Deacon , Steven Rostedt , Peter Zijlstra , 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, jthierry@redhat.com, jpoimboe@redhat.com Subject: Re: [PATCH v4 04/29] objtool: Add a pass for generating __mcount_loc In-Reply-To: <20200929214631.3516445-5-samitolvanen@google.com> Message-ID: References: <20200929214631.3516445-1-samitolvanen@google.com> <20200929214631.3516445-5-samitolvanen@google.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sami, On Tue, 29 Sep 2020, Sami Tolvanen wrote: > From: Peter Zijlstra > > Add the --mcount option for generating __mcount_loc sections > needed for dynamic ftrace. Using this pass requires the kernel to > be compiled with -mfentry and CC_USING_NOP_MCOUNT to be defined > in Makefile. > > Link: https://lore.kernel.org/lkml/20200625200235.GQ4781@hirez.programming.kicks-ass.net/ > Signed-off-by: Peter Zijlstra > [Sami: rebased to mainline, dropped config changes, fixed to actually use > --mcount, and wrote a commit message.] > Signed-off-by: Sami Tolvanen > Reviewed-by: Kees Cook I am sorry to reply on v4. Should have been sooner. Julien has been sending patches to make objtool's check functionality arch-agnostic as much as possible. So it seems to me that the patch should be based on the effort I also wonder about making 'mcount' command separate from 'check'. Similar to what is 'orc' now. But that could be done later. See tip-tree/objtool/core for both. Thanks Miroslav