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: <67f53a71f7ae4f518c7e953b8cfce58a@AcuMS.aculab.com>
Date:   Thu, 29 Sep 2022 14:04:31 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Vlastimil Babka' <vbabka@...e.cz>,
        'Hugh Dickins' <hughd@...gle.com>
CC:     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: Vlastimil Babka
> Sent: 29 September 2022 14:01
> 
> On 9/29/22 13:53, David Laight wrote:
> >> -static void rcu_free_slab(struct rcu_head *h)
> >> +/*
> >> + * rcu_free_slab() must be __aligned(4) because its address is saved
> >> + * in the rcu_head field, which coincides with page->mapping, which
> >> + * causes trouble if compaction mistakes it for PAGE_MAPPING_MOVABLE.
> >> + */
> >> +__aligned(4) static void rcu_free_slab(struct rcu_head *h)
> >>  {
> >>  	struct slab *slab = container_of(h, struct slab, rcu_head);
> >>
> >
> > Isn't that going to cause grief with options that align
> > functions on 16/32byte boundaries when adding space for
> > 'other stuff'?
> 
> How is that done exactly? Also having higher alignment (16/32) is not in
> conflict with asking for 4?

It depends on which one is actually used.
The __aligned(4) might take precedence over the default alignment.

	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