Message ID | 1716212077-43826-1-git-send-email-xiaojiangfeng@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] arm64: asm-bug: Add .align 2 to the end of __BUG_ENTRY | expand |
On Mon, 20 May 2024 21:34:37 +0800, Jiangfeng Xiao wrote: > When CONFIG_DEBUG_BUGVERBOSE=n, we fail to add necessary padding bytes > to bug_table entries, and as a result the last entry in a bug table will > be ignored, potentially leading to an unexpected panic(). All prior > entries in the table will be handled correctly. > > The arm64 ABI requires that struct fields of up to 8 bytes are > naturally-aligned, with padding added within a struct such that struct > are suitably aligned within arrays. > > [...] Applied to arm64 (for-next/core), thanks! [1/1] arm64: asm-bug: Add .align 2 to the end of __BUG_ENTRY https://git.kernel.org/arm64/c/ffbf4fb9b5c1 Cheers,
diff --git a/arch/arm64/include/asm/asm-bug.h b/arch/arm64/include/asm/asm-bug.h index c762038..6e73809 100644 --- a/arch/arm64/include/asm/asm-bug.h +++ b/arch/arm64/include/asm/asm-bug.h @@ -28,6 +28,7 @@ 14470: .long 14471f - .; \ _BUGVERBOSE_LOCATION(__FILE__, __LINE__) \ .short flags; \ + .align 2; \ .popsection; \ 14471: #else