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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YQ0joVCrc0hTxRXK@hirez.programming.kicks-ass.net>
Date:   Fri, 6 Aug 2021 13:57:21 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Michel Lespinasse <michel@...pinasse.org>
Cc:     Mete Polat <metepolat2000@...il.com>,
        Davidlohr Bueso <dbueso@...e.de>,
        Arnd Bergmann <arnd@...db.de>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Jesper Nilsson <jesper@....nu>,
        David Woodhouse <dwmw2@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        kernel-janitors@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [PATCH] rbtree: remove unneeded explicit alignment in struct
 rb_node

On Fri, Aug 06, 2021 at 01:52:45AM -0700, Michel Lespinasse wrote:
> I think moving the color to a separate word would be costly, both in space
> (growing the struct rb_node) and in time. Feel free to try it, but I would
> expect the rbtree performance tests to regress significantly.
> 
> __rb_parent() could probably be modified - it only needs to mask one bit,
> I'm not sure why it masks two.
> 
> As to what would happen on 68k... hard to say, but I expect it should
> be fine (if the compiler cared for the structs to be aligned, it
> should do it on its own). Still, not sure how to test that either.

Somewhere, on the infinite length TODO list, I have an item to implement
threaded RB trees, which would need the LSB of the left and right words
too.

In general, the kernel is overflowing with code that (ab)uses the LSBs
of pointers and relies on at least natural alignment. There is
absolutely no point in fixing just this one instance.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ