[PATCH v2] um: Fix stack pointer alignment
Johannes Berg
johannes at sipsolutions.net
Tue Apr 20 07:51:17 BST 2021
>
> It seems config related. I tested with my original config and it
> segfault loops, but then I tested with a fresh defconfig, then enabled
> RTC_CLASS and UML_RTC and it boots successfully, with the assembly as:
>
> movaps (%rdx),%xmm0
> movaps %xmm0,(%r12)
>
> The move from xmm0 to stack is omitted.
>
> After a bit of trial and error I found changing from
> CC_OPTIMIZE_FOR_SIZE to CC_OPTIMIZE_FOR_PERFORMANCE alone makes the
> difference. What's also interesting is that instead of
> segfault-looping (as in, segfault recovery did not do anything to fix
> the fault, so after sigreturn it segfaults again), it panics with
> "Segfault with no mm" which seems more like the expected behavior.
Aha, interesting.
>
> I'll send a v3 to clarify CC_OPTIMIZE_FOR_PERFORMANCE.
Cool, thanks for all the digging and fixes!
johannes
More information about the linux-um
mailing list