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: <3af091e9-09b4-53a0-da2d-5b2640040b9d@marcan.st>
Date:   Thu, 5 Jan 2023 13:43:54 +0900
From:   Hector Martin <marcan@...can.st>
To:     Sven Peter <sven@...npeter.dev>, Joerg Roedel <joro@...tes.org>,
        Will Deacon <will@...nel.org>,
        Robin Murphy <robin.murphy@....com>
Cc:     Alyssa Rosenzweig <alyssa@...enzweig.io>,
        Janne Grunau <j@...nau.net>, Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        devicetree@...r.kernel.org, iommu@...ts.linux.dev,
        asahi@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/7] iommu: dart: Support >64 stream IDs

On 2023/01/04 22:37, Sven Peter wrote:
>>  #include "dma-iommu.h"
>>
>> -#define DART_MAX_STREAMS 16
>> +#define DART_MAX_STREAMS 256
> 
> Feels a bit wasteful to allocate 256-wide sid2group and save_{tcr,ttbr}
> arrays even for the M1 where 16 are enough. But then again, that's still <100 KiB
> for all DARTs combined and these machine have >8 GiB of RAM so it probably won't
> make a difference

Yeah, I don't think this is worth the extra fumbling around with dynamic
allocation.

>>  	/* enable all streams globally since TCR is used to control isolation */
>> -	writel(DART_STREAM_ALL, dart->regs + DART_STREAMS_ENABLE);
>> +	for (i = 0; i < BITS_TO_U32(dart->num_streams); i++)
>> +		writel(U32_MAX, dart->regs + DART_STREAMS_ENABLE);
> 
> This seems weird: this code writes U32_MAX to the same register
> again and again. 

Whoops, that was supposed to have a `+ 4 * i` in there. Fixed for v2.

- Hector

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ