From patchwork Mon Jul 2 11:04:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 140728 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3854497ljj; Mon, 2 Jul 2018 04:05:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpej1loDvOo0sRjrsV1yAUl8hYrZy9J2Fc11/pDEiLlxnMi6OQrivdFlkdPSir+IRr8oYfAU X-Received: by 2002:a62:df4e:: with SMTP id u75-v6mr12974127pfg.195.1530529502484; Mon, 02 Jul 2018 04:05:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530529502; cv=none; d=google.com; s=arc-20160816; b=x87f4Qe0pt5eKdvpyibvED+9veZYVwITOeQymSXAbLnfkiSk/QROdYdjzjZ4nZFiQM bNTnXkMi7b96QhHv3Z5ULj6ovuXGqX20umwW7xSqHTjgRFjHIKDuhzD8+z/nfJySRPMV gDfb7gtV3dOQKGZOjE5u4ZtpWM2iM3SDGgaJxZPb43faGh/8vBVRQ2upbgq78XIyab+4 eUv2GLZK0xgz3JDJoFVjEj8GIh1cvafzpabp1ykQ/82uQT/n3EDJ8oUrVyFTacxwEyQ2 TIqfkVLS/5U140oqdAIXTo66BY0pHZcHZEFnmk5FV0i+sskuH8NAdUR3hod+axTDru47 cOdw== 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=JHEctIPvorZZzQGOxybEGSzp9TJdm6HDtKM03ZY2HpeXgac6Jf5TGOW4usQ8pnMdRp Qi+HeSruVYucHEPBLrDN0OXnYt3zCBqzzaglcJFCshQajib59mCFHgmT6fyXpqqbzVnD CeFtNiNdBTpR99JclNYKl8lTKuczK9eVDK4vYvg4rx99IT/sVqhx+nqQ8jJNu/QUP/Hb 2zcd2Zf5uqeF2jtPCO8rIXBuFOoQcVJCi8KjiI/PwCm6YhbOYS9SLfhJ5KO0Woh3+Apx bLei5BKMNqX9eW6DBSwDKNg5bwtcRubbHhBsFzPaydPlqCNsNKKS8X/e8/6jNOM7sLE7 lRGg== 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 k33-v6si12797585pld.269.2018.07.02.04.05.02; Mon, 02 Jul 2018 04:05:02 -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 S1030395AbeGBLE7 (ORCPT + 31 others); Mon, 2 Jul 2018 07:04:59 -0400 Received: from foss.arm.com ([217.140.101.70]:57556 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030288AbeGBLEu (ORCPT ); Mon, 2 Jul 2018 07:04:50 -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 CE9D215AD; Mon, 2 Jul 2018 04:04:49 -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 B4BDD3F5BA; Mon, 2 Jul 2018 04:04:47 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org, will.deacon@arm.com Cc: linux-kernel@vger.kernel.org, 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: [PATCHv4 10/19] arm64: don't restore GPRs when context tracking Date: Mon, 2 Jul 2018 12:04:06 +0100 Message-Id: <20180702110415.10465-11-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180702110415.10465-1-mark.rutland@arm.com> References: <20180702110415.10465-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