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: <20090504081345.GD6780@amd.com>
Date:	Mon, 4 May 2009 10:13:46 +0200
From:	Joerg Roedel <joerg.roedel@....com>
To:	Julia Lawall <julia@...u.dk>
CC:	iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: amd_iommu_init.c: possible problem with IVHD_FLAG_HT_TUN_EN

On Sat, May 02, 2009 at 03:20:23PM +0200, Julia Lawall wrote:
> The file arch/x86/kernel/amd_iommu_init.c contains the following code:
> 
> (starting at line 586 in a recent linux-next)
> 
> 	h->flags & IVHD_FLAG_HT_TUN_EN ?
> 		iommu_feature_enable(iommu, CONTROL_HT_TUN_EN) :
> 		iommu_feature_disable(iommu, CONTROL_HT_TUN_EN);
> 
> 	h->flags & IVHD_FLAG_PASSPW_EN ?
> 		iommu_feature_enable(iommu, CONTROL_PASSPW_EN) :
> 		iommu_feature_disable(iommu, CONTROL_PASSPW_EN);
> 
> 	h->flags & IVHD_FLAG_RESPASSPW_EN ?
> 		iommu_feature_enable(iommu, CONTROL_RESPASSPW_EN) :
> 		iommu_feature_disable(iommu, CONTROL_RESPASSPW_EN);
> 
> 	h->flags & IVHD_FLAG_ISOC_EN ?
> 		iommu_feature_enable(iommu, CONTROL_ISOC_EN) :
> 		iommu_feature_disable(iommu, CONTROL_ISOC_EN);
> 
> The only possible value of IVHD_FLAG_HT_TUN_EN, however, seems to be 0, as
> defined in the same file, and thus the first test is never true.  Is this
> what is intended, or should the test be expressed in another way?

Very true. Another bug because I mixed up bit shifts with bit masks :-(
Thanks for reporting this. I will send a patch to fix it.

Joerg

-- 
           | Advanced Micro Devices GmbH
 Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
 System    | 
 Research  | Geschäftsführer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
 Center    | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
           | Registergericht München, 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