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] [day] [month] [year] [list]
Message-ID: <20110412063305.GB20607@amd.com>
Date:	Tue, 12 Apr 2011 08:33:05 +0200
From:	"Roedel, Joerg" <Joerg.Roedel@....com>
To:	Rolf Eike Beer <eike-kernel@...tec.de>
CC:	"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>
Subject: Re: [PATCH 1/2] x86/amd-iommu: Add extended feature detection

On Mon, Apr 11, 2011 at 11:11:44AM -0400, Rolf Eike Beer wrote:
> > This patch adds detection of the extended features of an
> > AMD IOMMU. The available features are printed to dmesg on
> > boot.
> 
> > diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
> > index bcf58ea..d609610 100644
> > --- a/arch/x86/kernel/amd_iommu.c
> > +++ b/arch/x86/kernel/amd_iommu.c
> > @@ -29,8 +29,8 @@
> >  #include <asm/proto.h>
> >  #include <asm/iommu.h>
> >  #include <asm/gart.h>
> > -#include <asm/amd_iommu_proto.h>
> >  #include <asm/amd_iommu_types.h>
> > +#include <asm/amd_iommu_proto.h>
> >  #include <asm/amd_iommu.h>
> 
> That one (and the second place where this happens later) look suspicious.
> Do you need that change? Usually those includes tend to be alphabetically
> sorted (which you destroy here).
> 
> When you _need_ that change that means that you probably use some things
> from amd_iommu_types.h in amd_iommu_proto.h without including that header
> there (which is a bug in amd_iommu_proto.h and must be fixed there).
> Otherwise this change is just noise. So either way this change should not
> happen IMHO.

Yeah, this is not very good style, I agree with that. In this case the
amd_iommu_proto.h file got a new inline function which needs the struct
amd_iommu.

I have merging of the different include files for the AMD IOMMU driver
on my cleanup list. There are currently 3 include files which seems a
bit too much. A single one will do too. Meanwhile I change this patch so
that amd_iommu_proto.h will include amd_iommu_types.h itself. This
doesn't make it nice and clean but at least less ugly meanwhile ;)

	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