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: <20190827090341.2bf6b336@ezekiel.suse.cz>
Date:   Tue, 27 Aug 2019 09:03:41 +0200
From:   Petr Tesarik <ptesarik@...e.cz>
To:     Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
Cc:     Christoph Hellwig <hch@....de>, linux-arch@...r.kernel.org,
        devicetree@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
        f.fainelli@...il.com, will@...nel.org, eric@...olt.net,
        marc.zyngier@....com, catalin.marinas@....com,
        frowand.list@...il.com, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, iommu@...ts.linux-foundation.org,
        robh+dt@...nel.org, wahrenst@....net, mbrugger@...e.com,
        linux-riscv@...ts.infradead.org, m.szyprowski@...sung.com,
        Robin Murphy <robin.murphy@....com>, akpm@...ux-foundation.org,
        linux-arm-kernel@...ts.infradead.org, phill@...pberryi.org
Subject: Re: [PATCH v2 10/11] arm64: edit zone_dma_bits to fine tune
 dma-direct min mask

On Mon, 26 Aug 2019 13:08:50 +0200
Nicolas Saenz Julienne <nsaenzjulienne@...e.de> wrote:

> On Mon, 2019-08-26 at 09:06 +0200, Christoph Hellwig wrote:
> > On Tue, Aug 20, 2019 at 04:58:18PM +0200, Nicolas Saenz Julienne wrote:  
> > > -	if (IS_ENABLED(CONFIG_ZONE_DMA))
> > > +	if (IS_ENABLED(CONFIG_ZONE_DMA)) {
> > >  		arm64_dma_phys_limit = max_zone_dma_phys();
> > > +		zone_dma_bits = ilog2((arm64_dma_phys_limit - 1) &
> > > GENMASK_ULL(31, 0)) + 1;  
> >  
> Hi Christoph,
> thanks for the rewiews.
> 
> > This adds a way too long line.  
> 
> I know, I couldn't find a way to split the operation without making it even
> harder to read. I'll find a solution.

If all else fails, move the code to an inline function and call it e.g.
phys_limit_to_dma_bits().

Just my two cents,
Petr T

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ