[LLVMdev] dmb ishld in AArch64
Taesoo Kim
taesoo at gatech.edu
Tue Dec 9 11:56:19 PST 2014
What is dmb ishst? hehe .. But tackling these problems one-by-one do
not seem the quickest way to test our idea; try -O0?
> static inline void hlist_add_before_rcu(struct hlist_node *n,
> struct hlist_node *next)
> {
> n->pprev = next->pprev;
> n->next = next;
barrier();
> rcu_assign_pointer(hlist_pprev_rcu(n), n);
barrier();
> next->pprev = &n->next;
> }
>
> can reordered, and causes kernel crash.
>
> f94006a8 ldr x8, [x21,#8]
> f9000275 str x21, [x19]
> d5033abf dmb ishst
> f9400669 ldr x9, [x19,#8]
> f9000668 str x8, [x19,#8] <==== reordered str
> f9000133 str x19, [x9]
> f90006b3 str x19, [x21,#8]
>
> It should be:
>
> f94006a8 ldr x8, [x21,#8]
> f9000668 str x8, [x19,#8]
> f9000275 str x21, [x19]
> d5033abf dmb ishst
> f9400669 ldr x9, [x19,#8]
> f9000133 str x19, [x9]
> f90006b3 str x19, [x21,#8]
>
> I guess it’s because "dmb ishst" is not checked/tested? Any quick way to fix this?
>
> Thanks,
> Chengyu
More information about the llvm-dev
mailing list