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]
Date:   Wed, 14 Apr 2021 13:42:53 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     Peter Geis <pgwipeout@...il.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        "open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] ITS fails to allocate on rk3568/rk3566

On Wed, 14 Apr 2021 12:41:20 +0100,
Peter Geis <pgwipeout@...il.com> wrote:
> 
> On Tue, Apr 13, 2021 at 11:51 AM Marc Zyngier <maz@...nel.org> wrote:
> >
> > On Tue, 13 Apr 2021 16:03:51 +0100,
> > Peter Geis <pgwipeout@...il.com> wrote:
> > >
> > > On Tue, Apr 13, 2021 at 10:01 AM Marc Zyngier <maz@...nel.org> wrote:
> >
> > [...]
> >
> > > > What happens if you hack all the allocations to happen in the low 4GB
> > > > of the PA space?
> > >
> > > It seems to work correctly.
> > > The downstream hacks used GFP_DMA32 which gets discarded by
> > > kmalloc_fix_flags on certain allocations.
> > > Switching to GFP_DMA seems to have satisfied it, but it feels wrong
> > > using this code.
> > > Need to check the corner cases to make sure I'm not missing something.
> >
> > The problem is that GFP_DMA doesn't always mean the same thing.
> > Overall, we need to hear from Rockchip about the exact nature of the
> > problem, and then we *may* be able to work something out.
> 
> From what I've read, GFP_DMA allocates as low as possible, while
> GFP_DMA32 ensures it's in the 32 bit address range, am I understanding
> this correctly?

ZONE_DMA{,32} aren't necessarily selected, and can vary in size (some
equally broken systems can only DMA over 30bits...).

> Is there a reason GFP_DMA is permitted while GFP_DMA32 is not, aside
> from backwards compatibility?  (I saw the notes about how we aren't
> really supposed to rely on these flags)

They are completely independent, and they can either be selected or
not. And plenty of systems do not have any memory in the low
4GB. FWIW, one of my main machines has its first byte of RAM at 1TB.

Which means that supporting this system is going to require some very
specific handling.

> I've also confirmed that their disabling shareability and caching is
> necessary.

Confirmed how? For which tables? We really cannot guess this kind of
thing.

> > I'd also like to understand whether it is broken because you happen to
> > have pre-release silicon that will never make it into the wild, or if
> > this is the real thing that is going to ship on millions of devices.
> 
> My understanding is these chips are samples prior to the full
> production run, but we are waiting on official comment from Rockchip
> about this particular errata.

OK. Please let me know once you get a full description of the problem
from Rockchip. We will also need an official erratum number for this
if this is to be worked around in mainline.

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ