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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 23 Sep 2021 12:02:35 +0200 From: Frederic Weisbecker <frederic@...nel.org> To: Sebastian Andrzej Siewior <bigeasy@...utronix.de> Cc: Thomas Gleixner <tglx@...utronix.de>, Valentin Schneider <valentin.schneider@....com>, linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, rcu@...r.kernel.org, linux-rt-users@...r.kernel.org, Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>, Ingo Molnar <mingo@...nel.org>, Peter Zijlstra <peterz@...radead.org>, Steven Rostedt <rostedt@...dmis.org>, Daniel Bristot de Oliveira <bristot@...hat.com>, "Paul E. McKenney" <paulmck@...nel.org>, Josh Triplett <josh@...htriplett.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Davidlohr Bueso <dave@...olabs.net>, Lai Jiangshan <jiangshanlai@...il.com>, Joel Fernandes <joel@...lfernandes.org>, Anshuman Khandual <anshuman.khandual@....com>, Vincenzo Frascino <vincenzo.frascino@....com>, Steven Price <steven.price@....com>, Ard Biesheuvel <ardb@...nel.org>, Boqun Feng <boqun.feng@...il.com>, Mike Galbraith <efault@....de> Subject: Re: rcu/tree: Protect rcu_rdp_is_offloaded() invocations on RT On Wed, Sep 22, 2021 at 03:02:32PM +0200, Sebastian Andrzej Siewior wrote: > On 2021-09-22 13:38:20 [+0200], Frederic Weisbecker wrote: > > > So you rely on some implicit behaviour which breaks with RT such as: > > > > > > CPU 0 > > > ----------------------------------------------- > > > RANDOM TASK-A RANDOM TASK-B > > > ------ ----------- > > > int *X = &per_cpu(CPUX, 0) int *X = &per_cpu(CPUX, 0) > > > int A, B; > > > spin_lock(&D); > > > spin_lock(&C); > > > WRITE_ONCE(*X, 0); > > > A = READ_ONCE(*X); > > > WRITE_ONCE(*X, 1); > > > B = READ_ONCE(*X); > > > > > > while spinlock C and D are just random locks not related to CPUX but it > > > just happens that they are held at that time. So for !RT you guarantee > > > that A == B while it is not the case on RT. > > > > Not sure which spinlocks you are referring to here. Also most RCU spinlocks > > are raw. > > I was bringing an example where you also could rely on implicit locking > provided by spin_lock() which breaks on RT. Good point!
Powered by blists - more mailing lists