* arm64: Fix size of __early_cpu_boot_status
@ 2019-04-30 10:35 Arun KS
2019-04-30 11:06 ` Will Deacon
2019-05-01 11:01 ` Mark Rutland
0 siblings, 2 replies; 4+ messages in thread
From: Arun KS @ 2019-04-30 10:35 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, James Morse, Mark Rutland, Jun Yao,
Steve Capper, Arun KS, Vladimir Murzin, linux-arm-kernel,
linux-kernel
__early_cpu_boot_status is of type long. Use quad
assembler directive to allocate proper size.
Signed-off-by: Arun KS <arunks@codeaurora.org>
---
arch/arm64/kernel/head.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index eecf792..115f332 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -684,7 +684,7 @@ ENTRY(__boot_cpu_mode)
* with MMU turned off.
*/
ENTRY(__early_cpu_boot_status)
- .long 0
+ .quad 0
.popsection
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: arm64: Fix size of __early_cpu_boot_status
2019-04-30 10:35 arm64: Fix size of __early_cpu_boot_status Arun KS
@ 2019-04-30 11:06 ` Will Deacon
2019-05-01 4:57 ` Arun KS
2019-05-01 11:01 ` Mark Rutland
1 sibling, 1 reply; 4+ messages in thread
From: Will Deacon @ 2019-04-30 11:06 UTC (permalink / raw)
To: Arun KS
Cc: Catalin Marinas, James Morse, Mark Rutland, Jun Yao,
Steve Capper, Vladimir Murzin, linux-arm-kernel, linux-kernel
On Tue, Apr 30, 2019 at 04:05:04PM +0530, Arun KS wrote:
> __early_cpu_boot_status is of type long. Use quad
> assembler directive to allocate proper size.
>
> Signed-off-by: Arun KS <arunks@codeaurora.org>
> ---
> arch/arm64/kernel/head.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
> index eecf792..115f332 100644
> --- a/arch/arm64/kernel/head.S
> +++ b/arch/arm64/kernel/head.S
> @@ -684,7 +684,7 @@ ENTRY(__boot_cpu_mode)
> * with MMU turned off.
> */
> ENTRY(__early_cpu_boot_status)
> - .long 0
> + .quad 0
Yikes. How did you spot this? Did we end up corrupting an adjacent variable,
or does the alignment in the linker script save us in practice?
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: arm64: Fix size of __early_cpu_boot_status
2019-04-30 11:06 ` Will Deacon
@ 2019-05-01 4:57 ` Arun KS
0 siblings, 0 replies; 4+ messages in thread
From: Arun KS @ 2019-05-01 4:57 UTC (permalink / raw)
To: Will Deacon
Cc: Arun KS, Catalin Marinas, James Morse, Mark Rutland, Jun Yao,
Steve Capper, Vladimir Murzin, linux-arm-kernel, linux-kernel
On Tue, Apr 30, 2019 at 4:39 PM Will Deacon <will.deacon@arm.com> wrote:
>
> On Tue, Apr 30, 2019 at 04:05:04PM +0530, Arun KS wrote:
> > __early_cpu_boot_status is of type long. Use quad
> > assembler directive to allocate proper size.
> >
> > Signed-off-by: Arun KS <arunks@codeaurora.org>
> > ---
> > arch/arm64/kernel/head.S | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
> > index eecf792..115f332 100644
> > --- a/arch/arm64/kernel/head.S
> > +++ b/arch/arm64/kernel/head.S
> > @@ -684,7 +684,7 @@ ENTRY(__boot_cpu_mode)
> > * with MMU turned off.
> > */
> > ENTRY(__early_cpu_boot_status)
> > - .long 0
> > + .quad 0
>
> Yikes. How did you spot this? Did we end up corrupting an adjacent variable,
> or does the alignment in the linker script save us in practice?
Rite now there is no adjacent variable. But I was adding one and it
was getting corrupted.
Regards,
Arun
>
> Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: arm64: Fix size of __early_cpu_boot_status
2019-04-30 10:35 arm64: Fix size of __early_cpu_boot_status Arun KS
2019-04-30 11:06 ` Will Deacon
@ 2019-05-01 11:01 ` Mark Rutland
1 sibling, 0 replies; 4+ messages in thread
From: Mark Rutland @ 2019-05-01 11:01 UTC (permalink / raw)
To: Arun KS
Cc: Catalin Marinas, Will Deacon, James Morse, Jun Yao, Steve Capper,
Vladimir Murzin, linux-arm-kernel, linux-kernel
On Tue, Apr 30, 2019 at 04:05:04PM +0530, Arun KS wrote:
> __early_cpu_boot_status is of type long. Use quad
> assembler directive to allocate proper size.
>
> Signed-off-by: Arun KS <arunks@codeaurora.org>
> ---
> arch/arm64/kernel/head.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
> index eecf792..115f332 100644
> --- a/arch/arm64/kernel/head.S
> +++ b/arch/arm64/kernel/head.S
> @@ -684,7 +684,7 @@ ENTRY(__boot_cpu_mode)
> * with MMU turned off.
> */
> ENTRY(__early_cpu_boot_status)
> - .long 0
> + .quad 0
This is the last element in .mmuoff.data.write, which is padded to 2K,
so luckily we don't clobber anything else (and don't need a backport).
For consistency with __boot_cpu_mode, we could instead change the c
declaration to int, and fix up the calls to
update_early_cpu_boot_status, to use a w register, but either way:
Acked-by: Mark Rutland <mark.rutland@arm.com>
Mark.
>
> .popsection
>
> --
> 1.9.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-01 11:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-30 10:35 arm64: Fix size of __early_cpu_boot_status Arun KS
2019-04-30 11:06 ` Will Deacon
2019-05-01 4:57 ` Arun KS
2019-05-01 11:01 ` Mark Rutland
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).