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: Mon, 25 Mar 2024 10:18:05 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Mostafa Saleh <smostafa@...gle.com>
Cc: will@...nel.org, robin.murphy@....com,
	linux-arm-kernel@...ts.infradead.org, iommu@...ts.linux.dev,
	linux-kernel@...r.kernel.org, joro@...tes.org, nicolinc@...dia.com,
	mshavit@...gle.com
Subject: Re: [PATCH] iommu/arm-smmu-v3: Fix access for STE.SHCFG

On Sat, Mar 23, 2024 at 01:46:58PM +0000, Mostafa Saleh wrote:
> STE attributes(NSCFG, PRIVCFG, INSTCFG) use value 0 for "Use Icomming",
> for some reason SHCFG doesn't follow that, and it is defined as "0b01".
> 
> Currently the driver sets SHCFG to Use Incoming for stage-2 and bypass
> domains.
> 
> However according to the User Manual (ARM IHI 0070 F.b):
> 	When SMMU_IDR1.ATTR_TYPES_OVR == 0, this field is RES0 and the
> 	incoming Shareability attribute is used.
> 
> This patch adds a condition for writing SHCFG to Use incoming to be
> compliant with the architecture, and defines ATTR_TYPE_OVR as a new
> feature discovered from IDR1.
> This also required to propagate the SMMU through some functions args.
> 
> There is no need to add similar condition for the newly introduced function
> arm_smmu_get_ste_used() as the values of the STE are the same before and
> after any transition, so this will not trigger any change. (we already
> do the same for the VMID).
> 
> Although this is a misconfiguration from the driver, this has been there
> for a long time, so probably no HW running Linux is affected by it.
> 
> Reported-by: Will Deacon <will@...nel.org>
> Closes: https://lore.kernel.org/all/20240215134952.GA690@willie-the-truck/
> Signed-off-by: Mostafa Saleh <smostafa@...gle.com>
> ---
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 35 ++++++++++++++-------
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h |  2 ++
>  2 files changed, 25 insertions(+), 12 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@...dia.com>

Thanks,
Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ