Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp499654pxf; Wed, 24 Mar 2021 09:14:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypXw2D99Bm2375PF2QPs5/mibSYHr2RrjOZ7sdYZJHNRheYH77AimiedWuDYDhKzu0wA3B X-Received: by 2002:a17:907:2062:: with SMTP id qp2mr4509797ejb.397.1616602449248; Wed, 24 Mar 2021 09:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616602449; cv=none; d=google.com; s=arc-20160816; b=PMWQKmm9xubaVv4LKOnisRsVZIlwfPbTgyLAdnOMTHWtVssIzMNm2cF5c+fgLz6ihN TclittFIEzGIHshBwTD1wNnGuX/qRYM0dPBGgCQ2Wtu2ifDynyQSYIMV6+h9uPX/TvRa eTt7UqqaecMvhouf0J0wbdLaGFgvWoAfif2B0AtcThSR2QqdRRfp6kwVAS9XtPbc4GGr aZVV62owrXyiHIk7joAIraO5dKTQYIrbpKg9TSCeW1JrqMEnGQ4+ezT0vxm20AuNJUD5 8SCUMarrmuEgEwrVUjDfH3zajoV+qyYr2MSB15NExzkLArXOJK2+VijD2JJB6w8WyrUx CPIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=2/o6p48ZHwA2LaCs6jxzUpnzNhtDyQIgxSd7YvV4GI0=; b=xDxEE4y3wyEhmTnEH/zTBAt5YwjPhqrN4slVdi1gwXznJSCNA74a2PChQZsa6IAeBu yd4cWXoUQu0EG/zbrcQYXKr+WVIENyBPi6vd/ZeBW+e42vWIWv/7sgvbwiYvzByRCB5/ WMaNUM0MnXQT3d44IKF8Ytu+ysCMuTrTmXTSQx0fjWT8KQvMLtE6yu5oJNDkfQe1WChH AhVne3aNrEXV63nWdRBQm3RB75rIaw9DMrJNBcyAKl6q5i9X46HLMSWEzTkQJ00O+2A9 bpYfyUhVhTyIMWuL6lvKRwvYOeKm/tmwZrzMWGdqbNtRSUR6PCEXl6zirkFD+8T6iNP5 9LvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u8si2072907ejz.667.2021.03.24.09.13.44; Wed, 24 Mar 2021 09:14:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229500AbhCXQLU (ORCPT + 99 others); Wed, 24 Mar 2021 12:11:20 -0400 Received: from foss.arm.com ([217.140.110.172]:35674 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbhCXQK7 (ORCPT ); Wed, 24 Mar 2021 12:10:59 -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 79D35D6E; Wed, 24 Mar 2021 09:10:58 -0700 (PDT) Received: from e107158-lin (e107158-lin.cambridge.arm.com [10.1.195.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3F8BB3F7D7; Wed, 24 Mar 2021 09:10:57 -0700 (PDT) Date: Wed, 24 Mar 2021 16:10:54 +0000 From: Qais Yousef To: Florian Fainelli Cc: Alexander Sverdlin , Steven Rostedt , Ingo Molnar , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , Linus Walleij Subject: Re: [PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support Message-ID: <20210324161054.pg5272lh45n364ko@e107158-lin> References: <20210312172401.36awjh4hmj4cs6ot@e107158-lin.cambridge.arm.com> <134e1a2c-daac-7b00-c170-bcca434d08df@gmail.com> <20210314220217.4mexdide7sqjfved@e107158-lin> <20210321190611.d6a3hbqabts3qq5v@e107158-lin> <20210322110106.2bed3d50@gandalf.local.home> <20210322163248.id7qplbk6och6kuw@e107158-lin> <504d72ec-70a6-7e50-dbbb-16d693ce6150@nokia.com> <20210323222230.2d63hdcxq6strbug@e107158-lin> <2404ff10-7acc-3946-6592-31508f257f33@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2404ff10-7acc-3946-6592-31508f257f33@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Florian On 03/23/21 20:37, Florian Fainelli wrote: > Hi Qais, > > On 3/23/2021 3:22 PM, Qais Yousef wrote: > > Hi Alexander > > > > On 03/22/21 18:02, Alexander Sverdlin wrote: > >> Hi Qais, > >> > >> On 22/03/2021 17:32, Qais Yousef wrote: > >>> Yes you're right. I was a bit optimistic on CONFIG_DYNAMIC_FTRACE will imply > >>> CONFIG_ARM_MODULE_PLTS is enabled too. > >>> > >>> It only has an impact on reducing ifdefery when calling > >>> > >>> ftrace_call_replace_mod(rec->arch.mod, ...) > >>> > >>> Should be easy to wrap rec->arch.mod with its own accessor that will return > >>> NULL if !CONFIG_ARM_MODULE_PLTS or just ifdef the functions. > >>> > >>> Up to Alexander to pick what he prefers :-) > >> > >> well, I of course prefer v7 as-is, because this review is running longer than two > >> years and I actually hope these patches to be finally merged at some point. > >> But you are welcome to optimize them with follow up patches :) > > > > I appreciate that and thanks a lot for your effort. My attempt to review and > > test here is to help in getting this merged. > > > > FWIW my main concern is about duplicating the range check in > > ftrace_call_replace() and using magic values that already exist in > > __arm_gen_branch_{arm, thumb2}() and better remain encapsulated there. > > Your patch in addition to Alexander's patch work for me as well, so feel > free to add a: > > Tested-by: Florian Fainelli > > FWIW, what is nice about Alexander's original patch is that it applies > relatively cleanly to older kernels as well where this is equally How old are we talking? Was the conflict that bad for the stable maintainers to deal with it? ie: would it require sending the backport separately? > needed. There is not currently any Fixes: tag being provided but maybe > we should amend the second patch with one? I'm not sure if this will be considered new feature or a bug fix. FWIW, tagging it for stable sounds reasonable to me. Thanks! -- Qais Yosuef