Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp284005rwl; Thu, 6 Apr 2023 19:15:51 -0700 (PDT) X-Google-Smtp-Source: AKy350ZGpJJkpSJlHUErDSMjGqGMXn7HyrbqxEpmEXvCaMvciqBl6ul941srm2Oh5Esy5n7kcieY X-Received: by 2002:a17:906:5391:b0:931:de76:c2e8 with SMTP id g17-20020a170906539100b00931de76c2e8mr759083ejo.9.1680833750927; Thu, 06 Apr 2023 19:15:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680833750; cv=none; d=google.com; s=arc-20160816; b=TO8pKZn2/nDa+Y7VLvR3ShVRRud/CbbXKHnP/rJDfncIS5Ef1eBRVLem0q0SDykv7z b0WxC1SfCpBehNn2/R8NnCqiVuGaf8CZ33ehX3qx929KOO/MXek7dRqHuHksRI+vFe7W 0f+5kiJ1CtzUJxuwQ089zIyoJZ07CiA9SxUNNupsFQiCoRuz8JTAr3Fd/l/izN83/xL8 7N7yo0aZaXUMfzIhQLZTxdJz8QDvgk/ofLt40rQDvprjtLTOT9+0pfFm8ONMYcLglakB XpV17aWz/pvBpcpUl3NjdzG784JsTaFj6JZtWYzPMTzy3qRP0C/M/te/CXSOGd+dgBGV Y1sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=XtmrH0hqmzMSmczvwNVFu4G2+/yliG8KvfddQ+p37X0=; b=RcElYOnkZCvL8Nwo8oqZrvJl+kULR2H3qtdGK78TF7Oh2+2i1bXIIPqfyev9Y3mbjM l3RJsQiAagg88FI4KSA0qVgsWT82TGWq09+es+s6mFi1tlnzVhlUeDNQm47SPZ/c99pa SDM72aSjQ701+t4NDCBgfFndbd/tY9LAOfIGxvUHZVjNFod+0C37Drlg4qFaoFwZVAPp seZ9snPGGjY28iQxMDanpAt9rSdqYssA5fvyvY+iYP4Trdn1VuLOtIqvQfxcAAQXsTVI dZxAkE7LRMY8MGshz8pRpkcADChBuIv0IULK5A/R1P6+lbMwCI/urm7jEIuanKOCOS1m Y6Yw== 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 hc37-20020a17090716a500b00947c73213f7si2587147ejc.545.2023.04.06.19.15.19; Thu, 06 Apr 2023 19:15:50 -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 S240083AbjDGCPI (ORCPT + 99 others); Thu, 6 Apr 2023 22:15:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230311AbjDGCPF (ORCPT ); Thu, 6 Apr 2023 22:15:05 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 31BB19C for ; Thu, 6 Apr 2023 19:15:03 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8Axu5enfC9kj6kXAA--.36870S3; Fri, 07 Apr 2023 10:15:03 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxSL2lfC9k2cEXAA--.21395S2; Fri, 07 Apr 2023 10:15:02 +0800 (CST) From: Tiezhu Yang To: Huacai Chen , WANG Xuerui Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Subject: [RFC PATCH 0/3] Add uprobes support for LoongArch Date: Fri, 7 Apr 2023 10:14:58 +0800 Message-Id: <1680833701-1727-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf8DxSL2lfC9k2cEXAA--.21395S2 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvdXoW7Xw13CFWrWr13ZrWxZw18Xwb_yoWfWFb_ua 43Ja48CrW8JayUXa4qvw4fJrWUGa18KFn0yasFqrW7GF13Jr13Jr4kW3W5Z3sFgrWkWrs8 ArW0grn5Zr1UKjkaLaAFLSUrUUUUbb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrn0 xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUY 17kC6x804xWl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3w AFIxvE14AKwVWUXVWUAwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK 6xIIjxv20xvE14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7 xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJwAS 0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMc02F40EFcxC0V AKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUXVWUAwAv7VC2z280aVAFwI0_Jr0_Gr1l Ox8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxC20s 026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_ JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14 v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xva j40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJV W8JbIYCTnIWIevJa73UjIFyTuYvjxU7_MaUUUUU X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 RFC patches sent for review, more testing is working in progress. Tiezhu Yang (3): LoongArch: Move three functions from kprobes.c to inst.h LoongArch: Add larch_insn_gen_break() to generate break insn LoongArch: Add uprobes support arch/loongarch/Kconfig | 3 + arch/loongarch/include/asm/inst.h | 63 ++++++++++++++++ arch/loongarch/include/asm/kprobes.h | 2 +- arch/loongarch/include/asm/uprobes.h | 36 +++++++++ arch/loongarch/kernel/Makefile | 1 + arch/loongarch/kernel/inst.c | 9 +++ arch/loongarch/kernel/kprobes.c | 63 ++-------------- arch/loongarch/kernel/traps.c | 7 +- arch/loongarch/kernel/uprobes.c | 138 +++++++++++++++++++++++++++++++++++ 9 files changed, 259 insertions(+), 63 deletions(-) create mode 100644 arch/loongarch/include/asm/uprobes.h create mode 100644 arch/loongarch/kernel/uprobes.c -- 2.1.0