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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110829101550.GT1923@amd.com>
Date:	Mon, 29 Aug 2011 12:15:50 +0200
From:	"Roedel, Joerg" <Joerg.Roedel@....com>
To:	Ohad Ben-Cohen <ohad@...ery.com>
CC:	"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	David Woodhouse <dwmw2@...radead.org>,
	David Brown <davidb@...eaurora.org>,
	Stepan Moskovchenko <stepanm@...eaurora.org>
Subject: Re: [PATCH] iommu: Remove stub functions for !CONFIG_IOMMU_API

On Sat, Aug 27, 2011 at 07:56:39AM -0400, Ohad Ben-Cohen wrote:
> On Fri, Aug 26, 2011 at 4:20 PM, Joerg Roedel <joerg.roedel@....com> wrote:
> > Remove most of the stub functions because they are only
> > allowed to use when CONFIG_IOMMU_API is set anyway. This
> > will catch missing 'select' entries in kconfig at compile
> > time already.
> 
> I'm not sure we want this; think about a generic framework/driver that
> uses the IOMMU API only if the underlying hardware has an IOMMU and
> otherwise will skip calling the IOMMU API altogether (e.g. this is
> where remoteproc is headed).

CONFIG_IOMMU_API would just compile in drivers/iommu/iommu.c to provide
the base-functionality of the api. You don't need to select and IOMMU
driver in the first place if your board doesn't have one.

On the other side this change makes it easy for a developer to find
kconfig problems already at compile time when he/she uses iommu-api
functions without selecting the api.

> With this patch, such generic code will have to "select IOMMU_API"
> unconditionally, or it won't build when the hardware doesn't have an
> IOMMU (e.g. the DSP in at least several of the DaVinci SoC isn't
> behind an IOMMU). But doing so is a bit wasteful if there's no IOMMU
> hardware...

Isn't the abstraction that the drivers use the dma-api? There should be
an implementation that doesn't require the iommu-api for such devices,
no?

	Joerg

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

--
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