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: Tue, 8 Mar 2016 14:40:52 -0600 (CST) From: Christoph Lameter <cl@...ux.com> To: Vineet Gupta <vgupta@...opsys.com> cc: linux-mm@...ck.org, Pekka Enberg <penberg@...nel.org>, David Rientjes <rientjes@...gle.com>, Joonsoo Kim <iamjoonsoo.kim@....com>, Andrew Morton <akpm@...ux-foundation.org>, Noam Camus <noamc@...hip.com>, stable@...r.kernel.org, linux-kernel@...r.kernel.org, linux-snps-arc@...ts.infradead.org Subject: Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic On Tue, 8 Mar 2016, Vineet Gupta wrote: > # set the bit > 80543b8e: ld_s r2,[r13,0] <--- (A) Finds PG_locked is set > 80543b90: or r3,r2,1 <--- (B) other core unlocks right here > 80543b94: st_s r3,[r13,0] <--- (C) sets PG_locked (overwrites unlock) Duh. Guess you need to take the spinlock also in the arch specific implementation of __bit_spin_unlock(). This is certainly not the only case in which we use the __ op to unlock. You need a true atomic op or you need to take the "spinlock" in all cases where you modify the bit. If you take the lock in __bit_spin_unlock then the race cannot happen. > Are you convinced now ! Yes, please fix your arch specific code.
Powered by blists - more mailing lists