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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z9nOhn09L0prvkUi@Asurada-Nvidia>
Date: Tue, 18 Mar 2025 12:50:30 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Lu Baolu <baolu.lu@...ux.intel.com>
CC: Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>, "Robin
 Murphy" <robin.murphy@....com>, Jason Gunthorpe <jgg@...pe.ca>, Kevin Tian
	<kevin.tian@...el.com>, Dave Jiang <dave.jiang@...el.com>, Vinod Koul
	<vkoul@...nel.org>, Fenghua Yu <fenghuay@...dia.com>, Zhangfei Gao
	<zhangfei.gao@...aro.org>, Zhou Wang <wangzhou1@...ilicon.com>,
	<iommu@...ts.linux.dev>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 4/8] iommufd/selftest: Put iopf enablement in domain
 attach path

On Thu, Mar 13, 2025 at 01:19:49PM +0800, Lu Baolu wrote:
> @@ -164,6 +167,8 @@ struct mock_dev {
>  	unsigned long flags;
>  	int id;
>  	u32 cache[MOCK_DEV_CACHE_NUM];
> +	unsigned int iopf_refcount;
> +	struct iommu_domain *domain;

Assuming both are protected by the core group->mutex, maybe add
lockdep_assert_held() in mock_dev_enable/disable_iopf()?

> +static int mock_domain_blocking_attach(struct iommu_domain *domain,
> +				       struct device *dev)
> +{
> +	struct mock_dev *mdev = to_mock_dev(dev);
> +
> +	mock_dev_disable_iopf(dev, mdev->domain);
> +	mdev->domain = NULL;

The input domain is valid. Maybe better to rename mdev->domain
to mdev->iopf_domain?

With that,

Reviewed-by: Nicolin Chen <nicolinc@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ