Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2283809rwb; Thu, 8 Dec 2022 23:29:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf7J/D/X+IIa45vBLrY4lvX8uIZPAnyQPNcDoVs8OG8OC9zJEWB7MQGzom5stiWyzloweoCg X-Received: by 2002:a17:906:c2d3:b0:7c0:ff72:e828 with SMTP id ch19-20020a170906c2d300b007c0ff72e828mr3823751ejb.54.1670570942855; Thu, 08 Dec 2022 23:29:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670570942; cv=none; d=google.com; s=arc-20160816; b=g7IKDSj8Xlaa4SFWZ0qDXrAfJlamUAE6NkhKAetS26I/t9KJoYQWZr7casSmPMfgOt FCTha7MpErzGUyobZsVALTpKFFiyB6ARIdLA7ky0HOFXqrfjKViFHI2SFh3Z8V69d4eK 5QVr4ko1NapxVhaZwNgffCrH0/KldIZ7saxam1sgGFIduGbCQiOkhb86wEGwfqhLtSbh Yf4i+1DWCcbO36saYc53n2DSdmkg5WFsURX2Yz/QIY24kWKrXEm/rA+wl3DL7xSrXP2b QVh1nyYiAlBrwOj+IWKIlDI1zmak5Y4K77ZB29wZ3xiboBnVtFRVJUVIFy9nAAOVRZoi bpSA== 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=3ZAK8SxM/1lTeI9BK8xZUzCxPP+xocEb3EmzciPyILQ=; b=wXB0J01R1zIf3SYxgCu4uFTVH+n/n+sMOCTirPp+jWey50Vc1I3+VZ0jvBXEVshsZp bHVhfzJlBAojf6TEyXziWxtM0HPJm8g5K8lEpz5Y8K/9vciIYidA8hwBUjyoolqvZEdT xQIJR9eMZfR+/SH29xKU6HEbppgwWwm570hjFyVPVoaVYFKINgt6hHGoOKJEKc1y7Sui cbgrk1MJmOWahtLPsri/4/Oq95Lgt9SX5AndkadTRLPUbYxEVKLw/AIhDRbuhMw7UuKv PE8lq+6BAcNn0oXsw+hdOJLVMaMx3Q5QrXTan34mR2ahLhv26Z1KpyvVu0SAsEjdrLEt K7uw== 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 ss2-20020a170907c00200b0078b96722000si474915ejc.608.2022.12.08.23.28.45; Thu, 08 Dec 2022 23:29:02 -0800 (PST) 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 S230001AbiLIHEk (ORCPT + 74 others); Fri, 9 Dec 2022 02:04:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229966AbiLIHEN (ORCPT ); Fri, 9 Dec 2022 02:04:13 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AFACA2C13A for ; Thu, 8 Dec 2022 23:02:21 -0800 (PST) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8Cx7+t73ZJjxloEAA--.10242S3; Fri, 09 Dec 2022 15:02:19 +0800 (CST) Received: from [10.130.0.135] (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dxr+B43ZJjXAUpAA--.35622S3; Fri, 09 Dec 2022 15:02:16 +0800 (CST) Subject: Re: [PATCH v9 2/4] LoongArch: Add kprobe support To: Huacai Chen References: <1670506868-15771-1-git-send-email-yangtiezhu@loongson.cn> <1670506868-15771-3-git-send-email-yangtiezhu@loongson.cn> Cc: WANG Xuerui , Masami Hiramatsu , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org From: Tiezhu Yang Message-ID: <37bc5ab5-ced8-cae9-9025-180154af0b11@loongson.cn> Date: Fri, 9 Dec 2022 15:02:15 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf8Dxr+B43ZJjXAUpAA--.35622S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvdXoW7GFWxAF15JrWrCrykGr1Utrb_yoWxKFcEgr 18Wr4kC34q9ry3Ka1UKa1rXFWUWryUWrWUKw1kCry3Aa4fK3s7XF4rK3sYyF4rJry0krsx AFW2grsayFyjqjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrn0 xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUY k7kC6x804xWl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3w AFIxvE14AKwVWUXVWUAwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK 6xIIjxv20xvE14v26r1j6r1xM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r1j6r4UM28EF7 xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x0267AKxVWxJr0_GcWle2I2 62IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27wAqx4xG64xvF2IEw4 CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r4j6F4UMcvj eVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCYjI0SjxkI62AI1cAE67vIY487MxAIw2 8IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMxCIbckI1I0E14v26r1q6r43MI8I 3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxV WUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8I cVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aV AFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuY vjxU2DUUUUUUU X-Spam-Status: No, score=-2.2 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 12/09/2022 10:22 AM, Huacai Chen wrote: > cas > > On Thu, Dec 8, 2022 at 9:41 PM Tiezhu Yang wrote: >> >> Kprobes allows you to trap at almost any kernel address and >> execute a callback function, this commit adds kprobe support >> for LoongArch. ... >> + case KPROBE_HIT_ACTIVE: >> + case KPROBE_HIT_SSDONE: >> + /* >> + * In case the user-specified fault handler returned >> + * zero, try to fix up. >> + */ >> + if (fixup_exception(regs)) >> + return true; > Does here need to enable preemption too? > No need, because in this two case, after call fixup_exception() or do_page_fault(), the original process will continue, preemption will be enabled in the original process. Thanks, Tiezhu