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.2 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,URIBL_BLOCKED,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 92344C433B4 for ; Mon, 19 Apr 2021 21:56:33 +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 DFFE160E0C for ; Mon, 19 Apr 2021 21:56:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFFE160E0C 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=IN1KOItyG8R1Uch5ABFHGGXgtvanq6JEB9wL2DR2KvE=; b=W0R9nqzrSX2OK9cOb4u2nmZAp AP3P7WLALC7gKrpn8HUZwyC7OKh8FEHu4wmSK37Vl1FNgJyU5g5lhgDBsWnW12R1EgbDmJuo6+NWI 27o3+yyS+oG6KQNHLzsEbP1xtnXeR4Zjj6QlQ39+Su4NtOXT2KhpWgDMM8H9iGRdv99/e0dsRBb72 E2omsEfAc5yBAOPIWQ2v4yleR/tZSxinu1NB/3h29SAJQ5z62TLBWO7Pz6TyCVluQNywkxNbJAQVp 2hee4uFEhUPM24i+kvS5lnB9sC+nodM/sKjT1OHMNAN0W2H/JCJadIyqM7rjj6TooUSnWhmUaQX10 MNK18Xgyg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYbqr-00Agak-LT; Mon, 19 Apr 2021 21:54:41 +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 1lYbqm-00AgaY-Uv for linux-arm-kernel@desiato.infradead.org; Mon, 19 Apr 2021 21:54:37 +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=CWOqGghR0h61qz/kVunXFp7MUYbH9+eK+tLItI6o1wU=; b=nqFVLw+8ulroZcrTbmgJLeql5Q W5rcp0utwq5XrsR1vnyfJQ5+lbE4/tW1y8y92iu53vPVnuu9gKBvhj1k6pbhAABGE0EI3qSsJId+h cUzmEKQHbxVC2QVwZYfeg5l8J0LjMr4MyVl+E71hBm3Apdzy37sJCIZ9lpeRKPpXjQWpqarRkf7JP HVFFKkDcvV3LuoKuoA7gZ5J0+xefMyuYE8BTAG+ON+aDJfqK3crJKFJuyF1jG9RIWzNExq+bx+C4n wFf5PLGOKbvhy615FX0V8xkEbFwYucRFTBuqa7SBKAm3zK+3Me0HZfaHbmCki3PoIlsdaiIvpIY9f /n+D6hVQ==; Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYbqk-00BgNw-CM for linux-arm-kernel@lists.infradead.org; Mon, 19 Apr 2021 21:54:35 +0000 Received: by mail-pj1-x102f.google.com with SMTP id kb13-20020a17090ae7cdb02901503d67f0beso257894pjb.0 for ; Mon, 19 Apr 2021 14:54:33 -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=CWOqGghR0h61qz/kVunXFp7MUYbH9+eK+tLItI6o1wU=; b=vH/Bq3V2p2DxhvHBBcgQUSRJcF4X8rvfAT56irbWhrYYpoOt5b3tJzqHmi+vnBuPMQ qtothPcq/56mLrLfs5n9tMlRbcVdM4K1ttVMQbiltX67Qru9g0PGqb04F8YMImSvz6qj xD6aLJ81uqWqSKmgs3vKRZq81/iCLHbU6LhTZSpvIK3trac3y4XJE5s/sBVCEiuEhN/X jkb1O8rY7vQzpLX5SljJu+pvgArJxn8CzWksFJKNslTXnEmx4i3fjVAkzv3GRzaws8YS lvc5yNAu3h3icn1/1xL/2dcxhmZ7/lPCcNQThccJodojvOU4xDP9c5AQqUYtuTYeslOz PXag== 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=CWOqGghR0h61qz/kVunXFp7MUYbH9+eK+tLItI6o1wU=; b=ZRRcQ/DoBCVdZUiZuSROH7XxV8Ugt6/fpSkP7EHHT5rZX7AjKs/v8MTNrZquKq53C3 zIv+7LmCR1OqIeBmi0/eBFsdZDsk+P6+IFzFgRl7vfU5Dbv+pgC2Bw/j6+ezUlGB2cB/ eYYaLDtOEzspxvlpxNyTBK4NlL8ShNqqFFrXLildja8lDUwYNBh0unLQ0wmJJm8WdJ8e 8cTPVdcvfeRbMYjVPav4FQ/rwYxoJ3dyPyTVj+B+isvdQDr5TLU4P1RFsuOzWtTL5O8c 5OPZtl7PO/uF+J5IUiAYw7n5ZOhARCTAcO0o3vJ/UdjhjVy++Ui1usoc5wllWTV/t+Rv EDig== X-Gm-Message-State: AOAM5317bZJ6boCHlWkIE+xK8qqXSl+HJha4Xwb5GdbdOUdwTzS2JRlm goZs33h32lJxDUL79N1H3Ag= X-Google-Smtp-Source: ABdhPJxfFnARh7c1u3Pi25K4eDfTImEB8Bv449HC7U4FSuUrOWNI8b2R9wo6HOckafJSSM2faCpbQg== X-Received: by 2002:a17:90b:1183:: with SMTP id gk3mr1246371pjb.172.1618869273057; Mon, 19 Apr 2021 14:54:33 -0700 (PDT) Received: from [10.230.29.202] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id nv7sm371725pjb.18.2021.04.19.14.54.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Apr 2021 14:54:32 -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> From: Florian Fainelli Message-ID: Date: Mon, 19 Apr 2021 14:54:30 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210412110810.t7pqkwawn5zmqbca@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-20210419_145434_475882_BA9EE6C0 X-CRM114-Status: GOOD ( 19.02 ) 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/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? -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel