From patchwork Tue Aug 30 06:53:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 12958828 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 85EAEECAAA1 for ; Tue, 30 Aug 2022 06:54:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oIo64/OBUS2Gg0Q/0c8m2f1pt91cYCKTJv0GJCvthk0=; b=Z02KfLKN0pDM2e hx00o+pbcMRn0mRwCgt6Y9KXJOdnyET7M198X+EYzzT0G1SmhQwvls4GWHjHR6zxcUtdJiaQfjkSn xm/yDKDmzW71XGzr1d4F8nyvwomDaoXhrNd12FprOcdjGIPZ/+AD6ZiQGXbwxOeOGDtaR+nGsV2M4 8TtA2qsHoBDj3vjvXohN0mgUQDtUPzh5J9uBthLzUJCq0SgY1IUuLMoKlHK67SWFb0BFAHSXDA/uM Ouok5U/2k0DptKJvQoS5EOFGwYJNhhO/K5GqUMAV/w93KlbAsMfMmO/jvzYxEGBRoCnWSkifG0GVy PjfPDLS1j+4y8YwMJeHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSv8r-00EZc5-Ig; Tue, 30 Aug 2022 06:54:33 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSv82-00EZCE-Ps; Tue, 30 Aug 2022 06:53:44 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 72D58CE12B2; Tue, 30 Aug 2022 06:53:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C028C433B5; Tue, 30 Aug 2022 06:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661842416; bh=ezCJz3zzII/UaKvcXNSbmcajv11zXu7NIaCF1ULUtp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r3amRcUQDjcf2J5Fgpm3U2izv3yA9NBy7nxMxatvsZT6tZWH3Rv9dQGtrjH3iNkPE g6KyXSsfC/QLHSFUlf3IUv5+Vfh0AVJGPh5B8XP/13LvC1JxSH2AEqY4TAjFgDMhOt AS0BwAQwYQJwQ8z8KNiqh3xod+STWMH9o+hwivFoZq7RQCb10x+P565pwYgOgJl59G gjJI+WEJLyooY/K9536qNkXfUBIbivFBJ+BTi3q5eadkie5Q/E0dtzMU5gpdgyy2Z/ CftmJ3I3bk4yFCtql/IygZNvGqnuuCDfY9wzgM1PhTXU0Cx8xMIXsaEyLjA9FHpb8w WEGB8pxdmmp3Q== From: guoren@kernel.org To: oleg@redhat.com, vgupta@kernel.org, linux@armlinux.org.uk, monstr@monstr.eu, dinguyen@kernel.org, palmer@dabbelt.com, davem@davemloft.net, arnd@arndb.de, shorne@gmail.com, guoren@kernel.org Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-snps-arc@lists.infradead.org, sparclinux@vger.kernel.org, openrisc@lists.librecores.org, Guo Ren Subject: [PATCH 1/3] riscv: ptrace: Remove duplicate operation Date: Tue, 30 Aug 2022 02:53:14 -0400 Message-Id: <20220830065316.3924938-2-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220830065316.3924938-1-guoren@kernel.org> References: <20220830065316.3924938-1-guoren@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220829_235343_044111_B3CCEB55 X-CRM114-Status: UNSURE ( 9.29 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Guo Ren The TIF_SYSCALL_TRACE is controlled by a common code, see kernel/ptrace.c and include/linux/thread.h. clear_task_syscall_work(child, SYSCALL_TRACE); Signed-off-by: Guo Ren Signed-off-by: Guo Ren --- arch/riscv/kernel/ptrace.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c index 2ae8280ae475..44f4b1ca315d 100644 --- a/arch/riscv/kernel/ptrace.c +++ b/arch/riscv/kernel/ptrace.c @@ -212,7 +212,6 @@ unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n) void ptrace_disable(struct task_struct *child) { - clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); } long arch_ptrace(struct task_struct *child, long request, From patchwork Tue Aug 30 06:53:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 12958829 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4AFB8ECAAA1 for ; Tue, 30 Aug 2022 06:55:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=P5icRoS/2eDrD+a2hIRLwWtzmK75byOFY5FVq+YDP+w=; b=Z+1LrLFz31uj4G sw4oU6OPB3VD1Zk1GRMxOEeQ6wepTMo5b7Sg9msiQ8bu9niei1/ZLaLQ580OJefensyn1B2SDZtdH 76FsLTQqugZm2YijSYAdZVkxZfqzgUM07FROXAVZFtCqIh/Y4+BIPTQGOBZNmAIzZTFX2GmAZXkch ieRe8r/z3ujq3gvaHJTqXoNot1GTEu7o/rerOuW9s9lK20imMuMTdorgph+jkGwowvXfAekJmEf/f QXJlvfJPL3YrzQiwOJy1s4RvcSlDYKpHB9Z0z9Y/Zq28qYqj23TPQu/nhrCvjfDXVZgai6vI23sOl qJv4XaTnBZ0MabHlv/Ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSv9S-00EZw3-Ei; Tue, 30 Aug 2022 06:55:10 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSv85-00EZDt-R6; Tue, 30 Aug 2022 06:53:47 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 689E9B815D1; Tue, 30 Aug 2022 06:53:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95177C43141; Tue, 30 Aug 2022 06:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661842423; bh=6jVazXBqfWdKpxDWhL1vnDZxpkMfN57CDtGrBVFvRs4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F5PrLREEw9ieJXHk2T6r8fNSMm4hqpEggsRJrXPWuFPl7+oJKfH/xBCo0A6FJO0y2 t9K5uxEE398h542YOD7o2yTfT4WHu83D6O1abG132Tc4bQAupCKANNBSa193HMsikz 4M3nENDu9L/3n8h3C0uJfXqbSAkKm+orfEcMHOgDUj056bJn4i+7AKEbgu317hT+U3 3aqhj2tDhdw86//1qF+BA6svknF5okzAHkY4nNxbm4KxsHyWfDR9AJ+3fwLF8hBKQj DIDDu38CXvQN9Ac3hF/lVAAzTDYfnjIUHHuFPh1gUncCU4gVLx3CzOPt9r0MIDKxVd ZacRoVho/xM/A== From: guoren@kernel.org To: oleg@redhat.com, vgupta@kernel.org, linux@armlinux.org.uk, monstr@monstr.eu, dinguyen@kernel.org, palmer@dabbelt.com, davem@davemloft.net, arnd@arndb.de, shorne@gmail.com, guoren@kernel.org Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-snps-arc@lists.infradead.org, sparclinux@vger.kernel.org, openrisc@lists.librecores.org, Guo Ren Subject: [PATCH 2/3] openrisc: ptrace: Remove duplicate operation Date: Tue, 30 Aug 2022 02:53:15 -0400 Message-Id: <20220830065316.3924938-3-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220830065316.3924938-1-guoren@kernel.org> References: <20220830065316.3924938-1-guoren@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220829_235346_076772_AF524F2A X-CRM114-Status: UNSURE ( 9.14 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Guo Ren The TIF_SYSCALL_TRACE is controlled by a common code, see kernel/ptrace.c and include/linux/thread.h. clear_task_syscall_work(child, SYSCALL_TRACE); Signed-off-by: Guo Ren Signed-off-by: Guo Ren Acked-by: Stafford Horne --- arch/openrisc/kernel/ptrace.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c index b971740fc2aa..cc53fa676706 100644 --- a/arch/openrisc/kernel/ptrace.c +++ b/arch/openrisc/kernel/ptrace.c @@ -132,7 +132,6 @@ void ptrace_disable(struct task_struct *child) pr_debug("ptrace_disable(): TODO\n"); user_disable_single_step(child); - clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); } long arch_ptrace(struct task_struct *child, long request, unsigned long addr, From patchwork Tue Aug 30 06:53:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 12958830 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 72C4FECAAD8 for ; Tue, 30 Aug 2022 06:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+LCotHZoC0rC7blTFkKPdVkn9UJWnqjvJmn89MpIMWQ=; b=mnX6oPj9tLpi/T 5nFV9nmG0sCEvCDzd82id/332Lx773U+NlD4VIbPEfxQNPrxtre/ggbLLx939QyZrsBFAHcA9Rxka krPyDKayZYyokTuGdNgtWf5Rr6ZC3RjKVsjnUfQu8j1S3Uvdsmf95QmEmfFk7MYpuROx3bIv+LtHt E2M9W+qOzW3aZeec9pDu/fwxG/bQOB4N30gy0Jip3HkK3y8ejXT1DSHgyS5mPX0yYDeyNpSfyOPvh ijd0f1JcrZdg5k9b96aJdIKhCjAlxZgMKrEnFcjMP8DD06qH61+MPA6gIslwzIZ6yAbjf9vN9VuZl raNmkF8hUwYvfJLbXK+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSvAH-00EaM2-MH; Tue, 30 Aug 2022 06:56:01 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSv8A-00EZGA-Nj; Tue, 30 Aug 2022 06:53:59 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 06ECF6146E; Tue, 30 Aug 2022 06:53:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5161C433D6; Tue, 30 Aug 2022 06:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661842429; bh=wxIJahY4bNgAXVbpWaC9W2nMSDfpOu3ZSd8EuV6xsso=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kpjay5YsyYfycs7ZTlN911Ki+d8mT0EfwjtiLpalFcYQh9VpfuE8febThdR3WlnSH UOKGnoa4Hq0l+0R0LxhjKYOaEwb/eRa6LsEMQc16RMRgrKMy3HBQNx25b6nmcLNktt pBiDHwH1u9nGpTGlAnoOiEEXCOJIDJuzm8Dx5CJh1hQq/XtcnYKJbcLssjhuFvP+Fa 7K9DNxIZ5S51MuwUHRlxLRm8Fie5EEEQwcURimXekqg5sJNst6Qsfvh7tGwUNBBldG 3tkthmrYK1VdUoucu3Vf5fK+K5aMvwCzvWuO8xUsFXooEjAYyFicx6dANpQa1aKAl3 +q9Qfe43KkXTQ== From: guoren@kernel.org To: oleg@redhat.com, vgupta@kernel.org, linux@armlinux.org.uk, monstr@monstr.eu, dinguyen@kernel.org, palmer@dabbelt.com, davem@davemloft.net, arnd@arndb.de, shorne@gmail.com, guoren@kernel.org Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-snps-arc@lists.infradead.org, sparclinux@vger.kernel.org, openrisc@lists.librecores.org, Guo Ren Subject: [PATCH 3/3] arch: ptrace: Cleanup ptrace_disable Date: Tue, 30 Aug 2022 02:53:16 -0400 Message-Id: <20220830065316.3924938-4-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220830065316.3924938-1-guoren@kernel.org> References: <20220830065316.3924938-1-guoren@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220829_235357_445991_AF662309 X-CRM114-Status: GOOD ( 14.83 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Guo Ren Add a weak empty function in common and remove architectures' duplicated ones. Signed-off-by: Guo Ren Signed-off-by: Guo Ren --- arch/arc/kernel/ptrace.c | 4 ---- arch/arm/kernel/ptrace.c | 8 -------- arch/microblaze/kernel/ptrace.c | 5 ----- arch/nios2/kernel/ptrace.c | 5 ----- arch/riscv/kernel/ptrace.c | 4 ---- arch/sparc/kernel/ptrace_32.c | 10 ---------- arch/sparc/kernel/ptrace_64.c | 10 ---------- kernel/ptrace.c | 8 ++++++++ 8 files changed, 8 insertions(+), 46 deletions(-) diff --git a/arch/arc/kernel/ptrace.c b/arch/arc/kernel/ptrace.c index da7542cea0d8..c227e145fede 100644 --- a/arch/arc/kernel/ptrace.c +++ b/arch/arc/kernel/ptrace.c @@ -317,10 +317,6 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task) return &user_arc_view; } -void ptrace_disable(struct task_struct *child) -{ -} - long arch_ptrace(struct task_struct *child, long request, unsigned long addr, unsigned long data) { diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index bfe88c6e60d5..b85f5bdc56ef 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c @@ -186,14 +186,6 @@ put_user_reg(struct task_struct *task, int offset, long data) return ret; } -/* - * Called by kernel/ptrace.c when detaching.. - */ -void ptrace_disable(struct task_struct *child) -{ - /* Nothing to do. */ -} - /* * Handle hitting a breakpoint. */ diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c index 5234d0c1dcaa..72e3eece72aa 100644 --- a/arch/microblaze/kernel/ptrace.c +++ b/arch/microblaze/kernel/ptrace.c @@ -162,8 +162,3 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) if (step || test_thread_flag(TIF_SYSCALL_TRACE)) ptrace_report_syscall_exit(regs, step); } - -void ptrace_disable(struct task_struct *child) -{ - /* nothing to do */ -} diff --git a/arch/nios2/kernel/ptrace.c b/arch/nios2/kernel/ptrace.c index cd62f310778b..de5f4199c45f 100644 --- a/arch/nios2/kernel/ptrace.c +++ b/arch/nios2/kernel/ptrace.c @@ -117,11 +117,6 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task) return &nios2_user_view; } -void ptrace_disable(struct task_struct *child) -{ - -} - long arch_ptrace(struct task_struct *child, long request, unsigned long addr, unsigned long data) { diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c index 44f4b1ca315d..19e4d8057e24 100644 --- a/arch/riscv/kernel/ptrace.c +++ b/arch/riscv/kernel/ptrace.c @@ -210,10 +210,6 @@ unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n) return 0; } -void ptrace_disable(struct task_struct *child) -{ -} - long arch_ptrace(struct task_struct *child, long request, unsigned long addr, unsigned long data) { diff --git a/arch/sparc/kernel/ptrace_32.c b/arch/sparc/kernel/ptrace_32.c index e7db48acb838..f6df84e12739 100644 --- a/arch/sparc/kernel/ptrace_32.c +++ b/arch/sparc/kernel/ptrace_32.c @@ -29,16 +29,6 @@ /* #define ALLOW_INIT_TRACING */ -/* - * Called by kernel/ptrace.c when detaching.. - * - * Make sure single step bits etc are not set. - */ -void ptrace_disable(struct task_struct *child) -{ - /* nothing to do */ -} - enum sparc_regset { REGSET_GENERAL, REGSET_FP, diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c index 86a7eb5c27ba..b20a16ebe533 100644 --- a/arch/sparc/kernel/ptrace_64.c +++ b/arch/sparc/kernel/ptrace_64.c @@ -83,16 +83,6 @@ static const struct pt_regs_offset regoffset_table[] = { REG_OFFSET_END, }; -/* - * Called by kernel/ptrace.c when detaching.. - * - * Make sure single step bits etc are not set. - */ -void ptrace_disable(struct task_struct *child) -{ - /* nothing to do */ -} - /* To get the necessary page struct, access_process_vm() first calls * get_user_pages(). This has done a flush_dcache_page() on the * accessed page. Then our caller (copy_{to,from}_user_page()) did diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 1893d909e45c..77299bb65d97 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -579,6 +579,14 @@ static bool __ptrace_detach(struct task_struct *tracer, struct task_struct *p) return dead; } +__weak void ptrace_disable(struct task_struct *child) +{ + /* + * Nothing to do.., some architectures would replace it with + * their own function. + */ +} + static int ptrace_detach(struct task_struct *child, unsigned int data) { if (!valid_signal(data))