From patchwork Tue Apr 11 07:17:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 81790 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2387221vqo; Tue, 11 Apr 2023 00:29:17 -0700 (PDT) X-Google-Smtp-Source: AKy350bFSS25KYTI5XVyqeg/Tx9fj7naYRHgEkleCSEoXYcRRDUpBbgAtHKrnM1RC8590Z7lxjkw X-Received: by 2002:a17:903:2344:b0:1a1:b65c:dea7 with SMTP id c4-20020a170903234400b001a1b65cdea7mr18280145plh.47.1681198156955; Tue, 11 Apr 2023 00:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681198156; cv=none; d=google.com; s=arc-20160816; b=tfDYHpCQL/78Xg2so9KlxvLDdy3z9wXlDmwPHrcwMz5VZPKG20vshQP2ReeOwslOok QamUvNlbcoWsf78egIy0VSt93ks75KxkKSBvFfyzWC/f8iDHfagVdQ+hG4JUCl5VlS6x 0Viy3UG22PrtOsZtYqJ1PdOWqz5gba0jkNI1RFU8K2MsHBBGSTSf3y/TzBWJXWhMeUxz nZ/O4CvaGSy+GfV6Ti0z4UUVV/mkEt6xfdAUpuiNX26ETi9WgdbTWCwB/L0YN9bD4u/y NzGSlNXwnGM3Uq79dKh2JXkXhmS+qIRwJEY5Dw3AsKQpilAX39f9I71YpPB1RW1z1Bdz yaTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=UJBXHc5xOAVtQ+RwVRjt8k9b5UufKK9JcQT6bZsF3aE=; b=JOwZnAmKt3pfuYt4/m06xFgKDXxGsLZmEuWihJpp/6NL0Wp9BJdzrFELEd0He8WMo2 8XecIqcjnmdqCz4J2W+dycrF6NOJhmbvzK8ryXwM/TcFqpCnR30Bn0W92xN71lwGay5h kUI5/cNZaBcDho0Y0nh8li6ExQPNYI912vxC2iVpB6c8/JVskE/h+C8s6HPfuzjVXyfL ybEjpSylno0jmdkq5RZGt93wcJSwVK6k1FJzvRMIcrS1h6w/gnAmXsNUANaO1p54JHvy auhqVuX2YWZLdg/BzK4yL/Evvyn2MFdUEH9lE1NieHVUWtl3kFxD6QXeBu1x/sZ2Vcyz H+Ug== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 79-20020a630252000000b005145fbb2dcasi12180758pgc.780.2023.04.11.00.29.03; Tue, 11 Apr 2023 00:29:16 -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 S229906AbjDKHSE (ORCPT + 99 others); Tue, 11 Apr 2023 03:18:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229840AbjDKHSA (ORCPT ); Tue, 11 Apr 2023 03:18:00 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 831FFF9; Tue, 11 Apr 2023 00:17:57 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8DxUOWkCTVktgYaAA--.40241S3; Tue, 11 Apr 2023 15:17:56 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxPL6iCTVkKRkeAA--.33433S3; Tue, 11 Apr 2023 15:17:56 +0800 (CST) From: Tiezhu Yang To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Subject: [PATCH 1/2] MIPS: Use def_bool y for ARCH_SUPPORTS_UPROBES Date: Tue, 11 Apr 2023 15:17:47 +0800 Message-Id: <1681197468-20658-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1681197468-20658-1-git-send-email-yangtiezhu@loongson.cn> References: <1681197468-20658-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf8CxPL6iCTVkKRkeAA--.33433S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvdXoW7Xry3tFyfWw4kKry5GF4DJwb_yoW3ZFb_Jw nFyFs5Xw1fG34xC3yYgr4fWr15Z3yUWFnxJa9Fvr12v3ySq345Xa98GFn8Zr15G3yDKrZ7 ZrWFyr1UuwsrWjkaLaAFLSUrUUUUbb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrn0 xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUU5 R7kC6x804xWl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3w AFIxvE14AKwVWUGVWUXwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK 6xIIjxv20xvE14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7 xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAI cxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c 02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv67AKxVWUJVW8JwAm72CE 4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64vIr41l4I8I3I0E4I kC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWU WwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr 0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWU JVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYx BIdaVFxhVjvjDU0xZFpf9x07j1YL9UUUUU= 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762864038536368537?= X-GMAIL-MSGID: =?utf-8?q?1762864038536368537?= Like all the other archs, use def_bool y for ARCH_SUPPORTS_UPROBES, then no need to select ARCH_SUPPORTS_UPROBES. Signed-off-by: Tiezhu Yang --- arch/mips/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index a975f14..db9e8fc 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -16,7 +16,6 @@ config MIPS select ARCH_HAS_UBSAN_SANITIZE_ALL select ARCH_HAS_GCOV_PROFILE_ALL select ARCH_KEEP_MEMBLOCK - select ARCH_SUPPORTS_UPROBES select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_CMPXCHG_LOCKREF if 64BIT select ARCH_USE_MEMTEST @@ -1060,7 +1059,7 @@ config FW_CFE bool config ARCH_SUPPORTS_UPROBES - bool + def_bool y config DMA_NONCOHERENT bool From patchwork Tue Apr 11 07:17:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 81789 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2384586vqo; Tue, 11 Apr 2023 00:21:40 -0700 (PDT) X-Google-Smtp-Source: AKy350Y6KAGg8qS4ibrjqhxu6iGQpBojbQeV4/3HGrJowGQMGwBqSPrAe0otCs1Hew1TZHp8loNh X-Received: by 2002:a05:6a20:5481:b0:bf:58d1:cea0 with SMTP id i1-20020a056a20548100b000bf58d1cea0mr16022711pzk.31.1681197700109; Tue, 11 Apr 2023 00:21:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681197700; cv=none; d=google.com; s=arc-20160816; b=elVbrk6kCRZuwl2WLYFTDXxyPBsJXQS6tCmzV8wRHW+121/JpM8II8TD2O0dRS/Pg1 acP5retd+f05G0TZgLS+h0u5pmMg7cSkyv34ta6Eq/vxnm7MtTHMxVWTMOqeDAdVGxHM PqFHSlnKE8TgpIlxN3M1Ee2IKUImSH6fUsPR6Ou0AOEMHuspuAHfHGg1w9p4UNKfEC0p HQfWRWJJADwjYkqqKItbDMklH60/jJW254GN6ClyzTczTYZ4wKe9uvG8F0/8N12xE/xt 108K9DE1Q6t82BgeA0fNDgDsrtRTktvarIS+4HV7XfPyceUMVJ6TPnnPOf2MJeyrUgRx ICsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=kl7Bx43QbHqxE2q9SrIVyWzBRR+hBJbRFjjC0dkhngk=; b=Jts2x2qxaMrJDdrbjutmemEYvxQcDZLpq7uA3TJDDNsGbyt9D23Mh9EeGq+ergSrAJ t5ojBqB/OQakPFUCYaCX+lAsR07IUtpj6KPDQB+TOZkcRJ5HnhIAafiMqcSYsmcSjwFU z1zGU0aBWtYMCSBFQ3YPrJPayIUhOg5R43KC6xzq9GYkd++cclazjGQo7xlp7rEhwrFB vomBdCT+8hPKzzxcRrbg8SgVnX9zce9PFXGXiuthNimL56XgJ/6SHt4O1b80eEiJDe7j s3pr8KpFc1aMcel1UIcS1s5fsoxzqYUA1miovtmV544i8wvwaC63T4wo/qapRTfEXNVy 8suw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s6-20020a656446000000b00514477c4403si3050171pgv.310.2023.04.11.00.21.27; Tue, 11 Apr 2023 00:21:40 -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 S229940AbjDKHSG (ORCPT + 99 others); Tue, 11 Apr 2023 03:18:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbjDKHSA (ORCPT ); Tue, 11 Apr 2023 03:18:00 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AECCC11D; Tue, 11 Apr 2023 00:17:57 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8BxedmkCTVkuQYaAA--.40312S3; Tue, 11 Apr 2023 15:17:56 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxPL6iCTVkKRkeAA--.33433S4; Tue, 11 Apr 2023 15:17:56 +0800 (CST) From: Tiezhu Yang To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Subject: [PATCH 2/2] MIPS: Remove set_swbp() in uprobes.c Date: Tue, 11 Apr 2023 15:17:48 +0800 Message-Id: <1681197468-20658-3-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1681197468-20658-1-git-send-email-yangtiezhu@loongson.cn> References: <1681197468-20658-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf8CxPL6iCTVkKRkeAA--.33433S4 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7Kw4ftrWDAw48CrW8urykKrg_yoW8JF43pa n3Jw13KF4Yg348GryDZrykZ34Skrn3Z3y2q3W7tryFkwn8ZF45WFn3G3WxXFW09rWkK3WF yw4ruryUZFZ7Aw7anT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bzAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JF0_JFyl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oVCq3wAS0I0E 0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzV Aqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUAVWUtwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S 6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxC20s026x CaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_ JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r 1I6r4UMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_ Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8Jb IYCTnIWIevJa73UjIFyTuYvjxU2Z2-UUUUU 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762863559560146345?= X-GMAIL-MSGID: =?utf-8?q?1762863559560146345?= set_swbp() in arch/mips/kernel/uprobes.c is same with the weak version in kernel/events/uprobes.c, remove it. Signed-off-by: Tiezhu Yang --- arch/mips/kernel/uprobes.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/arch/mips/kernel/uprobes.c b/arch/mips/kernel/uprobes.c index 6c063aa..6b630ed 100644 --- a/arch/mips/kernel/uprobes.c +++ b/arch/mips/kernel/uprobes.c @@ -207,24 +207,6 @@ unsigned long arch_uretprobe_hijack_return_addr( return ra; } -/** - * set_swbp - store breakpoint at a given address. - * @auprobe: arch specific probepoint information. - * @mm: the probed process address space. - * @vaddr: the virtual address to insert the opcode. - * - * For mm @mm, store the breakpoint instruction at @vaddr. - * Return 0 (success) or a negative errno. - * - * This version overrides the weak version in kernel/events/uprobes.c. - * It is required to handle MIPS16 and microMIPS. - */ -int __weak set_swbp(struct arch_uprobe *auprobe, struct mm_struct *mm, - unsigned long vaddr) -{ - return uprobe_write_opcode(auprobe, mm, vaddr, UPROBE_SWBP_INSN); -} - void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, void *src, unsigned long len) {