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=-3.8 required=3.0 tests=BAYES_00, 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 7161EC433ED for ; Mon, 19 Apr 2021 22:34:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 44E25611EE for ; Mon, 19 Apr 2021 22:34:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230179AbhDSWfX (ORCPT ); Mon, 19 Apr 2021 18:35:23 -0400 Received: from foss.arm.com ([217.140.110.172]:51976 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbhDSWfW (ORCPT ); Mon, 19 Apr 2021 18:35:22 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B99C61435; Mon, 19 Apr 2021 15:34:51 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 823453F792; Mon, 19 Apr 2021 15:34:50 -0700 (PDT) Date: Mon, 19 Apr 2021 23:34:48 +0100 From: Qais Yousef To: Florian Fainelli Cc: Alexander Sverdlin , linux-arm-kernel@lists.infradead.org, Steven Rostedt , Ingo Molnar , Russell King , linux-kernel@vger.kernel.org, Ard Biesheuvel , Linus Walleij Subject: Re: [PATCH v8 0/3] ARM: Implement MODULE_PLT support in FTRACE Message-ID: <20210419223448.vummlz37nyc3a64i@e107158-lin.cambridge.arm.com> References: <20210330114035.18575-1-alexander.sverdlin@nokia.com> <20210409153309.wbebto3eufui35qs@e107158-lin> <20210412110810.t7pqkwawn5zmqbca@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/19/21 14:54, Florian Fainelli wrote: > > > On 4/12/2021 4:08 AM, Qais Yousef wrote: > > Hi Alexander > > > > Fixing Ard's email as the Linaro one keeps bouncing back. Please fix that in > > your future postings. > > > > On 04/12/21 08:28, Alexander Sverdlin wrote: > >> Hi! > >> > >> On 09/04/2021 17:33, Qais Yousef wrote: > >>> I still think the ifdefery in patch 3 is ugly. Any reason my suggestion didn't > >>> work out for you? I struggle to see how this is better and why it was hard to > >>> incorporate my suggestion. > >>> > >>> For example > >>> > >>> - old = ftrace_call_replace(ip, adjust_address(rec, addr)); > >>> +#ifdef CONFIG_ARM_MODULE_PLTS > >>> + /* mod is only supplied during module loading */ > >>> + if (!mod) > >>> + mod = rec->arch.mod; > >>> + else > >>> + rec->arch.mod = mod; > >>> +#endif > >>> + > >>> + old = ftrace_call_replace(ip, aaddr, > >>> + !IS_ENABLED(CONFIG_ARM_MODULE_PLTS) || !mod); > >>> +#ifdef CONFIG_ARM_MODULE_PLTS > >>> + if (!old && mod) { > >>> + aaddr = get_module_plt(mod, ip, aaddr); > >>> + old = ftrace_call_replace(ip, aaddr, true); > >>> + } > >>> +#endif > >>> + > >>> > >>> There's an ifdef, followed by a code that embeds > >>> !IS_ENABLED(CONFIG_ARM_MODULE_PLTS) followed by another ifdef :-/ > >> > >> No, it's actually two small ifdefed blocks added before and after an original call, > >> which parameters have been modified as well. The issue with arch.mod was explained > >> by Steven Rostedt, maybe you've missed his email. > > > > If you're referring to arch.mod having to be protected by the ifdef I did > > address that. Please look at my patch. > > > > My comment here refers to the ugliness of this ifdefery. Introducing 2 simple > > wrapper functions would address that as I've demonstrated in my > > suggestion/patch. > > What is the plan to move forward with this patch series, should v8 be > submitted into RMK's patch tracker and improved upon from there, or do > you feel like your suggestion needs to be addressed right away? There's no objection from my side to submitting this and improve later. Thanks -- Qais Yousef 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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 A159AC433ED for ; Mon, 19 Apr 2021 22:37:29 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 5B7B0611F2 for ; Mon, 19 Apr 2021 22:37:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B7B0611F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc: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=wMw+bXgF2azRbU4Mizl/McqL6fRjOUumt/fYjPnM3gY=; b=hdng+Z0FcASK9YNRC0mg5o2ln /71cID+D08+HiMKpaYHhyae5oi9VxzqEZGAuMw4QxeV4utiSVGJw1goO/MrHrHM1HalrZFZsBv6Ku qBgdv0P6L6FdGPPTn1aODEKJsCNi6b6mmil0M9am8g/+uBf7okf4OFOqzgQFGVlE1+2ppondR4Uxg QQG9l9UtOEqH50uhP/1r9+vc95BXVG3puZXJwTXacGgsBftec+gT23kM6ql1TqcQpJ9Fj3c0sqF3v sdsbR+RqnRRF9Qv5Y3Gy4ZFOaR4q+lkl75EMQ4F84mOCFsomsJXaS5o3MavfiVLebSIj7gpYd+Lld uIRYUWhYQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYcU0-00AihO-23; Mon, 19 Apr 2021 22:35:08 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYcTx-00Aigl-Eb for linux-arm-kernel@desiato.infradead.org; Mon, 19 Apr 2021 22:35:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=U5kE9wY/9aU10oJqh/+hOpHTh/mwpLxZ3LDF61VCTjg=; b=X8B66F0eVkoXzV4pQwi3krGfP6 J5INYLVSkt0Ja2vgOiKSj/Qd8G33ai/IxW/04dqWb1k+KZq6EYW8KDSvpePr9kGwdvKpNpQagKbJJ vE/n+U3xTf/Tr1R6D/LoNdxcqyozYSgxloZQ/ypQrW/u6iKzlPeM8ZlyRjrFM6e+HvOXSpUKyVMRz gzfLSIysCCh/aGXPbgel+t8DXiy907JjtqXjjlBenWTdFlsjNzj9KDbClqKdCJR+ng0L1fRxqWbTu 7aPreNjDbhxK1Z7i97DTr0Tq7BUbkbiqm/hqY5PITyuXkPd0YRXb1BGROgB6s3cgjcKZUzUPz54/x gVcLU5Yg==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYcTu-00BhA4-2Q for linux-arm-kernel@lists.infradead.org; Mon, 19 Apr 2021 22:35:03 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B99C61435; Mon, 19 Apr 2021 15:34:51 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 823453F792; Mon, 19 Apr 2021 15:34:50 -0700 (PDT) Date: Mon, 19 Apr 2021 23:34:48 +0100 From: Qais Yousef To: Florian Fainelli Cc: Alexander Sverdlin , linux-arm-kernel@lists.infradead.org, Steven Rostedt , Ingo Molnar , Russell King , linux-kernel@vger.kernel.org, Ard Biesheuvel , Linus Walleij Subject: Re: [PATCH v8 0/3] ARM: Implement MODULE_PLT support in FTRACE Message-ID: <20210419223448.vummlz37nyc3a64i@e107158-lin.cambridge.arm.com> References: <20210330114035.18575-1-alexander.sverdlin@nokia.com> <20210409153309.wbebto3eufui35qs@e107158-lin> <20210412110810.t7pqkwawn5zmqbca@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210419_153502_202572_2B5BC287 X-CRM114-Status: GOOD ( 22.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 04/19/21 14:54, Florian Fainelli wrote: > > > On 4/12/2021 4:08 AM, Qais Yousef wrote: > > Hi Alexander > > > > Fixing Ard's email as the Linaro one keeps bouncing back. Please fix that in > > your future postings. > > > > On 04/12/21 08:28, Alexander Sverdlin wrote: > >> Hi! > >> > >> On 09/04/2021 17:33, Qais Yousef wrote: > >>> I still think the ifdefery in patch 3 is ugly. Any reason my suggestion didn't > >>> work out for you? I struggle to see how this is better and why it was hard to > >>> incorporate my suggestion. > >>> > >>> For example > >>> > >>> - old = ftrace_call_replace(ip, adjust_address(rec, addr)); > >>> +#ifdef CONFIG_ARM_MODULE_PLTS > >>> + /* mod is only supplied during module loading */ > >>> + if (!mod) > >>> + mod = rec->arch.mod; > >>> + else > >>> + rec->arch.mod = mod; > >>> +#endif > >>> + > >>> + old = ftrace_call_replace(ip, aaddr, > >>> + !IS_ENABLED(CONFIG_ARM_MODULE_PLTS) || !mod); > >>> +#ifdef CONFIG_ARM_MODULE_PLTS > >>> + if (!old && mod) { > >>> + aaddr = get_module_plt(mod, ip, aaddr); > >>> + old = ftrace_call_replace(ip, aaddr, true); > >>> + } > >>> +#endif > >>> + > >>> > >>> There's an ifdef, followed by a code that embeds > >>> !IS_ENABLED(CONFIG_ARM_MODULE_PLTS) followed by another ifdef :-/ > >> > >> No, it's actually two small ifdefed blocks added before and after an original call, > >> which parameters have been modified as well. The issue with arch.mod was explained > >> by Steven Rostedt, maybe you've missed his email. > > > > If you're referring to arch.mod having to be protected by the ifdef I did > > address that. Please look at my patch. > > > > My comment here refers to the ugliness of this ifdefery. Introducing 2 simple > > wrapper functions would address that as I've demonstrated in my > > suggestion/patch. > > What is the plan to move forward with this patch series, should v8 be > submitted into RMK's patch tracker and improved upon from there, or do > you feel like your suggestion needs to be addressed right away? There's no objection from my side to submitting this and improve later. Thanks -- Qais Yousef _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel