[Bug 1188327] kernel 5.13.1 is crashing on boot on armv7 due to 'Unhandled fault: alignment exception' in ecdsa_set_pub_key
https://bugzilla.suse.com/show_bug.cgi?id=1188327
https://bugzilla.suse.com/show_bug.cgi?id=1188327#c13
--- Comment #13 from Michael Matz
Please confirm that compiler inferring LDM instruction instead of LDR is correct for ecc_swap_digits().
Just for avoidance of doubt: C dictates that all memory addresses accessed indirectly via type T must be aligned according to type T. What is "aligned according to type T" is of course platform specific, the psABI will say what it is. For arm-eabi the natural alignment for "unsigned long long" is 4 [1]. That is what GCC will assume to hold if it doesn't _know_ otherwise. (And hence will freely use ldm, which also requires 4-alignment, when it seems useful) The only solution within ISO C is to use memcpy. GNU C offers also unaligned pointers. I.e. everything written above is a good solution. [1] https://developer.arm.com/documentation/dui0041/c/ch03s02s02 -- You are receiving this mail because: You are the assignee for the bug.
participants (1)
-
bugzilla_noreply@suse.com