From patchwork Wed Jul 11 13:56:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 141760 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp322678ljj; Wed, 11 Jul 2018 06:58:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdUyEFrP8+P7eb8XeQAa2sOlROYHMmIzW77+KCdD7wBzqn2f4QVp37QAi3ztOLovQribbG0 X-Received: by 2002:a63:5055:: with SMTP id q21-v6mr21366265pgl.397.1531317534330; Wed, 11 Jul 2018 06:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531317534; cv=none; d=google.com; s=arc-20160816; b=ldkoW5J3c2auhp1NXytqCw8FAa6Q50E1GQXV3hG1nubWObr6wPZC+B+ej/pLaKnDh3 y6ZUL6salsZfQxgf2TXGv53wqNR6w5HaYJrGLXyFXbbvmXWD2F4Pp60d+leZRqMvKxwT kxTKnDCnfzL18ZpSTSTcoVDzNivtCH/zNTeRdf/aMkc4EnPVzOjw8fPJAn/9Oua5dPkh wVSAWNgemIUlB/sE7Z9aSj9FvlSM115CNHoYimlx0oN5Luy1hWbyV/l3Qv8sR8luoZjx +7Yqz1u51FQTQboPxfSr9wCUC+2yO/Wo58J93IALENz/IPMrpDDR+MeEXeBaESwIA3XH y1rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=zNbjAjnrOAp96HEwYnANsdAn3on7A0B2numUzNw1UI8=; b=m/aTDrTdRsay2KirFq8Q5ImtgRxvV+4HZf+DVEQofErjgtAs8JaBzpS7czGCxWQkqu r3IwMZOmlVmxtRg3dJkHYnlLS4TcJAzOPjSrrxgMBia6l0zZO0hL8vNVcSDCPnxeMK/K Su5Rk3A/NiCKHJ+m0o01A80YExfEefHHIpiyjXxHE9a8WVZ60zgHICfuJvJmsV6Ty3K1 Gxxuw7NaUr8vPqKkloBlbui6zWTyyWTdeS4jjTwyJuin+vuKT2JU6w9vTs7gv7wrH8Bf PDCOHlzgCj3T2ZoZP4uMfOMf9UWLNV3CPEqTDrheSMzD+DlgiUhakzf2H03d7GLO+O5T Sw6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s84-v6si20304623pfd.288.2018.07.11.06.58.54; Wed, 11 Jul 2018 06:58:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388496AbeGKOCM (ORCPT + 23 others); Wed, 11 Jul 2018 10:02:12 -0400 Received: from foss.arm.com ([217.140.101.70]:36408 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388287AbeGKOCL (ORCPT ); Wed, 11 Jul 2018 10:02:11 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 057B51BC0; Wed, 11 Jul 2018 06:57:44 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E00783F5B1; Wed, 11 Jul 2018 06:57:41 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will.deacon@arm.com Cc: catalin.marinas@arm.com, dave.martin@arm.com, hch@infradead.org, james.morse@arm.com, linux@dominikbrodowski.net, linux-fsdevel@vger.kernel.org, marc.zyngier@arm.com, mark.rutland@arm.com, viro@zeniv.linux.org.uk Subject: [PATCHv5 11/21] arm64: don't restore GPRs when context tracking Date: Wed, 11 Jul 2018 14:56:46 +0100 Message-Id: <20180711135656.20670-12-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180711135656.20670-1-mark.rutland@arm.com> References: <20180711135656.20670-1-mark.rutland@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that syscalls are invoked with pt_regs, we no longer need to ensure that the argument regsiters are live in the entry assembly, and it's fine to not restore them after context_tracking_user_exit() has corrupted them. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/entry.S | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) -- 2.11.0 diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 156c4e3fd1a4..c41b84d06644 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -41,19 +41,9 @@ * Context tracking subsystem. Used to instrument transitions * between user and kernel mode. */ - .macro ct_user_exit, syscall = 0 + .macro ct_user_exit #ifdef CONFIG_CONTEXT_TRACKING bl context_tracking_user_exit - .if \syscall == 1 - /* - * Save/restore needed during syscalls. Restore syscall arguments from - * the values already saved on stack during kernel_entry. - */ - ldp x0, x1, [sp] - ldp x2, x3, [sp, #S_X2] - ldp x4, x5, [sp, #S_X4] - ldp x6, x7, [sp, #S_X6] - .endif #endif .endm