From patchwork Tue Jan 3 03:35:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 13087134 X-Patchwork-Delegate: palmer@dabbelt.com 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 3BA4DC53210 for ; Tue, 3 Jan 2023 03:38:46 +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=dLp+R4abqhpls92Q+DFQCNBBZogoUs/UcmOZiBBnb48=; b=4S/Lni6VRurFtC Lnn3TMjYVxbLA7s2JDTnQTcbcw+TPX2Sfv0aXUpsfdkEc5aB42doT6a5DWFXDZ8rrVHU9JCjplmfs jF/5+Cmd8Skn7HmpcjdVC1d8Mv7phjA+ZN8NyuxkMHGzG9EW0tzWXJxoegjTpga/xlLVzEPWBLoxn GRtfdEkLc74xHVMICIGp9HmZYCbsUHX/gfghO1uGk7WF0noXcMCk8lLumvSa9mssSRzFVzF4Mvj9i WDXrhh64lqvtJvpLP7/wLGzH+YxAYge5iK76GTK40iB0SHRUau9IMcO82DuEbaCQvZ30VHzCfuDl1 gGtMgaLyFZYLG9Ng0Vew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCY8M-00G8Cy-JG; Tue, 03 Jan 2023 03:38:38 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCY69-00G73D-6e for linux-riscv@lists.infradead.org; Tue, 03 Jan 2023 03:36:22 +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 25FA76119E; Tue, 3 Jan 2023 03:36:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5858C433EF; Tue, 3 Jan 2023 03:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672716973; bh=DNY322/iimzurqg2rAQmkk32JHcSLTVqr6N5got/hZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s315F9hd6J9rBdKD//LWIM0NIqtumeJ7LB0D5pJ31t+IHC7MLYwejCtjJv/UWjlf4 GRPldC+U2v/o+GrcbgQGgrDOFdOEnOJZiOFM3M3yNZmbbeWEy+bYEZg/wwygsRtH0N jc3O1+WP7Dr1QQFZu0bpOazsVudbWegKFPiKeNbw0df7rg1cfR2wmrUitbhwyQX8mp Aia/3Y14iFp8mS0yoF7CzWAtToWLI8u4pO3xthfnC0ZlXuVvDwgffbz8LaQ8KaqHlP KZzM9V0kX7EjQrDsLmyR8PNOhuVsaaiXlqT5apUOdYHEPQhB41Rma2GfT+Q1GSFpbv f2sTUvYUIly7Q== From: guoren@kernel.org To: arnd@arndb.de, guoren@kernel.org, palmer@rivosinc.com, tglx@linutronix.de, peterz@infradead.org, luto@kernel.org, conor.dooley@microchip.com, heiko@sntech.de, jszhang@kernel.org, lazyparser@gmail.com, falcon@tinylab.org, chenhuacai@kernel.org, apatel@ventanamicro.com, atishp@atishpatra.org, mark.rutland@arm.com, ben@decadent.org.uk, bjorn@kernel.org Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Guo Ren , Oleg Nesterov , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= Subject: [PATCH -next V12 2/7] riscv: ptrace: Remove duplicate operation Date: Mon, 2 Jan 2023 22:35:26 -0500 Message-Id: <20230103033531.2011112-3-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20230103033531.2011112-1-guoren@kernel.org> References: <20230103033531.2011112-1-guoren@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230102_193621_348110_B7B6FF26 X-CRM114-Status: UNSURE ( 9.68 ) 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_info.h. clear_task_syscall_work(child, SYSCALL_TRACE); Signed-off-by: Guo Ren Signed-off-by: Guo Ren Reviewed-by: Oleg Nesterov Reviewed-by: Björn Töpel --- 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,