Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp716805rwb; Thu, 22 Sep 2022 05:41:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7WWf3EKNdPLxTbMMFboEfrke3aOIHF71FJiB7f1tjMmpZ81bLJC4ofqKRKGaGurpF5ZV6s X-Received: by 2002:a05:6402:2554:b0:450:28d2:2152 with SMTP id l20-20020a056402255400b0045028d22152mr3143773edb.303.1663850485357; Thu, 22 Sep 2022 05:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663850485; cv=none; d=google.com; s=arc-20160816; b=T5RwnPWvohWC58N7B6GnUnQtTubl9L3jzb8eeFHYPD0tiv7BL7zJn1YIV1cP3ruovF wn6OURw3YNEzHdn/XwJFZXAwnXl09i7EjjgEmOCpr+6L+MRQOcpitZ+WOC5IaMhbkV5s Mm5sQHZOqW79+0RCERgmO1vJ+R/rrXSG5C4vkrsWCNmSF+DndsiW81NHwvk/Ivb53j7k il/Qn1PfjJ3qAf+i4BBi6NiRZxTM2T41lfH0AB3w4seRhP0oXHVqg6AJ8l7QUqVhAQb+ wAjLHGy+sMfx9waGbdLUhm9gbkpvfsq7gSrzvorIx/6Mkq7NuP7GNdWvHprUZKn/dGuL 54Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=lZ3pvCd7bR6vPhZmsOzlceOD5E16Mt/exu556tEG71g=; b=pLvSRbuFjl8uez/ZxG2r+ZM6pr3j8H29VueDKxp73HyP13b6P4OerNgs6aGuDsPoX7 XKp+uq8IJB+uvlH0cIMrl6f0Hk29um6Qeu+3qvx6icbv4MEvbM2SpBe33MwCk+wnJbU4 XyalVyv59VHd/dsDM22IKDn48VTc8DofMryD0x7SfqH1D8SjEKSZCxYW/jgsIx18IjBb UqfPTqKNMGOvk20R+zZIwq1RMS/aRlyeNb0lLJEvs7a/HQp2rC6iWrMREHIaNClguT7D msim4pJH69x3vMvd/F2Ekq4SKAV6AppgKWR2wrLVlovSdS98cNojIiSjcwRYVnISBOmr N1KQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb10-20020a0564020d0a00b0044de197f1ddsi5570161edb.550.2022.09.22.05.40.59; Thu, 22 Sep 2022 05:41:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231210AbiIVMYo (ORCPT + 99 others); Thu, 22 Sep 2022 08:24:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231641AbiIVMYi (ORCPT ); Thu, 22 Sep 2022 08:24:38 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E68F9BC02 for ; Thu, 22 Sep 2022 05:24:31 -0700 (PDT) Received: from [10.130.0.135] (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dx_2v+UyxjhBwgAA--.53094S3; Thu, 22 Sep 2022 20:24:30 +0800 (CST) Subject: Re: [PATCH 2/4] LoongArch: Add kretprobe support To: Jinyang He , Huacai Chen , Masami Hiramatsu References: <1663645034-967-1-git-send-email-yangtiezhu@loongson.cn> <1663645034-967-3-git-send-email-yangtiezhu@loongson.cn> <27e77068-012b-ef7d-986f-818c651ba853@loongson.cn> Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org From: Tiezhu Yang Message-ID: <75a96701-0760-3b27-8c83-ed0ee19a0273@loongson.cn> Date: Thu, 22 Sep 2022 20:24:30 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <27e77068-012b-ef7d-986f-818c651ba853@loongson.cn> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf8Dx_2v+UyxjhBwgAA--.53094S3 X-Coremail-Antispam: 1UD129KBjvdXoWrZrW7tw48KFyUWw47ur4Durg_yoWxZFc_Gw 17WryxC3y8WF4fX3W2g3y5ZFZrGayfWan8Jr9rXw4xCwn5t3y8JFs8WrnxZFWfGrWfGrsI kFW8ZasIvF1j9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbIAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_ Gr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s 0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r1Y6r17McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr 1lF7xvr2IY64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7Mxk0xIA0c2IEe2xFo4CEbIxv r21lc2xSY4AK67AK6ryUMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI 8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AK xVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI 8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280 aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyT uYvjfU1L0eDUUUU X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/21/2022 04:22 PM, Jinyang He wrote: > On 09/20/2022 11:37 AM, Tiezhu Yang wrote: > >> Use the generic kretprobe trampoline handler to add kretprobe >> support for LoongArch. >> >> Signed-off-by: Tiezhu Yang >> --- >> arch/loongarch/Kconfig | 1 + >> arch/loongarch/kernel/kprobes.c | 49 ... >> int __init arch_init_kprobes(void) >> { >> - return 0; >> + return register_kprobe(&trampoline_p); > Hi, Tiezhu, > > For kretprobe, we can do things like arm64/riscv... did. It avoid > the break exception when function return. > OK, looks reasonable, let me try, thank you. I will wait for some more review comments and then send v2. Thanks, Tiezhu