From: David Laight <David.Laight@ACULAB.COM>
To: 'Hugh Dickins' <hughd@google.com>, Kees Cook <keescook@chromium.org>
Cc: Vlastimil Babka <vbabka@suse.cz>,
Joel Fernandes <joel@joelfernandes.org>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>,
Matthew Wilcox <willy@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: RE: amusing SLUB compaction bug when CC_OPTIMIZE_FOR_SIZE
Date: Fri, 30 Sep 2022 21:34:23 +0000 [thread overview]
Message-ID: <aa1785a02b7e4472a89c87f3b664731f@AcuMS.aculab.com> (raw)
In-Reply-To: <06329f-e498-ccc-6223-32f87716436d@google.com>
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)
next prev parent reply other threads:[~2022-09-30 21:34 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-28 5:16 Hugh Dickins
2022-09-28 5:49 ` Hyeonggon Yoo
2022-09-28 13:48 ` Joel Fernandes
2022-09-28 15:09 ` Hyeonggon Yoo
2022-09-28 16:20 ` Vlastimil Babka
2022-09-28 17:50 ` Hugh Dickins
2022-09-29 9:58 ` Vlastimil Babka
2022-09-29 21:54 ` Hugh Dickins
2022-09-30 7:39 ` Vlastimil Babka
2022-09-30 10:45 ` Hugh Dickins
2022-09-30 11:02 ` David Laight
2022-09-30 16:21 ` Hugh Dickins
2022-09-30 21:34 ` David Laight [this message]
2022-10-02 5:48 ` Hyeonggon Yoo
2022-10-03 17:00 ` Matthew Wilcox
2022-10-04 14:26 ` Hyeonggon Yoo
2022-10-04 14:40 ` Matthew Wilcox
2022-10-05 11:07 ` Hyeonggon Yoo
2022-10-24 14:35 ` Vlastimil Babka
2022-10-24 15:06 ` Matthew Wilcox
2022-10-24 15:24 ` Vlastimil Babka
2022-10-24 16:49 ` Vlastimil Babka
2022-10-25 4:19 ` Hugh Dickins
2022-10-25 9:17 ` Vlastimil Babka
2022-10-25 15:45 ` Hugh Dickins
2022-10-25 13:47 ` Hyeonggon Yoo
2022-10-25 14:08 ` Vlastimil Babka
2022-10-26 10:52 ` Vlastimil Babka
2022-10-26 12:29 ` Hyeonggon Yoo
2022-11-04 15:57 ` Vlastimil Babka
2022-09-29 11:53 ` David Laight
2022-09-29 13:01 ` Vlastimil Babka
2022-09-29 14:04 ` David Laight
2022-09-28 17:56 ` Hyeonggon Yoo
2022-09-28 19:53 ` Joel Fernandes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aa1785a02b7e4472a89c87f3b664731f@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=joel@joelfernandes.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox