linux/export: Ensure natural alignment of kcrctab array
authorHelge Deller <deller@gmx.de>
Thu, 28 Dec 2023 10:36:03 +0000 (11:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jan 2024 14:19:41 +0000 (15:19 +0100)
[ Upstream commit 753547de0daecbdbd1af3618987ddade325d9aaa ]

The ___kcrctab section holds an array of 32-bit CRC values.
Add a .balign 4 to tell the linker the correct memory alignment.

Fixes: f3304ecd7f06 ("linux/export: use inline assembler to populate symbol CRCs")
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/export-internal.h

index b842aee..5280194 100644 (file)
@@ -66,6 +66,7 @@
 
 #define SYMBOL_CRC(sym, crc, sec)   \
        asm(".section \"___kcrctab" sec "+" #sym "\",\"a\""     "\n" \
+           ".balign 4"                                         "\n" \
            "__crc_" #sym ":"                                   "\n" \
            ".long " #crc                                       "\n" \
            ".previous"                                         "\n")