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 EFE13C433E0 for ; Wed, 24 Feb 2021 20:55:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B830B60202 for ; Wed, 24 Feb 2021 20:55:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235607AbhBXUzI (ORCPT ); Wed, 24 Feb 2021 15:55:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229598AbhBXUzI (ORCPT ); Wed, 24 Feb 2021 15:55:08 -0500 Received: from mail-ua1-x92c.google.com (mail-ua1-x92c.google.com [IPv6:2607:f8b0:4864:20::92c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BB48C061574 for ; Wed, 24 Feb 2021 12:54:28 -0800 (PST) Received: by mail-ua1-x92c.google.com with SMTP id t15so1185623ual.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=opREDrzdBbq5+HXkyV4uLRgiy0QC+Qja4C2cjHPzRUYsBPYrZ3DCC44Lj4YPAP8gZl M91Fp0kwlkJFZdAjzI74vu3t00WiEhldFRCto8b6hYy9a/6Jn3ptf/OX4V8NjWEQADV9 pgTGBlb3pVJgz4Xp+/BKfufZgl/58AolC2qj+ABuQylzqJYM6JOS5oua/38zXQ7DIFu9 9kI1kSxIBAioG7h9XF2b7xP1+B9I1BWbRTFQ4lMZxfj/2GZ+syAm+9u+UzT+/tnvWUxS mt3S5ZgnCrN/mPe2pTpsmSa5VrT+SAOXqHa8n3/Pnz/AgiTQXB6YuZNPXFOkvFkDD9+g EVJA== X-Gm-Message-State: AOAM531KmLnWq3gHaVNAKihjJj1ViVXWDOziSmqOjwBb4qXqh7ER4Dun nYaq8HaMTgnIlCsyp9y/J1+C8EVgwZJEl1FD6ySI5A== 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-parisc@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 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=-13.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 20C32C433E0 for ; Wed, 24 Feb 2021 20:56:11 +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 9CE9464E09 for ; Wed, 24 Feb 2021 20:56:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9CE9464E09 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:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+389wT5POFN1MgTLN9/5hlcJkgXBoG1Q1LEwaaCE404=; b=MA1VsUqE22I1QQmWSjhDiYt25 idcmMV4ggPFzyXv97SzWRBpB/VR7rMyxeG8ccKinieiceFLuQMoACh0TmgbgEmqM8hVoTkBl9orGu 89Bg04SGzEqdSh1MpoyHn0MScjQ4GC2NLexqX+l+TKJz2Q8Bj8A+gE8Map5XmwXKMDrWJcA7OSEhZ oyYiKkan0RC7FRdN/s93aTQ6IYPxuIUSXcM8PrfzXAz8HCLPO0VbJOn5Kpn/I8dqwXVoDdm2iuBEF 6kcWp9menc3Ll4yztqxljUljWQ7ogEe6TXrpkgGUfsb7ksdNIxVhLv1ZiNf4SxbWPqZ7KBpFReGLy dC4IFSiNw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lF1B4-0007YY-El; Wed, 24 Feb 2021 20:54:34 +0000 Received: from mail-ua1-x92f.google.com ([2607:f8b0:4864:20::92f]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lF1B1-0007X7-LK for linux-arm-kernel@lists.infradead.org; Wed, 24 Feb 2021 20:54:32 +0000 Received: by mail-ua1-x92f.google.com with SMTP id a9so1189413uat.3 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=Ge3azEovcPqoh2s0QPLkDE53cVORMj9z8Klkyey3SMlw2DGgdLX9YqdHT1gCSbRtKT vy0QfdCoS1pLGXW2zgf/nGrAsnCXl5Lg662B5mBt/pO+/5rap8NR6RC3iDisXJV7JjVt D085mUziQF3xarSAXRv3rh4b+W5si1qcwJjHSNdbbu9r5sqyNBHfXblmWwG/VkDMKPLM NpaMImUQI9kEVlQErSW72dNDqq2kfRiJJ6ZHPOOso7LakbslEqsw3VhUT+IezYpHo2ni V9HiDlM8ex4wNoeOtjX8zFKCHXNTMDivStMu5Mu0q3vvuSs5xutpejn5oRKEvKvdJbQl qHTQ== X-Gm-Message-State: AOAM530SNFNfaVwPJmijnSTxyEiIclwPjJjkrGeGvfqwLd24DO22Lp5G s02F7EyrElZOmvZ9FSrLGLRlyCaup1HJejBvE8jfzg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210224_155431_841171_08A32BB5 X-CRM114-Status: GOOD ( 24.56 ) 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 , linux-parisc@vger.kernel.org, "Paul E. McKenney" , Kernel Hardening , Peter Zijlstra , Greg Kroah-Hartman , Masahiro Yamada , linux-kbuild , Nick Desaulniers , LKML , Steven Rostedt , clang-built-linux , PCI , linux-arm-kernel , Josh Poimboeuf , Will Deacon , Helge Deller , Guenter Roeck 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, 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=ham 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 7BC09C433E0 for ; Wed, 24 Feb 2021 20:54:48 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 7BC6E64E20 for ; Wed, 24 Feb 2021 20:54:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BC6E64E20 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-20825-kernel-hardening=archiver.kernel.org@lists.openwall.com Received: (qmail 26312 invoked by uid 550); 24 Feb 2021 20:54:39 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Received: (qmail 26286 invoked from network); 24 Feb 2021 20:54:39 -0000 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=kTORcjjPMCHGyKAzeIWcJ2nQI0WMEZ/WNwY1KCfaQURwayMubBM078rV6NUNUR4nB+ jfWYLKIwXisxCnUuh2KPnS7Jn77k815A+jhhXcnqzNJDCP20mXEtqxoKizRM/doY5Xfc 1VDWdAsN21GxFtbz5cJYu5zgnT+YNElAKeMB6u6URf812ppUzqRm3RWzyr+yuFxPyu+e Ub74dO/qlfYCsn7bUdaSxU16w/IwFBWmfnykq2R1eMHYfZzrofAdkcGUdAM7LcztKlnj JYjnyBHkGuTg6PsTN7xR24CLECAuIj2MUublbmek/zkudlHPlkpetgKj8KoUJ8t3wVhA IlTA== X-Gm-Message-State: AOAM531Hc2YvU7rKTIGhyzSGu5+GrGgAeDUqw0XiwW/vzZ8F/WPjKAe1 ryrSjimx+KxHc36W2PU0ZTw1yYOFmhCygtVLKyTSwg== 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" 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