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=-2.3 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 46BBDC433B4 for ; Tue, 4 May 2021 19:13:12 +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 CBC4361182 for ; Tue, 4 May 2021 19:13:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBC4361182 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4zwiHDavX+C8Yxe0oNROuUZAO7QJ6MMUELngLovq2BE=; b=DGz3+1UuHSjWg5rXHEQ1ASGHC i4pCnvLFjJNhG5OsIndQNt78qd55KM3uj2SY4DF68rlME4ixFMfmluJcbLcS43Ywhaf1j7ESZAx2T 9SDC28j3DNjUk6SOnP5ZD3woHkWxd0tjGBzBoyFNfeT0VgBgEW4KW08xIoRRPAxyjISIABWOoNLP8 jhKRalpD6l+W6elwtY4UNoJj/8G7QtAEYzNB4E4G35EMi7ANrp2nIpLH96wpH5oK2u9pbaWYEyqZr nclfiIQwg7v4qIPj16FHh0lci1xyQDhqNLFmS/RLxkLyCmRXLyPuPwo0AP2r7NLfKB2zyZHmZK47f aqtH1dHFw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1le0Rt-00GrQW-HN; Tue, 04 May 2021 19:11:13 +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 1le0Rp-00GrQ0-8v for linux-arm-kernel@desiato.infradead.org; Tue, 04 May 2021 19:11:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=TxzHRwKZbDTKhAa3rqkFK95SxSm1x12WqGIcE5Es6j4=; b=JEgw3+c6RIhPOsG7/cOMA3SYmx DUkUBSqVup8MjVygWMgPxxPhStqY2OmhBJGLUH6m4pi1+dsHNZwzvoIfQu9TigNAjmFPrYTPzx/HC dDL94+TODnWjaI+RMvMnJM9Rqju1/vf86BUkc7rYngZU0ALiQWl4WhIfd9+PTeHa4Pj4vC17xONJX YrI3WNifZjSYbRrEDw8YfSAIQb2w/OPBS4o+OgputGsp2a+7LX44ZgK2xd0B+udFHhXj6uDksQRmf QKXRKVDH6LaI2pjx/rcp255dYL7Ov8FBS7OLX5bxhwmEI9NRoHUEt59q8vZKMtXSMdLLx1irNhsBX saCaP8UA==; Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1le0Rm-004Csu-Dv for linux-arm-kernel@lists.infradead.org; Tue, 04 May 2021 19:11:07 +0000 Received: by mail-pf1-x436.google.com with SMTP id e15so8964121pfv.10 for ; Tue, 04 May 2021 12:11:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TxzHRwKZbDTKhAa3rqkFK95SxSm1x12WqGIcE5Es6j4=; b=AFowgdU/OmbKbthBcKzRkr7Y5AT78+GPyr1ojZ6S//j2d0LhJwRPyFipq4OnJPXA31 JeZhy6Y+9i8KtY5CAN+rWgw/VqGDruzdEsEoJ7pS+Uor11OL2HFIlbFKLeqP2ltwvE8R RYuDwduyL+BQXtaXUWttDjQtueH2mbSfaHgpaFLVX4R1k6YaZmPm06w0KqJqpZdXmyKr YVXEAjmwq8yAUEcgZ9aB++GswYH+79ZBdpz5eDPWKgE5SRDelgoMn47a+6oS3ka4anC5 Y46lOpAz0ztEwzucbXqJbdo/KNtP7CvbHQYVW7VlMrgGqrAnHFLkp4jFhd+vS9PbOLOW Qhrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TxzHRwKZbDTKhAa3rqkFK95SxSm1x12WqGIcE5Es6j4=; b=WexSmt/Z7ilAHICF2qYGELc4dxgbYVT2GXy6xgqOU0Lx1jqQn/bR38bGw6lI88c/sx UxvGzyZo69/y1Z7Nd8nWFRn1bAlyco8+mqygkWcwmNUz2O+NuZ53LOl9lBMs3KmrA9Ls BfHC2r5LJcncqfkilE/U+UHMF8prBwvmS1/+QJ2gDjaoYbcny3nIVuy7JK3ETithCOOF 96UHut6O+P2rInLx/sIVJBnkv338oBErensJshdMx+JQePhCg0G/9J96eBLM42Rx9tRZ XyZQkW2J0TEV9CZRSJzadk9GDwEpdGRhlBj4ZJJEK4VhOY3EQCeRkfKj5p5d5JoftkgJ 503Q== X-Gm-Message-State: AOAM532X1O3QpIrWi2TK2agYw+IaxfmYZAEnyBnQRwJoYgy3DTA8bLBU R3adzJUL647LIM9L09oAAcQ= X-Google-Smtp-Source: ABdhPJwesoeSKj4IzrFaOZdUqefGTqzsYZhBL0PG4+uoscVLKtLuvnTlt8c7QlURYqfUFwALg//c1Q== X-Received: by 2002:a17:90a:d24a:: with SMTP id o10mr6848029pjw.138.1620155464463; Tue, 04 May 2021 12:11:04 -0700 (PDT) Received: from [10.67.49.104] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id i126sm12638288pfc.20.2021.05.04.12.11.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 May 2021 12:11:03 -0700 (PDT) Subject: Re: [PATCH v8 0/3] ARM: Implement MODULE_PLT support in FTRACE To: Qais Yousef , Alexander Sverdlin Cc: linux-arm-kernel@lists.infradead.org, Steven Rostedt , Ingo Molnar , Russell King , linux-kernel@vger.kernel.org, Ard Biesheuvel , Linus Walleij References: <20210330114035.18575-1-alexander.sverdlin@nokia.com> <20210409153309.wbebto3eufui35qs@e107158-lin> <20210412110810.t7pqkwawn5zmqbca@e107158-lin.cambridge.arm.com> <20210419223448.vummlz37nyc3a64i@e107158-lin.cambridge.arm.com> From: Florian Fainelli Message-ID: <761c79cf-8709-6da6-cdb7-9e03e25f0272@gmail.com> Date: Tue, 4 May 2021 12:11:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210419223448.vummlz37nyc3a64i@e107158-lin.cambridge.arm.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210504_121106_507069_FB999858 X-CRM114-Status: GOOD ( 20.08 ) 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 4/19/21 3:34 PM, Qais Yousef wrote: > 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. OK, thanks! Alexander, do you mind sending these patches to RMK's patch tracker: https://www.armlinux.org.uk/developer/patches/? Thank you! -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel