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] [day] [month] [year] [list]
Date:   Mon, 24 Oct 2022 11:11:12 +0200
From:   Marcin Wojtas <mw@...ihalf.com>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>
Cc:     Marek Behún <kabel@...nel.org>,
        Andrew Lunn <andrew@...n.ch>,
        linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, gregory.clement@...tlin.com,
        sebastian.hesselbarth@...il.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, hch@....de, jaz@...ihalf.com
Subject: Re: [PATCH] ARM: dts: armada-38x: Mark devices as dma-coherent

pon., 24 paź 2022 o 09:51 Russell King (Oracle)
<linux@...linux.org.uk> napisał(a):
>
> On Mon, Oct 24, 2022 at 08:51:02AM +0200, Marek Behún wrote:
> > > Sure. In such a case the description of 380 variant (single core)
> > > should remain untouched.
> > >
> > > We need to decide what to do with dual-CPU, i.e. Armada 385/388. How about:
> > > - Don't change current behavior, i.e. perform a necessary kernel
> > > configuration in "arm,pl310-cache" driver,
> > > arch/arm/mach-mvebu/coherency.c + &coherencyfab:node in DT
> > > - Satisfy of_dma_is_coherent() by adding `dma-coherent;` in
> > > armada-385.dtsi only (IMO this would describe HW properly)
> > > ?
> >
> > It will describe HW properly, but someone running older kernel compiled
> > with no SMP support will see a performance drop. I wonder how many
> > people do that.
>
> If the kernel is built without SMP support, the page table entries will
> not have the shared bit set, and the system will _not_ be DMA-coherent.
> Having DT mark devices as "dma-coherent" in this case will lead to data
> corruption, because the DMA API will believe them to be DMA-coherent
> when the page tables are not setup for that to work.
>

Thanks, for the explanation. Since we're heavily dependent on what
happens in the kernel we boot, it will be easier to just drop this
patch and keep using the DT as-is.

Best regards,
Marcin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ