2022-03-18 19:14:52

by James Morse

[permalink] [raw]
Subject: fixup for [PATCH 5.4 18/43] arm64 entry: Add macro for reading symbol address from the trampoline

__sdei_asm_trampoline_next_handler shouldn't have its own name as the
tramp_data_read_var takes the symbol name, and generates the name for
the value in the data page if CONFIG_RANDOMIZE_BASE is clear.

This means when CONFIG_RANDOMIZE_BASE is clear, this code won't compile
as __sdei_asm_trampoline_next_handler doesn't exist.

Use the proper name, and let the macro do its thing.

Reported-by: Florian Fainelli <[email protected]>
Tested-by: Florian Fainelli <[email protected]>
Signed-off-by: James Morse <[email protected]>
---
arch/arm64/kernel/entry.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index e4b5a15c2e2e..cfc0bb6c49f7 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -1190,7 +1190,7 @@ __entry_tramp_data_start:
__entry_tramp_data_vectors:
.quad vectors
#ifdef CONFIG_ARM_SDE_INTERFACE
-__entry_tramp_data___sdei_asm_trampoline_next_handler:
+__entry_tramp_data___sdei_asm_handler:
.quad __sdei_asm_handler
#endif /* CONFIG_ARM_SDE_INTERFACE */
.popsection // .rodata
@@ -1319,7 +1319,7 @@ ENTRY(__sdei_asm_entry_trampoline)
*/
1: str x4, [x1, #(SDEI_EVENT_INTREGS + S_ORIG_ADDR_LIMIT)]

- tramp_data_read_var x4, __sdei_asm_trampoline_next_handler
+ tramp_data_read_var x4, __sdei_asm_handler
br x4
ENDPROC(__sdei_asm_entry_trampoline)
NOKPROBE(__sdei_asm_entry_trampoline)
--
2.30.2


2022-03-21 22:26:18

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: fixup for [PATCH 5.4 18/43] arm64 entry: Add macro for reading symbol address from the trampoline

On Fri, Mar 18, 2022 at 05:37:13PM +0000, James Morse wrote:
> __sdei_asm_trampoline_next_handler shouldn't have its own name as the
> tramp_data_read_var takes the symbol name, and generates the name for
> the value in the data page if CONFIG_RANDOMIZE_BASE is clear.
>
> This means when CONFIG_RANDOMIZE_BASE is clear, this code won't compile
> as __sdei_asm_trampoline_next_handler doesn't exist.
>
> Use the proper name, and let the macro do its thing.
>
> Reported-by: Florian Fainelli <[email protected]>
> Tested-by: Florian Fainelli <[email protected]>
> Signed-off-by: James Morse <[email protected]>
> ---
> arch/arm64/kernel/entry.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> index e4b5a15c2e2e..cfc0bb6c49f7 100644
> --- a/arch/arm64/kernel/entry.S
> +++ b/arch/arm64/kernel/entry.S
> @@ -1190,7 +1190,7 @@ __entry_tramp_data_start:
> __entry_tramp_data_vectors:
> .quad vectors
> #ifdef CONFIG_ARM_SDE_INTERFACE
> -__entry_tramp_data___sdei_asm_trampoline_next_handler:
> +__entry_tramp_data___sdei_asm_handler:
> .quad __sdei_asm_handler
> #endif /* CONFIG_ARM_SDE_INTERFACE */
> .popsection // .rodata
> @@ -1319,7 +1319,7 @@ ENTRY(__sdei_asm_entry_trampoline)
> */
> 1: str x4, [x1, #(SDEI_EVENT_INTREGS + S_ORIG_ADDR_LIMIT)]
>
> - tramp_data_read_var x4, __sdei_asm_trampoline_next_handler
> + tramp_data_read_var x4, __sdei_asm_handler
> br x4
> ENDPROC(__sdei_asm_entry_trampoline)
> NOKPROBE(__sdei_asm_entry_trampoline)
> --
> 2.30.2
>

Thanks, now queued up.

greg k-h