Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5157893pxj; Wed, 9 Jun 2021 10:25:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsZo80MzxrgqegOQn9ameQ1Rc5qfQPWyD/JIzVduS4BNa7lREwwoekLt4wWnU/6jqYqfzG X-Received: by 2002:a17:906:d93:: with SMTP id m19mr896827eji.177.1623259545144; Wed, 09 Jun 2021 10:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623259545; cv=none; d=google.com; s=arc-20160816; b=YefR7Oquy9uqJHn3XLqrRG1pYzPh+wfjYMTrfx5j8JE0fDnDmU/SeaaCAHg3H7CZnn GZ5gXJSp9K7MDzgsmxbBfo9QnQITZU3GZysfy5MRMzoATndfc+Fx4JX/h+GqHFL/QJ6P iGlTfnWLgY0z59vUFZvOBv1ejl+4RF1IuvEuSZu8R5vacANmvZ7H4dyicnDFXUVT8HqR 8+FaGbtJuDUUhHcmEbpvsFLs+Uh6/f0F2u2JFHGoPeNIOLG3CRxPKqiwGbHRwJR8Vukt R9lQwNyDzBoSh5l8uNrwQ7ubJzUNHMYLpH/MbLa4DNLee+k1cZ/DQ6EX5n+7tk7guvSg Y3Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=SdyzNE4lDa5K8E/+cgHyxLNF4hyd03yr38XjCRqQEas=; b=eUel5vQGV0PSd6yF5pWyKTng56LQBIUXgYr0/OIraj3PEXvKSgy4dalN1cYOq+HGkk eFArbjHSiBbjqwAHFk0Kyytk3wvYEgqHXt1HiS5xy/zJxilbAPBrC6hZe1jrxsOAM06n nheByAccuEsHvn9EWKSGgJVWE1czit1mc7ti6iPFqI7PuJcuM09u5O9emDy7qA7EKQSu pJYjRwgVH6fBhESpPW9mF6Km1YvbfTbZEnKLvJ1P4P1F/atNYUsk7bJBy7Ybqxhrw8hP 1btfUV0WmR+g/gW/Rxky3OgNaxypRN11+rG70kWqdph5B/rOhkcr9WlQ0RgYHFYmD+R6 EorA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aI4ts5hT; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si205520edr.526.2021.06.09.10.25.19; Wed, 09 Jun 2021 10:25:45 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aI4ts5hT; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233129AbhFIMf0 (ORCPT + 99 others); Wed, 9 Jun 2021 08:35:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:48560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230377AbhFIMfZ (ORCPT ); Wed, 9 Jun 2021 08:35:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2B213613B9; Wed, 9 Jun 2021 12:33:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623242011; bh=/gF/nMiVYi77wMD7BAky1aCWDTXgkdMSrbE1ZV3y7uM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=aI4ts5hTJ5GIU7pNjI+KAZnGPBKg/M19RU0DyrnUtrv1ILRmYnGg2q5r+lpcDnZne bGGyQdHt4j+zcp5LfJ0UFZYVkqzPAKfVju+TZffJmkS0x9pZ5idFluGSFRj6I4SZzL wRxGo81ddgbjkFLv6ewaEIeWwAMclkKoMy3niI0oU7pPu4dLXKeofViRuyxlLotvqX 0TGDTx2PJoLRsHPNQ00GxB3sCQevpA2Tph8NXmkkhP7XDhXbQaYqaNxH7vt+aOGcco TTeydzG2j+nLpGxcWSotgyJXHvckExq1+VPJS8ipFbnKAw+uywcGA/YjbIUDprtIvT EHmyErMec9MNg== Received: by mail-lf1-f42.google.com with SMTP id n12so30754578lft.10; Wed, 09 Jun 2021 05:33:31 -0700 (PDT) X-Gm-Message-State: AOAM53141tznF0BvznYCaWutGHN0lQ0OhoUgOQuDVvjyMv/j7LOC2ONN dOJZBczgaSItdLZBFVKho7r8v6uXtlcsZeKihNY= X-Received: by 2002:a05:6512:218d:: with SMTP id b13mr19125081lft.346.1623242009380; Wed, 09 Jun 2021 05:33:29 -0700 (PDT) MIME-Version: 1.0 References: <20210609105019.3626677-1-punitagrawal@gmail.com> <20210609105019.3626677-5-punitagrawal@gmail.com> In-Reply-To: <20210609105019.3626677-5-punitagrawal@gmail.com> From: Guo Ren Date: Wed, 9 Jun 2021 20:33:18 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 4/5] csky: ftrace: Drop duplicate implementation of arch_check_ftrace_location() To: Punit Agrawal Cc: Masami Hiramatsu , "Naveen N . Rao" , Anil S Keshavamurthy , David Miller , Linux Kernel Mailing List , linux-csky@vger.kernel.org, Guo Ren Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org csky using -mcount not -fpatchable-function-entry, so /* Given address is not on the instruction boundary */ if ((unsigned long)p->addr != ftrace_addr) return -EILSEQ; all right? On Wed, Jun 9, 2021 at 6:51 PM Punit Agrawal wrote: > > The csky specific arch_check_ftrace_location() shadows a weak > implementation of the function in core code that offers the same > functionality but with additional error checking. > > Drop the architecture specific function as a step towards further > cleanup in core code. > > Signed-off-by: Punit Agrawal > Cc: Guo Ren > --- > arch/csky/kernel/probes/ftrace.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/arch/csky/kernel/probes/ftrace.c b/arch/csky/kernel/probes/ftrace.c > index ef2bb9bd9605..b388228abbf2 100644 > --- a/arch/csky/kernel/probes/ftrace.c > +++ b/arch/csky/kernel/probes/ftrace.c > @@ -2,13 +2,6 @@ > > #include > > -int arch_check_ftrace_location(struct kprobe *p) > -{ > - if (ftrace_location((unsigned long)p->addr)) > - p->flags |= KPROBE_FLAG_FTRACE; > - return 0; > -} > - > /* Ftrace callback handler for kprobes -- called under preepmt disabled */ > void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip, > struct ftrace_ops *ops, struct ftrace_regs *fregs) > -- > 2.30.2 > -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/