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=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 D8C99C433DF for ; Wed, 14 Oct 2020 16:51:35 +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 491132173E for ; Wed, 14 Oct 2020 16:51:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JT099xpi"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="q+bPhxgY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 491132173E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=TLq4R9Ar5TDf9Hw26zMfqLHj1Q40aoj3ZwAoQeGIDys=; b=JT099xpioyI9oe/J79yVyqYqK QMsEyZk2nDhA455AxV3l1RUL/qndiQ+yu4ohUyXBfT99JcN0zLA8hFC/wrBGihGaj7vUXiuBGtQ7m 8fhACM4iNqYuv+Hywq4vBgv0qyfucHAOTWmle04Isy0ANlk1iqG/ZitW0Zr5zpab8MzNXNA/DaGsi RF4yJi8zOMv1AcKeI9tqBMSur+gvCW1ZTRE7JbieB+HYSRySvooRjxz9IDkN9ulddHFbeLIxI4bt4 5Swjz6502j0OzBcTEU2JWOunHbdHvl1gW7iirgq47q5YQPZ4YEiGQG2Gfewg8/Z0qxeuPE9ziaIB9 fsLdIB2Cg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSjyd-0002za-GE; Wed, 14 Oct 2020 16:50:11 +0000 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSjya-0002yZ-Bf for linux-arm-kernel@lists.infradead.org; Wed, 14 Oct 2020 16:50:09 +0000 Received: by mail-ej1-x643.google.com with SMTP id p15so5796760ejm.7 for ; Wed, 14 Oct 2020 09:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+kKooy8y3/ieceX7ZqDJ+1+nZaa9FZpK4qlfOAJ4xg4=; b=q+bPhxgYA+ZTPkLdf43AbfDU/NVUXp5l+vHvOvwwCnu8EDI0ZTBBe5x7CS7iqFgW6U RPKNLv5TazIRXEB8zpXJfYYNIb0vbS++16n0Vl70eRtBPcT0r/UwvHw/ZjW87DDaUfSx +Xd0/NTf1ApzUVFxGl+8MloHTritdnRiWIjqML6JVm6nZY9VgaoijQM+t1N7K/GhHURP NkTvh6uJwsD2wsYWhoNFsSwxTukwKXmEPyAzgpia3QQ/t+EzYmGkVMjooaxT9iBZyUhX VeofVZViwdeEOym4e9lpV9fWnoiFgWXqxdPZT/fx4VJS8nzxptdXq5xzDzIorjQDqzDq iifQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=+kKooy8y3/ieceX7ZqDJ+1+nZaa9FZpK4qlfOAJ4xg4=; b=bTJwnUpI4gHVrJ9mSliSl/H0+VgWwOS82cEjOtQ20ROwrJiRrYeFAUk/ckjM8i5SwG I7K/Ca3EkjxEdo4c3/Em0KjHeGPeFcoe/Afb45uMShbmAbPtqImLjrG4hqxv6Fpi5WX4 jHEr95jzDIfh+obXHc5+0fDwEm4esgZGgnZ8WXnH6/Qqi6b72jfQDkLbOy9E2sB4tG27 5E7ou+N9/Wmi8Z0fMH6NQK6GXMBjUjwuPy5W/6yc8D2zD+NrOqMCx20Hh4ybC5RMqcjQ a9DLn+estDa9pJyv7DvOpUGc9RtS4QSAE1TnmwSTOllJr7Tn9RrPQP7pC3lw1sOlPxNz vQCQ== X-Gm-Message-State: AOAM530n1n0jkFm1RkiVvPqT/4LDsmZMb1FQjnAUgQMJzVB+Mwq7Lcl5 tXIqxHrDxfcD3/RITI/lznA= X-Google-Smtp-Source: ABdhPJxnZz/JvSQgt+bP4GraqaDvLe+xrlEutFj8lORQJcvNdI3kXKHdjhRXRnIr61+pk7L2rCm3hg== X-Received: by 2002:a17:907:43ed:: with SMTP id ol21mr6121680ejb.279.1602694207048; Wed, 14 Oct 2020 09:50:07 -0700 (PDT) Received: from gmail.com (563B81C8.dsl.pool.telekom.hu. [86.59.129.200]) by smtp.gmail.com with ESMTPSA id c19sm44446edt.48.2020.10.14.09.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 09:50:06 -0700 (PDT) Date: Wed, 14 Oct 2020 18:50:04 +0200 From: Ingo Molnar To: Sami Tolvanen Subject: Re: [PATCH v6 02/25] objtool: Add a pass for generating __mcount_loc Message-ID: <20201014165004.GA3593121@gmail.com> References: <20201013003203.4168817-1-samitolvanen@google.com> <20201013003203.4168817-3-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201013003203.4168817-3-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_125008_424196_1F8B820A X-CRM114-Status: GOOD ( 21.58 ) 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, Peter Zijlstra , Greg Kroah-Hartman , Masahiro Yamada , linux-kbuild@vger.kernel.org, Nick Desaulniers , linux-kernel@vger.kernel.org, Steven Rostedt , clang-built-linux@googlegroups.com, Josh Poimboeuf , 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 * 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, dropped config changes, fixed to actually use --mcount, > and wrote a commit message.] > Signed-off-by: Sami Tolvanen > Reviewed-by: Kees Cook > --- > tools/objtool/builtin-check.c | 3 +- > tools/objtool/builtin.h | 2 +- > tools/objtool/check.c | 82 +++++++++++++++++++++++++++++++++++ > tools/objtool/check.h | 1 + > tools/objtool/objtool.c | 1 + > tools/objtool/objtool.h | 1 + > 6 files changed, 88 insertions(+), 2 deletions(-) > > diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c > index c6d199bfd0ae..e92e76f69176 100644 > --- a/tools/objtool/builtin-check.c > +++ b/tools/objtool/builtin-check.c > @@ -18,7 +18,7 @@ > #include "builtin.h" > #include "objtool.h" > > -bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux; > +bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, mcount; > > static const char * const check_usage[] = { > "objtool check [] file.o", > @@ -35,6 +35,7 @@ const struct option check_options[] = { > OPT_BOOLEAN('s', "stats", &stats, "print statistics"), > OPT_BOOLEAN('d', "duplicate", &validate_dup, "duplicate validation for vmlinux.o"), > OPT_BOOLEAN('l', "vmlinux", &vmlinux, "vmlinux.o validation"), > + OPT_BOOLEAN('M', "mcount", &mcount, "generate __mcount_loc"), > OPT_END(), > }; Meh, adding --mcount as an option to 'objtool check' was a valid hack for a prototype patchset, but please turn this into a proper subcommand, just like 'objtool orc' is. 'objtool check' should ... keep checking. :-) Thanks, Ingo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel