pax arm overflow checks
Posted: Mon Apr 20, 2015 2:51 pm
I'm having a testing series kernel and I'm getting the following refcount overflow:
Now I checked and id_idents_reserve is using the _unchecked variant. And the same kernel is not having any problems on x86_64. This so far seems to affect only ARM.
While this is not the latest 3.19 test kernel, I did not see any relevant changes in arm atomic unchecked. Has anyone else seen similar?
I'm slightly suspicious about:
Is this correct? Isn't it the _unchecked variant that should not add any overflow checking? Or did I miss something?
- Code: Select all
[ 437.367010] [<c053b148>] (__pabt_svc+0x68/0xc0) from [<c04cb8f0>] (ip_idents_reserve+0x8c/0xb0)
[ 437.367028] [<c04cb8f0>] (ip_idents_reserve+0x8c/0xb0) from [<c04cba74>] (__ip_select_ident+0x84/0xbc)
[ 437.367045] [<c04cba74>] (__ip_select_ident+0x84/0xbc) from [<c04d6874>] (__ip_make_skb+0x308/0x3c8)
[ 437.367061] [<c04d6874>] (__ip_make_skb+0x308/0x3c8) from [<c04d69e0>] (ip_push_pending_frames+0x14/0x28)
[ 437.367074] [<c04d69e0>] (ip_push_pending_frames+0x14/0x28) from [<c04d6ce4>] (ip_send_unicast_reply+0
Now I checked and id_idents_reserve is using the _unchecked variant. And the same kernel is not having any problems on x86_64. This so far seems to affect only ARM.
While this is not the latest 3.19 test kernel, I did not see any relevant changes in arm atomic unchecked. Has anyone else seen similar?
I'm slightly suspicious about:
- Code: Select all
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
...
+#define ATOMIC_OP(op, c_op, asm_op) __ATOMIC_OP(op, , c_op, asm_op, , )\
+ __ATOMIC_OP(op, _unchecked, c_op, asm_op##s, __OVERFLOW_POST, __OVERFLOW_EXTABLE)
...
+#define ATOMIC_OP_RETURN(op, c_op, asm_op) __ATOMIC_OP_RETURN(op, , c_op, asm_op, , )\
+ __ATOMIC_OP_RETURN(op, _unchecked, c_op, asm_op##s, __OVERFLOW_POST_RETURN, __OVERFLOW_EXTABLE)
Is this correct? Isn't it the _unchecked variant that should not add any overflow checking? Or did I miss something?