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:   Thu, 17 Dec 2020 09:44:31 +0100
From:   Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To:     "Peng Fan (OSS)" <peng.fan@....nxp.com>, catalin.marinas@....com,
        will@...nel.org
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Peng Fan <peng.fan@....com>
Subject: Re: [PATCH] arm64: Kconfig: select ZONE_DMA

Hi Peng,
sorry for the inconvenience, this is most probably related to these changes:
https://lore.kernel.org/linux-arm-kernel/20201119175400.9995-1-nsaenzjulienne@suse.de/

On Thu, 2020-12-17 at 16:08 +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@....com>
> 
> ZONE_DMA should not be disabled, otherwise arm64_dma_phys_limit is
> left uninitialized and cause swiotlb have IO TLB above 4GB which
> might crash some platforms
> 
> Signed-off-by: Peng Fan <peng.fan@....com>
> ---
> 
> Not sure whether need to address code to initialize the variables or
> force select ZONE_DMA

What is the cause for the swiotlb related crashes? I assume it's DMA into an
address too high for the bus, but it might be something else.

I figure you have a setup with ZONE_DMA32, ZONE_NORMAL and !ZONE_DMA.

First of all, I'd suggest you try arm64's defaults (all zones enabled), the
series I mention above should fix most of the issues we've had with
ZONE_DMA/ZONE_DMA32 in the past. We now parse DT/ACPI and only create two
distinct DMA zones if really needed. Otherwise ZONE_DMA spans the whole 32 bit
address space.

That said, IMO we're not doing the right thing in the !ZONE_DMA && ZONE_DMA32
case, and this should fix it (I didn't test it):

- #define ARCH_LOW_ADDRESS_LIMIT	(arm64_dma_phys_limit - 1)
+ #define ARCH_LOW_ADDRESS_LIMIT	(arm64_dma_phys_limit ? : arm64_dma32_phys_limit)

Regards,
Nicolas





Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ