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 2E82EC19F2A for ; Mon, 8 Aug 2022 01:52:05 +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=cn6XzKPcuNwC7XTrVS5JvLicqBRj4FXncbxpiqCp+Jg=; b=E3aRRPrhar6Y0y SdWKV0LhF+o6+m92vPJCralR9wg7HGppggCn88dVusMMJWmd9uwsK/oqtRjhMIkb5JsK+6Ou4ko7W j9jYDQ3tpPLI9qRAkLwt1kLEFmfDQ4AUqNwPL3R09Qu3lrZdl0MaQU/kF33s7fJ5VgNdf4CBU7677 Gah86TUq7r59Ua545wkpxu3HeSAwsmtUHJzjxdqbqsEK91vB7xW153XvpkfutxQ8fXBHBT6CW3Yr2 BMuul/0VtptvRgFuCxzH9j3v56CuLu4Bze3R5OLM7vsUi/8jrWrM2lu+ZUDysrVpp7Q83nLqdYnlo A2yWZAhe7VEiEz9oWaEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKrv3-007kNS-0k; Mon, 08 Aug 2022 01:51: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 1oKrer-007ceM-4z for linux-arm-kernel@lists.infradead.org; Mon, 08 Aug 2022 01:34:18 +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 9EF5360DB9; Mon, 8 Aug 2022 01:34:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE6F9C433D6; Mon, 8 Aug 2022 01:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659922456; bh=OXZCHrkyCbLkl9jdNZjncEsvl/fTVJvTADUZUqZjCQU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CQFmdkU41tDMC4A87SJPORp6HYly3/7e4SOJxo/MEODsNaAAIYjF0/wgzK5FDAI70 sgsCVRuQby2bzxQWVF7mdKdQlEUDi7tUf18BDeQshbZkjsGQHV6G71duwubsSXga1+ iOcGGpWVMailaN8TRrkoJiuW55QtmB719gvWgnVZ2PMrA0F0vs2FB+IgOs4GLB2aXu hqMBoSmAMddk858/PnswGcFPB0zdgu2LwJf5pDHkW+8lRAathNoHDU2z8OIreOO+gj st+Ok1buJl7E1HwPAa1Hx85rLb8GIkbGLXgVjAoUgyLm4Ti9oDoMAK1K3YM3C1hQUN 58vN3w9GeB9lg== 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, Vincenzo.Frascino@arm.com, mark.rutland@arm.com, christophe.leroy@csgroup.eu, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.18 06/53] arm64: Do not forget syscall when starting a new thread. Date: Sun, 7 Aug 2022 21:33:01 -0400 Message-Id: <20220808013350.314757-6-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220808013350.314757-1-sashal@kernel.org> References: <20220808013350.314757-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_183417_330059_914FF47B X-CRM114-Status: GOOD ( 12.68 ) 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 6b1a12c23fe7..7058bf047fa5 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -250,8 +250,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