lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 1 Jul 2019 13:44:44 -0600 From: Jens Axboe <axboe@...nel.dk> To: "Pavel Begunkov (Silence)" <asml.silence@...il.com>, linux-block@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH 1/1] sbitmap: Replace cmpxchg with xchg On 5/23/19 9:39 AM, Pavel Begunkov (Silence) wrote: > From: Pavel Begunkov <asml.silence@...il.com> > > cmpxchg() with an immediate value could be replaced with less expensive > xchg(). The same true if new value don't _depend_ on the old one. > > In the second block, atomic_cmpxchg() return value isn't checked, so > after atomic_cmpxchg() -> atomic_xchg() conversion it could be replaced > with atomic_set(). Comparison with atomic_read() in the second chunk was > left as an optimisation (if that was the initial intention). Applied, thanks. -- Jens Axboe
Powered by blists - more mailing lists