linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: james.morse@arm.com (James Morse)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/9] arm64: entry.S: mask all exceptions during kernel_exit
Date: Wed, 24 May 2017 17:58:01 +0100	[thread overview]
Message-ID: <20170524165806.29866-5-james.morse@arm.com> (raw)
In-Reply-To: <20170524165806.29866-1-james.morse@arm.com>

Add a disable_daif call to kernel_exit to mask all exceptions
before restoring registers that are overwritten by an exception.

This should be done before we restore sp_el0, as any exception taken
from EL1 will assume this register is set correctly.

Signed-off-by: James Morse <james.morse@arm.com>
---
 arch/arm64/kernel/entry.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index b738880350f9..fd429d3ba29b 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -207,6 +207,8 @@ alternative_else_nop_endif
 2:
 #endif
 
+	disable_daif
+
 	.if	\el == 0
 	ldr	x23, [sp, #S_SP]		// load return stack pointer
 	msr	sp_el0, x23
-- 
2.11.0

  parent reply	other threads:[~2017-05-24 16:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24 16:57 [PATCH 0/9] SError rework to support RAS notifications via SEI James Morse
2017-05-24 16:57 ` [PATCH 1/9] arm64: explicitly mask all exceptions James Morse
2017-05-24 16:57 ` [PATCH 2/9] arm64: introduce an order for exceptions James Morse
2017-05-24 16:58 ` [PATCH 3/9] arm64: unmask all exceptions on CPU startup James Morse
2017-05-24 16:58 ` James Morse [this message]
2017-05-24 16:58 ` [PATCH 5/9] arm64: entry.S: move enable_step_tsk into kernel_exit James Morse
2017-05-24 16:58 ` [PATCH 6/9] arm64: entry.S: convert el1_sync James Morse
2017-05-24 16:58 ` [PATCH 7/9] arm64: entry.S convert el0_sync James Morse
2017-05-24 16:58 ` [PATCH 8/9] arm64: entry.S: convert elX_irq James Morse
2017-05-24 16:58 ` [PATCH 9/9] arm64: entry.S: move SError handling into a C function for future expansion James Morse
2017-06-14 17:13 ` [PATCH 10/9] arm64: cpufeature: Detect CPU RAS Extensions James Morse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170524165806.29866-5-james.morse@arm.com \
    --to=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).