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: Fri, 6 Aug 2021 19:44:57 +0200 From: Peter Zijlstra <peterz@...radead.org> To: Mete Polat <metepolat2000@...il.com> Cc: Michel Lespinasse <michel@...pinasse.org>, Davidlohr Bueso <dbueso@...e.de>, Andrew Morton <akpm@...ux-foundation.org>, Lukas Bulwahn <lukas.bulwahn@...il.com>, Jesper Nilsson <jesper@....nu>, Arnd Bergmann <arnd@...db.de>, David Woodhouse <dwmw2@...radead.org>, Ingo Molnar <mingo@...nel.org>, Randy Dunlap <rdunlap@...radead.org>, Geert Uytterhoeven <geert@...ux-m68k.org>, kernel-janitors@...r.kernel.org, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, linux-m68k <linux-m68k@...ts.linux-m68k.org> Subject: Re: [PATCH v2] rbtree: remove unneeded explicit alignment in struct rb_node On Fri, Aug 06, 2021 at 05:22:08PM +0200, Mete Polat wrote: > Commit e977145aeaad ("[RBTREE] Add explicit alignment to sizeof(long) for > struct rb_node.") adds an explicit alignment to the struct rb_node due to > some speciality of the CRIS architecture. > > The support for the CRIS architecture was removed with commit c690eddc2f3b > ("CRIS: Drop support for the CRIS port") > > So, remove this now unneeded explicit alignment in struct rb_node as well. > > This basically reverts commit e977145aeaad ("[RBTREE] Add explicit > alignment to sizeof(long) for struct rb_node."). > > The rbtree node color is stored in the LSB of '__rb_parent_color'. > Only mask the first bit in '__rb_parent()', otherwise it modifies the > node's parent address on m68k. I still don't believe for a second this will actually work. We rely on rcu_assign_pointer() and rcu_dereference() to work on the rb_{left,right} members, and I don't think any architecture can provide single copy atomic loads and stores that are not naturally aligned (eg. when they straddle a cache or page boundary).
Powered by blists - more mailing lists