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: <20250902114249.GC186519@nvidia.com>
Date: Tue, 2 Sep 2025 08:42:49 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Sairaj Kodilkar <sarunkod@....com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
	nicolinc@...dia.com, linux-kernel@...r.kernel.org,
	robin.murphy@....com, will@...nel.org, joro@...tes.org,
	kevin.tian@...el.com, jsnitsel@...hat.com, vasant.hegde@....com,
	iommu@...ts.linux.dev, santosh.shukla@....com,
	sairaj.arunkodilkar@....com, jon.grimm@....com,
	prashanthpra@...gle.com, wvw@...gle.com, wnliu@...gle.com,
	gptran@...gle.com, kpsingh@...gle.com
Subject: Re: [PATCH 7/8] iommu/amd: Add support for nested domain allocation

On Mon, Sep 01, 2025 at 12:39:56PM +0530, Sairaj Kodilkar wrote:
> > +	pdom->pd_mode = PD_MODE_V2;
> > +	pdom->parent = to_pdomain(parent);
> > +	pdom->domain.ops = &nested_domain_ops;
> > +	pdom->domain.type = IOMMU_DOMAIN_NESTED;

> > +	pdom->iop.pgtbl.cfg.amd.nid = NUMA_NO_NODE;
> > +	pdom->domain.geometry.aperture_start = 0;
> > +	pdom->domain.geometry.aperture_end = ((1ULL << PM_LEVEL_SHIFT(amd_iommu_gpt_level)) - 1);
> > +	pdom->domain.geometry.force_aperture = true;
> > +	pdom->domain.pgsize_bitmap = pdom->iop.pgtbl.cfg.pgsize_bitmap;
> 
> Hi Suravee,
> You are assigning a unintialized pdom->iop.pgtbl.cfg.pgsize_bitmap to
> pdom->domain.pgsize_bitmap. In non-nested domain attach pdom_setup_pgtable()
> takes care of initializing pgsize_bitmap.

nested domains should not have a map/unmap function in their ops so
none of this code should be present.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ