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=-23.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 30B96C433E0 for ; Wed, 24 Feb 2021 20:56:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D136B64E20 for ; Wed, 24 Feb 2021 20:56:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235781AbhBXUzO (ORCPT ); Wed, 24 Feb 2021 15:55:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235479AbhBXUzI (ORCPT ); Wed, 24 Feb 2021 15:55:08 -0500 Received: from mail-ua1-x92d.google.com (mail-ua1-x92d.google.com [IPv6:2607:f8b0:4864:20::92d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 307A0C061788 for ; Wed, 24 Feb 2021 12:54:28 -0800 (PST) Received: by mail-ua1-x92d.google.com with SMTP id t15so1185624ual.6 for ; Wed, 24 Feb 2021 12:54:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LLIfyeFIub3muB/CP7Hm2VoepJyVW4tHjdnBCk4yhLg=; b=ollMcONV3bdQ14QYtVBWt6OyYXIP4whd8nwR5FrAAoQprgeHlmN1Lh632mEYtxVBSI G4+0oh8aEKmX6WHRxZ/cD3de2wT6ITxtYGBJRwApyx5JOWST1pJvimvC7kIIEcRmJIhX cxWpev8Q9LWPytWtDWk5kkB7hijixTdqVkP5KuyaHMKZiVa/Quydp+bZJyfzHOEo3S0y 10d7fNSsZkyAahwGnT4i6pWEhNAUdZpnmNn9XiLqYORRONogk6w8ca+FtsbgpAxmHru+ GjzVvfuqXIq5M68x+natPnOzaLGwVMOrCilUbMYcEktclLWM0NLBY34qeQmJ/lQ8dJzi lEAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LLIfyeFIub3muB/CP7Hm2VoepJyVW4tHjdnBCk4yhLg=; b=RHrE5Xl4mHBvm6vzvutde5IvCCTfoPBrx1CKoqQjuwRrKnCr02D6q31kef876O8zXs YDgW7WrwQR69Gfpeg+Xy0W4iytgnmMpJyNiP31YdPSaM3aZIdMqxTl60Unc6EPVHZTen mLny7RMRCRBLNMliKtE4/3P8aDJ4rg7xJYjARNsuWJv9V8WJzrefo/PP9j7IiZM87Ry6 r4iv4iwRezXQLZFmc3swdLHOGeOTvOqlRFimM/SApNDZdaB/rFUCMy7qgrjekE2v6jTl 5eBWvAsIEc0ZT9YjiZEm4Zm6obYGcM63UitPLOdY4kKG45Ppoqhjas9qjfICYVNPqw6R v/Ew== X-Gm-Message-State: AOAM533Y+0RwisRK8MxnJK9MCClWnDaYEe7+K4Dpwdz6iMpmYkxiI2Zd CQA2WEK/pLKalEiR583Nrnipt5dS3JWzAvhU0+V69g== X-Google-Smtp-Source: ABdhPJwDkAZHxqTqNM1na6tlHBSoIcFQFsNIy4TN5WNwBY+1hn1Ea0NqgKnjX2WoQcdN6Tf/Ph1uK9pKsYI+hEdPksc= X-Received: by 2002:a9f:2021:: with SMTP id 30mr11157082uam.66.1614200066849; Wed, 24 Feb 2021 12:54:26 -0800 (PST) MIME-Version: 1.0 References: <20201211184633.3213045-1-samitolvanen@google.com> <20201211184633.3213045-2-samitolvanen@google.com> <20210224201723.GA69309@roeck-us.net> <202102241238.93BC4DCF@keescook> In-Reply-To: <202102241238.93BC4DCF@keescook> From: Sami Tolvanen Date: Wed, 24 Feb 2021 12:54:15 -0800 Message-ID: Subject: Re: [PATCH v9 01/16] tracing: move function tracer options to Kconfig (causing parisc build failures) To: Kees Cook Cc: Guenter Roeck , Masahiro Yamada , Steven Rostedt , Will Deacon , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , linux-arm-kernel , linux-kbuild , LKML , PCI , linux-parisc@vger.kernel.org, Helge Deller Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 24, 2021 at 12:38 PM Kees Cook wrote: > > On Wed, Feb 24, 2021 at 12:17:23PM -0800, Guenter Roeck wrote: > > On Fri, Dec 11, 2020 at 10:46:18AM -0800, Sami Tolvanen wrote: > > > Move function tracer options to Kconfig to make it easier to add > > > new methods for generating __mcount_loc, and to make the options > > > available also when building kernel modules. > > > > > > Note that FTRACE_MCOUNT_USE_* options are updated on rebuild and > > > therefore, work even if the .config was generated in a different > > > environment. > > > > > > Signed-off-by: Sami Tolvanen > > > Acked-by: Steven Rostedt (VMware) > > > > With this patch in place, parisc:allmodconfig no longer builds. > > > > Error log: > > Arch parisc is not supported with CONFIG_FTRACE_MCOUNT_RECORD at scripts/recordmcount.pl line 405. > > make[2]: *** [scripts/mod/empty.o] Error 2 > > > > Due to this problem, CONFIG_FTRACE_MCOUNT_RECORD can no longer be > > enabled in parisc builds. Since that is auto-selected by DYNAMIC_FTRACE, > > DYNAMIC_FTRACE can no longer be enabled, and with it everything that > > depends on it. > > Ew. Any idea why this didn't show up while it was in linux-next? Does anyone build parisc allmodconfig from -next? parisc seems to always use -fpatchable-function-entry with dynamic ftrace, so we just need to select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY to stop it from defaulting to recordmcount: diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index ecef9aff9d72..9ee806f68123 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -60,6 +60,7 @@ config PARISC select HAVE_KPROBES select HAVE_KRETPROBES select HAVE_DYNAMIC_FTRACE if $(cc-option,-fpatchable-function-entry=1,1) + select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if HAVE_DYNAMIC_FTRACE select HAVE_FTRACE_MCOUNT_RECORD if HAVE_DYNAMIC_FTRACE select HAVE_KPROBES_ON_FTRACE select HAVE_DYNAMIC_FTRACE_WITH_REGS I'll send a proper patch shortly. Sami