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: <aa1785a02b7e4472a89c87f3b664731f@AcuMS.aculab.com>
Date:   Fri, 30 Sep 2022 21:34:23 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Hugh Dickins' <hughd@...gle.com>,
        Kees Cook <keescook@...omium.org>
CC:     Vlastimil Babka <vbabka@...e.cz>,
        Joel Fernandes <joel@...lfernandes.org>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>,
        Matthew Wilcox <willy@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: RE: amusing SLUB compaction bug when CC_OPTIMIZE_FOR_SIZE

From: Hugh Dickins
> Sent: 30 September 2022 17:22
> 
> On Fri, 30 Sep 2022, David Laight wrote:
> > > > > Regarding "conflicting" alignment requests: yes, I agree with you,
> > > > > it would have to be a toolchain bug if when asked to align 2 and to
> > > > > align 4, it chose not to align 4.
> >
> > See https://godbolt.org/z/3nGsTaf5e
> > the align() directive takes precedence.
> >
> > Here you only want to ensure the alignment is at least 4.
> 
> Sorry, I don't understand the point you are making,
> nor how to deduce it from the link which you give:
> I'll leave it to those who understand better.

(I've copied Kees Cook - I think it is his patches that are
increasing the function alignment.
He'll need to find the thread history...)

IIRC -malign_functions is being used to put functions onto
16 byte boundaries to get aligned pad space before the function.
Adding __align(4) overrides this and (I think) will remove
the pad space.

I could only see the alignment directives in gcc ouput.
clang didn't seem to generate them.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ