ARM: 9180/1: Thumb2: align ALT_UP() sections in modules sufficiently
authorArd Biesheuvel <ardb@kernel.org>
Tue, 18 Jan 2022 18:32:17 +0000 (19:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Feb 2022 16:26:59 +0000 (17:26 +0100)
commitd9505958e1eecaa264c3bb352080d885dbbb031f
tree1c07e504936c5fe990b336eddc2f6e81d26d554b
parentcbab3cac94c69b95543c636bc1895701dfd3a00d
ARM: 9180/1: Thumb2: align ALT_UP() sections in modules sufficiently

commit 9f80ccda53b9417236945bc7ece4b519037df74d upstream.

When building for Thumb2, the .alt.smp.init sections that are emitted by
the ALT_UP() patching code may not be 32-bit aligned, even though the
fixup_smp_on_up() routine expects that. This results in alignment faults
at module load time, which need to be fixed up by the fault handler.

So let's align those sections explicitly, and prevent this from occurring.

Cc: <stable@vger.kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/include/asm/assembler.h
arch/arm/include/asm/processor.h