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]
Message-ID: <20250107180146.GO5556@nvidia.com>
Date: Tue, 7 Jan 2025 14:01:46 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Vasant Hegde <vasant.hegde@....com>
Cc: Alejandro Jimenez <alejandro.j.jimenez@...cle.com>,
	iommu@...ts.linux.dev, linux-kernel@...r.kernel.org,
	joro@...tes.org, suravee.suthikulpanit@....com, will@...nel.org,
	joao.m.martins@...cle.com, boris.ostrovsky@...cle.com
Subject: Re: [PATCH 1/1] iommu/amd: Preserve default DTE fields when updating
 Host Page Table Root

On Tue, Jan 07, 2025 at 05:45:38PM +0530, Vasant Hegde wrote:
> > @@ -2052,12 +2052,12 @@ static void set_dte_entry(struct amd_iommu *iommu,
> >  	make_clear_dte(dev_data, dte, &new);
> 
> This fix is fine. But with all changes we have done in this code does, do we
> really need make_clear_dte()?

> How about removing `make_clear_dte()` and moving DTE_FLAG_V to
> write_dte_lower128() ?

The V flag should just be set by the functions building the DTE,
write_dte_lower() should accept a fully formed dte as a matter of
layering.

I'm hopefull Suravee will come with something like this:

https://lore.kernel.org/linux-iommu/20241016142237.GP3559746@nvidia.com/

And then I'd expect to drop make_clear_dte() and sprinkle the V into
the individual settings that already have bitflags for entry 0.

The one place outside that call chain using make_clear_dte() is
clear_dte_entry() which should call a set_dte_blocked() with the above
break up.

Then the set_dte() functions are called by the attach functions and
you can get hitless replace.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ