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: <20150128143523.GR1569@arm.com>
Date:	Wed, 28 Jan 2015 14:35:24 +0000
From:	Will Deacon <will.deacon@....com>
To:	Joerg Roedel <joro@...tes.org>
Cc:	"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
	Kukjin Kim <kgene@...nel.org>,
	David Woodhouse <dwmw2@...radead.org>,
	Heiko Stuebner <heiko@...ech.de>,
	Hiroshi Doyu <hdoyu@...dia.com>,
	Thierry Reding <thierry.reding@...il.com>,
	Alex Williamson <alex.williamson@...hat.com>,
	Arnd Bergmann <arnd@...db.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Robin Murphy <Robin.Murphy@....com>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	"jroedel@...e.de" <jroedel@...e.de>
Subject: Re: [PATCH 3/5] iommu: Limit iommu_attach/detach_device to devices
 with their own group

On Tue, Jan 27, 2015 at 12:08:57AM +0000, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@...e.de>
> 
> This patch changes the behavior of the iommu_attach_device
> and iommu_detach_device functions. With this change these
> functions only work on devices that have their own group.
> For all other devices the iommu_group_attach/detach
> functions must be used.

I like this a lot. Currently, if somebody detaches a device from the ARM
SMMU, I end up detaching its group as well, which I've always found slightly
odd.

> Signed-off-by: Joerg Roedel <jroedel@...e.de>
> ---
>  drivers/iommu/iommu.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 59 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index 8f33ddd3..b63a550 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -51,6 +51,7 @@ struct iommu_group {
>  	void (*iommu_data_release)(void *iommu_data);
>  	char *name;
>  	int id;
> +	unsigned dev_cnt;

Is this actually used on a fast path, or can we just inspect the list of
devices on the group instead?

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ