From mboxrd@z Thu Jan 1 00:00:00 1970 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 80136C19F2A for ; Mon, 8 Aug 2022 01:33:20 +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=oclxMUi0S1hi8ScTq+KUUXsEGV06MIvrtGddxi60Dk8=; b=CTY4tUja08hpoQ uwDNUUKwb99C+bOB82gzESQAU/Nt1LIRyFgXnRpJXFJkd9ndfiXQQnaGGS8b/Teef2aeJapKDBG2d S0fWGzFXiDVxP2cPcbtFP4pIwCuZ+2lcFVG1VXZqXh+I8UUWGMBYm3Q22C5zrwOOIUK/ZloF++T6f eOqL2ep9nFdpuGiaE0UDfOkXHO1Z8dy5lPc/9dzta2ibB/FsZoqvDLIBTjvBLdtFalUQ7PqG+w9/W +AVhTzXtGGWl0eN2Ly1cl8+iqxegHtkbzUpGQQWyDl2lfTMf2EZfxilxNCo15RwdTo+B+KZRGcti+ NYF7B0N67oUgYycqQlpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKrcv-007bWf-GT; Mon, 08 Aug 2022 01:32:17 +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 1oKrca-007bPA-Ko for linux-arm-kernel@lists.infradead.org; Mon, 08 Aug 2022 01:31:58 +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 4120060DE1; Mon, 8 Aug 2022 01:31:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5CDEC433D7; Mon, 8 Aug 2022 01:31:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659922316; bh=VnNBqVs1pLaOy6COvbcSfRz66B+e9FtCkBJlFPM059I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nj+JGsKSd9CAImc48stiY0oESQmtJp8l8t4zKQ0230yToVgb7vj81UZFLkXWPiVQF yP8sstbTrzr7zDahw4mH5pkBsCKblvwTy6i0dVRFLWBrji6SdxIhS7T/HcjX4AerZq 9SjL3vveuM9ri3oOLGEGeHpVzxMIhDRtjNxEEWO3CQoctRKGXrafKTJR6RhbJi67Zs rXNAcViNIyTuLvk034+LHhysptabz8Zdw5UJHstDU821vkdre79OGw/u5/AVN9jL2c oyQPp6yYnrKI8SgvGD6aCkFLWEAUaG95EWOUO4Nh4SUuMgVDjl9aZzjP/byQ+qbxLU v4g41b+YF6iZA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Francis Laniel , Will Deacon , Sasha Levin , catalin.marinas@arm.com, broonie@kernel.org, keescook@chromium.org, christophe.leroy@csgroup.eu, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.19 08/58] arm64: Do not forget syscall when starting a new thread. Date: Sun, 7 Aug 2022 21:30:26 -0400 Message-Id: <20220808013118.313965-8-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220808013118.313965-1-sashal@kernel.org> References: <20220808013118.313965-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220807_183156_747038_DDA90D9E X-CRM114-Status: GOOD ( 12.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Francis Laniel [ Upstream commit de6921856f99c11d3986c6702d851e1328d4f7f6 ] Enable tracing of the execve*() system calls with the syscalls:sys_exit_execve tracepoint by removing the call to forget_syscall() when starting a new thread and preserving the value of regs->syscallno across exec. Signed-off-by: Francis Laniel Link: https://lore.kernel.org/r/20220608162447.666494-2-flaniel@linux.microsoft.com Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/include/asm/processor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 9e58749db21d..86eb0bfe3b38 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -272,8 +272,9 @@ void tls_preserve_current_state(void); static inline void start_thread_common(struct pt_regs *regs, unsigned long pc) { + s32 previous_syscall = regs->syscallno; memset(regs, 0, sizeof(*regs)); - forget_syscall(regs); + regs->syscallno = previous_syscall; regs->pc = pc; if (system_uses_irq_prio_masking()) -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel