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: <AM0PR04MB44819E95EB1FABF09DEE682788CE0@AM0PR04MB4481.eurprd04.prod.outlook.com>
Date:   Wed, 25 Mar 2020 00:34:15 +0000
From:   Peng Fan <peng.fan@....com>
To:     Catalin Marinas <catalin.marinas@....com>
CC:     "will@...nel.org" <will@...nel.org>,
        "nsaenzjulienne@...e.de" <nsaenzjulienne@...e.de>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>,
        Robin Murphy <robin.murphy@....com>
Subject: RE: [PATCH] arm64: mm: make CONFIG_ZONE_DMA configurable without
 EXPERT

> Subject: Re: [PATCH] arm64: mm: make CONFIG_ZONE_DMA configurable
> without EXPERT
> 
> On Tue, Mar 10, 2020 at 08:48:46PM +0800, peng.fan@....com wrote:
> > From: Peng Fan <peng.fan@....com>
> >
> > commit 1a8e1cef7603 ("arm64: use both ZONE_DMA and ZONE_DMA32")
> > enables both ZONE_DMA and ZONE_DMA32. The lower 1GB memory will
> be
> > occupied by ZONE_DMA, this will cause CMA allocation fail on some
> > platforms, because CMA area could not across different type of memory
> > zones.
> >
> > Make CONFIG_ZONE_DMA configurable without EXPERT option could let
> > people build non debug kernel image with CONFIG_ZONE_DMA disabled.
> 
> While I see why you need to toggle this feature, I'd rather try to figure out
> whether there is a better solution that does not break the single kernel image
> aim (i.e. the same config works for all supported SoCs).
> 
> When we decided to go ahead with a static 1GB ZONE_DMA for Raspberry Pi
> 4, we thought that other platforms would be fine, ZONE_DMA32 allocations
> fall back to ZONE_DMA. We missed the large CMA case.
> 
> I see a few potential options:
> 
> a) Ensure the CMA is contained within a single zone. 

This will break legacy dts with new version kernel.

How large is it in
>    your case? 

It is 1GB

Is it allocated by the kernel dynamically or a fixed start
>    set by the boot loader?

We use alloc-ranges and size in kernel dts.

But there is only 2GB DRAM in the board.

> 
> b) Change the CMA allocator to allow spanning multiple zones (last time
>    I looked it wasn't trivial since it relied on some per-zone lock).
> 
> c) Make ZONE_DMA dynamic on arm64 and only enable it if RPi4.

Option c seems a bit easier to me :)

I will try to explore both, but if you have time to help, that would be
appreciated.

Thanks,
Peng.
> 
> --
> Catalin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ