public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: linux-arm-kernel@lists.infradead.org, will@kernel.org
Cc: elver@google.com, paulmck@kernel.org, peterz@infradead.org,
	catalin.marinas@arm.com, james.morse@arm.com, dvyukov@google.com
Subject: Re: [PATCH 10/11] arm64: entry: fix NMI {user,kernel}->kernel transitions
Date: Thu, 26 Nov 2020 18:41:59 +0000	[thread overview]
Message-ID: <20201126184159.GG38486@C02TD0UTHF1T.local> (raw)
In-Reply-To: <20201126123602.23454-11-mark.rutland@arm.com>

On Thu, Nov 26, 2020 at 12:36:01PM +0000, Mark Rutland wrote:
> diff --git a/arch/arm64/include/asm/exception.h b/arch/arm64/include/asm/exception.h
> index d579b2e6db7a..0756191f44f6 100644
> --- a/arch/arm64/include/asm/exception.h
> +++ b/arch/arm64/include/asm/exception.h

> +void arm64_enter_nmi(struct pt_regs *regs);
> +void arm64_exit_nmi(struct pt_regs *regs);

[...]

> -asmlinkage __kprobes notrace unsigned long
> +asmlinkage noinstr unsigned long
>  __sdei_handler(struct pt_regs *regs, struct sdei_registered_event *arg)
>  {
>  	unsigned long ret;
>  
> -	nmi_enter();
> +	arm64_enter_nmi();
>  
>  	ret = _sdei_handler(regs, arg);
>  
> -	nmi_exit();
> +	arm64_exit_nmi();
>  
>  	return ret;
>  }

Whoops; I forgot to pass the regs here.

Will, could you please apply the fixup patch below? I've build+boot
tested with the CKI config atop rc5, and made sure I hadn't done
likewise in any of the other callers.

Thanks,
Mark

---->8----
From a055c2d9e24ddb2383b930ea36dad01d5036c801 Mon Sep 17 00:00:00 2001
From: Mark Rutland <mark.rutland@arm.com>
Date: Thu, 26 Nov 2020 18:29:13 +0000
Subject: [PATCH] arm64: sdei: fix arm64_{enter,exit}_nmi() calls

When converting __sdei_handler() to the new arm64 NMI entry/exit
helpers I missed the `regs` argument, leading to a build failure when
CONFIG_ARM_SDE_INTERFACE is selected.

Fix this by adding the missing argument to both calls. Build a boot
tested with CONFIG_ARM_SDE_INTERFACE selected.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
---
 arch/arm64/kernel/sdei.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/sdei.c b/arch/arm64/kernel/sdei.c
index 162646f0d151..793c46d6a447 100644
--- a/arch/arm64/kernel/sdei.c
+++ b/arch/arm64/kernel/sdei.c
@@ -229,11 +229,11 @@ __sdei_handler(struct pt_regs *regs, struct sdei_registered_event *arg)
 {
 	unsigned long ret;
 
-	arm64_enter_nmi();
+	arm64_enter_nmi(regs);
 
 	ret = _sdei_handler(regs, arg);
 
-	arm64_exit_nmi();
+	arm64_exit_nmi(regs);
 
 	return ret;
 }
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-11-26 18:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26 12:35 [PATCH 00/11] arm64: entry lockdep/rcu/tracing fixes Mark Rutland
2020-11-26 12:35 ` [PATCH 01/11] arm64: syscall: exit userspace before unmasking exceptions Mark Rutland
2020-11-26 12:35 ` [PATCH 02/11] arm64: mark idle code as noinstr Mark Rutland
2020-11-26 12:35 ` [PATCH 03/11] arm64: entry: mark entry " Mark Rutland
2020-11-26 12:35 ` [PATCH 04/11] arm64: entry: move enter_from_user_mode to entry-common.c Mark Rutland
2020-11-26 12:35 ` [PATCH 05/11] arm64: entry: prepare ret_to_user for function call Mark Rutland
2020-11-26 12:35 ` [PATCH 06/11] arm64: entry: move el1 irq/nmi logic to C Mark Rutland
2020-11-26 12:35 ` [PATCH 07/11] arm64: entry: fix non-NMI user<->kernel transitions Mark Rutland
2020-11-30 11:22   ` Will Deacon
2020-11-26 12:35 ` [PATCH 08/11] arm64: ptrace: prepare for EL1 irq/rcu tracking Mark Rutland
2020-11-30 11:01   ` Will Deacon
2020-11-26 12:36 ` [PATCH 09/11] arm64: entry: fix non-NMI kernel<->kernel transitions Mark Rutland
2020-11-30 11:22   ` Will Deacon
2020-11-26 12:36 ` [PATCH 10/11] arm64: entry: fix NMI {user, kernel}->kernel transitions Mark Rutland
2020-11-26 18:41   ` Mark Rutland [this message]
2020-11-26 21:00     ` [PATCH 10/11] arm64: entry: fix NMI {user,kernel}->kernel transitions Will Deacon
2020-11-26 12:36 ` [PATCH 11/11] arm64: entry: fix EL1 debug transitions Mark Rutland
2020-11-30 11:23 ` [PATCH 00/11] arm64: entry lockdep/rcu/tracing fixes Will Deacon
2020-11-30 12:03 ` Marco Elver
2020-11-30 12:38   ` Mark Rutland
     [not found]     ` <20201130133245.GA1307615@elver.google.com>
2020-11-30 16:54       ` Mark Rutland

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=20201126184159.GG38486@C02TD0UTHF1T.local \
    --to=mark.rutland@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=will@kernel.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