3 ms·
Well, neither have outputs, doh, so they both need volatile don't they? Adding an output for the %rax result would prevent the call from being omitted without
by jcalvinowens 2y ago
Well, neither have outputs, doh, so they both need volatile don't they?
Adding an output for the %rax result would prevent the call from being omitted without volatile (assuming it is actually consumed by something), but it could still be reordered, right? I suppose with general syscalls that might be okay, but certainly not with sys_exit().
They also need memory clobbers, but I don't think memory clobbers would necessarily prevent reordering? In the case of the ARM bug though, it did: https://lore.kernel.org/lkml/Zqa4SAyPKPuaXdgg@mozart.vkv.me/ https://lore.kernel.org/lkml/Zqa4SAyPKPuaXdgg@mozart.vkv.me/