Re: [RFC][PATCH 5/5] arch: Sanitize atomic_t bitwise ops
From: Linus Torvalds
Date: Thu Feb 06 2014 - 12:57:07 EST
On Thu, Feb 6, 2014 at 9:52 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> s390 is stuffed with atomic_{set,clear}_mask usage, no clue whatfor.
It's not the set/clear_mask ones I would worry about.
It's the "_return" variants. As far as I can tell, there are exactly
ZERO users of that stuff, and they are BAD BAD BAD.
On x86, those things would cause a cmpxchg loop, and the bad
read-for-shared-before-acquire cacheline pattern.
So why indirectly encourage people to add users for a bad operation?
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/