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: <BN9PR11MB52767EC57A768298ED5084698C2B9@BN9PR11MB5276.namprd11.prod.outlook.com>
Date:   Wed, 19 Oct 2022 09:46:15 +0000
From:   "Tian, Kevin" <kevin.tian@...el.com>
To:     "Yu, Fenghua" <fenghua.yu@...el.com>,
        Vinod Koul <vkoul@...nel.org>,
        "Van De Ven, Arjan" <arjan.van.de.ven@...el.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "Jiang, Dave" <dave.jiang@...el.com>,
        Lu Baolu <baolu.lu@...ux.intel.com>,
        Jacob Pan <jacob.jun.pan@...ux.intel.com>
CC:     "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        "Yu, Fenghua" <fenghua.yu@...el.com>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH v2] dmaengine: idxd: Do not enable user type Work Queue
 without Shared Virtual Addressing

> From: Fenghua Yu <fenghua.yu@...el.com>
> Sent: Saturday, October 15, 2022 6:26 AM
> 
> +	/*
> +	 * User type WQ is enabled only when SVA is enabled for two
> reasons:
> +	 *   - If no IOMMU or IOMMU Passthrough without SVA, userspace

This statement is kind of misleading. Even if IOMMU is in DMA mode
user type WQ still doesn't work w/o SVA. 

> +	 *     can directly access physical address through the WQ.
> +	 *   - The IDXD cdev driver does not provide any ways to pin
> +	 *     user pages and translate the address from user VA to IOVA or
> +	 *     PA without IOMMU SVA. Therefore the application has no way
> +	 *     to instruct the device to perform DMA function. This makes
> +	 *     the cdev not usable for normal application usage.
> +	 */

It could be simply stated as "SVA is the only secure/reliable way for
the device to access user space memory"

> +	if (!device_user_pasid_enabled(idxd)) {
> +		idxd->cmd_status = IDXD_SCMD_WQ_USER_NO_IOMMU;

be specific i.e. IDXD_SCMD_WQ_USER_NO_SVA

> +		dev_dbg(&idxd->pdev->dev,
> +			"User type WQ cannot be enabled without SVA.\n");
> +
> +		return -EOPNOTSUPP;
> +	}
> +
>  

with above change the check on pasid_enabled should be removed from
idxd_cdev_open() and idxd_cdev_release(). They should always work
with SVA enabled.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ