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: <16fe443a-dabe-aa46-6bc7-dad03f29e0dc@google.com>
Date:   Fri, 30 Sep 2022 03:45:04 -0700 (PDT)
From:   Hugh Dickins <hughd@...gle.com>
To:     Vlastimil Babka <vbabka@...e.cz>
cc:     Hugh Dickins <hughd@...gle.com>,
        David Laight <David.Laight@...lab.com>,
        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-mm@...ck.org
Subject: Re: amusing SLUB compaction bug when CC_OPTIMIZE_FOR_SIZE

On Fri, 30 Sep 2022, Vlastimil Babka wrote:
> On 9/29/22 23:54, Hugh Dickins wrote:
> > On Thu, 29 Sep 2022, Vlastimil Babka wrote:
> >> 
> >> Thanks a lot Hugh! That's a sufficiently small fix (compared to the other
> >> options) that I'm probably give it one last try.
> > 
> > I suddenly worried that you might be waiting on me for a Signed-off-by,
> > which I couldn't give until I researched my reservations (a) and (b):
> > but I'm pleased to see from your kernel.org tree that you've gone ahead
> > and folded it in - thanks.
> 
> Yeah could have been more explicit about that, sorry. But made the whole
> thing a very last merge so I can still drop it before the pull request.

No probs, you did the right thing.

> 
> > Regarding (a): great, you've found it too, mm/slab.c's kmem_rcu_free()
> > looks like it needs the same __aligned(4) as mm/slub.c's rcu_free_slabi().
> 
> Right.
> 
> > Regarding (b): I booted the PowerMac G5 to take a look, and dredged up
> > the relevant phrase "function descriptor" from depths of my memory: I
> > was right to consider that case, but it's not a worry - the first field
> > of a function descriptor structure (on all the architectures I found it)
> > is the function address, so the function descriptor address would be
> > aligned 4 or 8 anyway.
> 
> Thanks. I admit I wasn't that thorough, just consulted somebody internally :)

Exactly what I had hoped you would do.

> 
> > 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.
> 
> Yeah. But I still would be less worried if another __aligned(X) function
> existed in the tree already. Found only data. I assume the i915 thing wasn't
> fixed like this in the tree? So if there are buggy toolchains or anything,
> it will be us to discover them.

Linus put it in himself, after it had got lost over several -rcs:
5.15's cdc1e6e225e3 ("drm/i915: fix blank screen booting crashes").

Originally I'd written "__aligned(4)" explicitly, but later found i915
relied on it elsewhere since 4.9, and had an __i915_sw_fence_call for it.

But 5.17's 44505168d743 ("drm/i915: Drop stealing of bits from
i915_sw_fence function pointer") appears to have removed all that now.

I think that gives assurance that the x86 toolchains are okay;
but I imagine i915 is unlikely to be found on other architectures,
so not quite so much assurance there.

Hugh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ