On Tue, Jan 18, 2022 at 11:27:56AM +0100, Ard Biesheuvel wrote:
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 avoid this from occurring.
Are you seeing a problem that this patch fixes?
This really should not matter. .alt.smp.init contents are always a whole number of 32-bit words. These are gathered by the linker into the .init.smpalt section, so the contents should always be a whole number of 32-bit words.
This follows the .init.tagtable section, which is also a 32-bit word aligned structure built by the linker... which follows the .init.arch.info section and .init.proc.info sections which all have 32-bit alignment requirements.