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]
Date:	Mon, 29 Aug 2011 16:21:54 +0300
From:	Ohad Ben-Cohen <ohad@...ery.com>
To:	"Roedel, Joerg" <Joerg.Roedel@....com>
Cc:	"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
	Stepan Moskovchenko <stepanm@...eaurora.org>,
	David Woodhouse <dwmw2@...radead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	David Brown <davidb@...eaurora.org>
Subject: Re: [PATCH] iommu: Remove stub functions for !CONFIG_IOMMU_API

On Mon, Aug 29, 2011 at 4:05 PM, Roedel, Joerg <Joerg.Roedel@....com> wrote:
> So in this case you can skip this whole part when CONFIG_IOMMU_API is
> disabled

Sure, we can do something like this in the driver:

#ifdef CONFIG_IOMMU_API

int do_the_iommu_thing(..)
{
   ... call the IOMMU API as needed...
}

#else

int do_the_iommu_thing(..)
{
    return 0;
}

#endif

Essentially, this means implementing the !CONFIG_IOMMU_API stubs in the driver.

Possible of course, but I think it's a bit neater to have that in one
place, where all drivers can use. Similar to !CONFIG_HWSPINLOCK,
!CONFIG_DEBUG_FS, ...

> This saves you even more .text size, no?

Not sure; I expect the code to be compiled out today when the IOMMU
API is called and CONFIG_IOMMU_API is not set.
--
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