From patchwork Sat Sep 3 16:23:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 12965007 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 D4607C54EE9 for ; Sat, 3 Sep 2022 16:24:13 +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=Kk9CMgGG3uoKF5XXw1QN56Li+fkqrYGc32kw0Ahc84I=; b=JcAQZtijFhZZR9 NPtCOuxB3FGo7Vlmlmyvqk4Byt/grfwqLTLPx88TJuoCxkjBDqIK0NVCjerxf/+9e5U5w0SV9vK/z VtvrcEnA5Dt5K+aGY3UN/4oMFWO0Hb+6WIkTMwdHKDQ8e8Cyb3F9Ec54XdhexosYgUOMbhc7jLYsl CN8i3QH+L5U7+G+/YlmKWotj6/KFsy60JzZtFzql6tWJLUKEQMGQjVymCDO8vRVK317Vg/3DdtcGU 2qjSw9SZmpdFJ5JBCxXywNNLvGu+yv2vPD3OHobwSpCbjJmm6jjPbIJL4XsPAoHBsU8OI6un7NhcJ PoadOJNiefjTiSAjiytQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUVwB-00DXVg-8k; Sat, 03 Sep 2022 16:24:03 +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 1oUVvy-00DXJ8-Oy; Sat, 03 Sep 2022 16:23:52 +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 31E17B80B01; Sat, 3 Sep 2022 16:23:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DD98C4347C; Sat, 3 Sep 2022 16:23:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662222227; bh=thj4lp5B0J2/kj7Zi1BMTTtT9fAnJMteMKwuLQ0ArOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L1+aqePh3YUl08I/8fm3yNxtjuAlMmF22bx5ehpr9WT67qVfD+H89UCSkcQb/aLVB 2NgCQIILKBmcne0lsXQ4IjY3kiwJxrtWEcVDUccBIwJj+xp2BBbv39/+Grkh4ufLkt K91rg+/bdppmXjHBKL8/+fsOwTwEh6RA27omRUzQiTPDRz8Ke7YGMSqk5VWbmO8V0g cuN032j9tv98WDWH8CRTakVr3d5ZHL/aAuIuVJy9h6CrYmFwF6TJSlC05IZMYI+l9p sn7aIfOyaWt05CVB+QByWImFn4GjzoARn6PGsB37TcCAMXurxtZTf+xyhaxTSjNZpx M7BmVLEk5oE7g== 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 V2 1/3] riscv: ptrace: Remove duplicate operation Date: Sat, 3 Sep 2022 12:23:25 -0400 Message-Id: <20220903162328.1952477-2-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220903162328.1952477-1-guoren@kernel.org> References: <20220903162328.1952477-1-guoren@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220903_092350_989012_86DE35F2 X-CRM114-Status: UNSURE ( 8.99 ) 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 Reviewed-by: Oleg Nesterov --- 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 Sat Sep 3 16:23:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 12965008 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 EF503C38145 for ; Sat, 3 Sep 2022 16:24:26 +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=tHYCslMOyq7+7Jbyvv8YxnM87lc8W+FI33xTcqVllhQ=; b=TQ0wpuM/diRwco CXfEfj1JuMMniWlBRNc7naXq2otII68YorzE6CmEYwT1dwdt+4BoHQKU+NcdEkcEMNNmcwGHAmEC6 4G6WjVj5JARqyMvT4QlBDvBrCzEk+h64V18G24XCOvOR/Zjjs1Gxs08WvW4/gmKerODvMOD8X7uxR uPEShyHOhh5QTC02aIuB76+CtN56mOm/BOSH9/UncikbazmotEXZpmNGWEf0IOJ0jbC94xDtSCSXj osqxsJ6S0y/VJA+F/+ps7cj8oXz69YKScwqxgR8K28BtavWFSFqLAg9g0OtXqXNO6dhDFPVAEwFa7 Ubl/aAgDR62BfYKsPTBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUVwN-00DXjB-KL; Sat, 03 Sep 2022 16:24:15 +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 1oUVw1-00DXNX-LI; Sat, 03 Sep 2022 16:23:54 +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 046CB60A09; Sat, 3 Sep 2022 16:23:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 973D6C433D7; Sat, 3 Sep 2022 16:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662222232; bh=KP0swQ0+kClqdN6HeWUaPcd4siKNWtxg+hX1oInsUFU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MW5Ml0XVb8n9WtUPo4R8Hz1XeXEfIRU7wXu1TqWJx+L+2V65xknIh78V4JcHnRzzN G+WuNhhGSYt5fjNP5j28KCOfJJG2WJ25OixJIuJqB7p1ZHffDastM6SftSYAecdcnS 0J3Vyk7KdRHeNiZTHd7PeNAESrRRoyJlj3UF5rZ5mMPQnXrpcxgU8sxoX7fViklSe+ gmv5TRHOHGHJYni6v+DCI0ZCTQCn5UrnQUa0q6dTzjfaIvRRMmdbsMEeAiOcPvo0Vw fxi+uBeeC1vvy2fRaE+/1EbxRexGTtBMRSNX9K4rYgDoVtH0OE3Duyw0T1OWbZZZvK x5E5UZhz8GA7A== 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 V2 2/3] openrisc: ptrace: Remove duplicate operation Date: Sat, 3 Sep 2022 12:23:26 -0400 Message-Id: <20220903162328.1952477-3-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220903162328.1952477-1-guoren@kernel.org> References: <20220903162328.1952477-1-guoren@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220903_092353_767283_318A7E3F X-CRM114-Status: UNSURE ( 8.92 ) 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 Reviewed-by: Oleg Nesterov 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 Sat Sep 3 16:23:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 12965009 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 92F5BC38145 for ; Sat, 3 Sep 2022 16:24:39 +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=HghzsFCiq7HdPNJUBj5MEhj4UPhEdga/ATnLORrYBUA=; b=bB8BhwcbAM7WMS UmxVQaED22ibeLu7hd7d8SH9eaQaYD7+wrbzj/xfM8d3NzIqyXxk15847Wi9k3RHqwlWnAasH3pYg V6uBtQiVB00S0msNjVfDukVORJ3EPS4iwcfaoBO3GY5Rj4i5NVusH2yR3uIdzZ0rnMc+zeF/QREKk RHFHM8JnWQfDpbFO7FUk2AD3wgMVJXXDApIptZgRj4HBof0wtpYhCC0PiuM/lbtjZLzUUPRkrFDQZ Kvt+N7o3OfTCyB6CGHKuicR9jy6043brxcb4nirAzaE4McglDDbfy5OB8w5p7GvEXDqlNMXxBGj0/ r8TRRM+a6xM2hMylGH9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUVwa-00DXz4-H9; Sat, 03 Sep 2022 16:24:28 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUVwC-00DXUh-Fz; Sat, 03 Sep 2022 16:24:06 +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 48754B80113; Sat, 3 Sep 2022 16:24:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4F72C433B5; Sat, 3 Sep 2022 16:23:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662222240; bh=cGpgA7bsAcBu9cM5k7EvryK/rECLcgu+ArqhQVWAdzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WNT4uPAZzNgEikgI4Tv1F4v0oQtzH4tIjUhl/cJA/YVa6QRSRGDxTafbzszqINzUO tqsJihurGXByqEToL7OKYmvozHPC85pvH3OQ1ING+FLiyj8b29mWczHjOq3aok7IkK DnRiBGkzL1WjZ89jCx75dHqWGZatw84FR+Lh/kUIHPU58dRmpHYk0TJz5CIC3Mk5sD WY2rx5GYBukKbAeCm3PA2k+xx+p2jUXmRBBV/ilo2d0myUtNurY7VwSvd8kYBq1QVD bx9p/H6H1CFsRm+JgTcXArsNNteVqQKa5G28zWPlO5IMZLUskgFw+9hPGGv3Ar+mnv Jfp80Mx78OLKw== 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 V2 3/3] arch: ptrace: Cleanup ptrace_disable Date: Sat, 3 Sep 2022 12:23:27 -0400 Message-Id: <20220903162328.1952477-4-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220903162328.1952477-1-guoren@kernel.org> References: <20220903162328.1952477-1-guoren@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220903_092404_855681_F5CC4348 X-CRM114-Status: GOOD ( 14.81 ) 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 Reviewed-by: Oleg Nesterov --- 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))