From patchwork Wed Jul 12 14:44:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 9836877 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DC8FB60363 for ; Wed, 12 Jul 2017 14:45:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEC88204C1 for ; Wed, 12 Jul 2017 14:45:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C390D284FF; Wed, 12 Jul 2017 14:45:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id CB07A204C1 for ; Wed, 12 Jul 2017 14:45:50 +0000 (UTC) Received: (qmail 1618 invoked by uid 550); 12 Jul 2017 14:45:19 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 1339 invoked from network); 12 Jul 2017 14:45:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cZQ4OkGSw7HloSfPAtcRm/fnxNqumDPo9YVT74L9EDU=; b=B0tRDZ287lsIMNaZF7rj4OEDbZeAkeVNE0SbGKmISZF/pHDWyPhVpFdOMIag3TOaYO pGaX7hteXXPKezM03ZvokkOMdiIAvCBrVoLLPCt5tweydU4bsQsKCCjH3hL8D/KUI0s1 +uGs7oaSa+a1XKaOrLRDTKuvMfopNjeExmTmA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cZQ4OkGSw7HloSfPAtcRm/fnxNqumDPo9YVT74L9EDU=; b=GYFuKZX6mVufJ+DfWffTqWICJdxFriimQBqCzjTpL0wIVpQmi/6af2v45K4TTg5Uv4 9lSNs/2MALfePsXEUXwwRABBxH0JwlWBdTEKhD/Eox1Z1FTpiR9+rfneG/YumOdG56xx MOFBahG0Ku6yMKUuKmoI9d/hT39XAGwknWFXeDkcxtDeOd2gh3wxM6lbQBm9KEJ/+9Kd VbUHQNx+C4ywzPxUOVT1a2kdtQa+EA9ku4yt6Yq/NWIjLWXBMvUUiFMfP9TrvaQnukeY yT90yJQTYbJqs6I3i36SufqpgNTUCKFUbE9IoYEPv1E0hbqWKoe2pp8J6zDQAlm56tZk uFPA== X-Gm-Message-State: AIVw113wmSfHDMpet5UaPMcTu2LLyQOK+JvQ6NglQY2J/QaqpWKEJNDN 1u6XwvC6yHnMYUc0 X-Received: by 10.28.17.11 with SMTP id 11mr2733729wmr.109.1499870703718; Wed, 12 Jul 2017 07:45:03 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, kernel-hardening@lists.openwall.com Cc: mark.rutland@arm.com, labbott@fedoraproject.org, will.deacon@arm.com, dave.martin@arm.com, catalin.marinas@arm.com, Ard Biesheuvel Date: Wed, 12 Jul 2017 15:44:18 +0100 Message-Id: <20170712144424.19528-6-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170712144424.19528-1-ard.biesheuvel@linaro.org> References: <20170712144424.19528-1-ard.biesheuvel@linaro.org> Subject: [kernel-hardening] [RFC PATCH 05/10] arm64: kernel: avoid x18 as an arbitrary temp register X-Virus-Scanned: ClamAV using ClamSMTP The code in __cpu_soft_restart() uses x18 as an arbitrary temp register, which will shortly be disallowed. So use x8 instead. Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/cpu-reset.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/cpu-reset.S b/arch/arm64/kernel/cpu-reset.S index 65f42d257414..56e637e558c5 100644 --- a/arch/arm64/kernel/cpu-reset.S +++ b/arch/arm64/kernel/cpu-reset.S @@ -44,11 +44,11 @@ ENTRY(__cpu_soft_restart) mov x0, #HVC_SOFT_RESTART hvc #0 // no return -1: mov x18, x1 // entry +1: mov x8, x1 // entry mov x0, x2 // arg0 mov x1, x3 // arg1 mov x2, x4 // arg2 - br x18 + br x8 ENDPROC(__cpu_soft_restart) .popsection