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 48CBEC43334 for ; Wed, 8 Jun 2022 16:26:16 +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=P6HiBptqD7cUvKZSoa9EGqojHggScyAfNNsxdG8Cm/M=; b=zivHvqXPgI2z8D XjGM98wt3o/2TSyHgn1x1lllUZZ0iZcNQ3y0qZz27ZF4tGdzp00f4hQWbRDLfdod0SWAKmgTWQihc 4+kxmIYRhlzpBUJST6AiiVaM/UTPfS/0gI0utgO9lvS3zMXZ8/EKJgsxwhiszfNyv2HmcQ8Am0AGd F1USD75rZyEUH8LAOFbXEMj1UK0t6aUo/PwwPIPtiw9IjyG3UUwWPcurlRZlMunJCT37pGtjvSSSm M6Pu5UrCIJHN1sstRSlJ0AtfW3Zw3/8jcAGLt3Vynbx6T9B2+yNB+WmxD+rXGSYlpWO78T6fYhn1m Bd1/f6Hsq7FyT5zeWpdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyyUl-00EI9f-Ai; Wed, 08 Jun 2022 16:25:23 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyyUb-00EI70-5B for linux-arm-kernel@lists.infradead.org; Wed, 08 Jun 2022 16:25:14 +0000 Received: from pwmachine.home (154.pool92-186-13.dynamic.orange.es [92.186.13.154]) by linux.microsoft.com (Postfix) with ESMTPSA id 4ECC120BE646; Wed, 8 Jun 2022 09:25:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4ECC120BE646 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1654705512; bh=5IubNmv2NULJZ2ZnKWCXIaqVZ3j/e0L6iFydn2hpb6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pDNkcnRsjTZYtoKoHS3vnsqKz/PHyBxHlf1KrDBckmo+aYFG4R0QBmFchkXwwESap OzVZPluc99tUgKQ3xE4H4zqSvDucir5wUoBUcYm7rOHCTeM9R7mUWwOPEYQFH9eSs4 /yaLTgJX0tfjvDASBT0mFjGNqgJNP67BqTudSwLg= From: Francis Laniel To: linux-trace-devel@vger.kernel.org Cc: James Morse , Daniel Kiss , Francis Laniel , Catalin Marinas , Will Deacon , Mark Brown , Peter Collingbourne , Kees Cook , Mark Rutland , Christophe Leroy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/1] arm64: Do not forget syscall when starting a new thread. Date: Wed, 8 Jun 2022 17:24:46 +0100 Message-Id: <20220608162447.666494-2-flaniel@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220608162447.666494-1-flaniel@linux.microsoft.com> References: <20220608162447.666494-1-flaniel@linux.microsoft.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220608_092513_270220_3A328CCC X-CRM114-Status: GOOD ( 11.96 ) 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 This patch enables exeve*() to be traced with syscalls:sys_exit_execve tracepoint. Previous to it, by calling forget_syscall(), this tracepoint would not print its information as syscall is -1. So, this patch removes call to forget_syscall() and set regs->syscallno to its previous value. Signed-off-by: Francis Laniel --- 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.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel