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]
Date:	Tue, 7 Apr 2015 15:34:19 -0500
From:	Aravind Gopalakrishnan <aravind.gopalakrishnan@....com>
To:	Borislav Petkov <bp@...e.de>
CC:	Ingo Molnar <mingo@...nel.org>, <tglx@...utronix.de>,
	<mingo@...hat.com>, <hpa@...or.com>, <x86@...nel.org>,
	<bhelgaas@...gle.com>, <linux-kernel@...r.kernel.org>,
	<Suravee.Suthikulpanit@....com>, <joro@...tes.org>
Subject: Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

On 4/7/2015 9:57 AM, Borislav Petkov wrote:
> On Tue, Apr 07, 2015 at 09:46:26AM -0500, Aravind Gopalakrishnan wrote:
>> Okay. I'll do that and correct the typos Ingo pointed out earlier and
>> resend.
> Btw, I think you should do the same in early_gart_iommu_check() too.
>
> Doing the testing this way would mean that we first are testing for GART
> hw presence and then do the rest of checks. If no GART hw, the rest of
> the checks are meaningless.
>
> Also, when testing do a "pci=noearly" boot which should make
>
> 	!early_pci_allowed()
>
> true and thus test that path too.
>

Here are results from further testing:
1. on platforms with both iommu and gart
     - with pci=noearly, we break out of init routines in aperture_64.c 
early. amd_iommu_init() will run through it's init routine.
         - if amd_iommu_init() fails somewhere, we fall back to 
gart_iommu_init()
         - gart_iommu_init() fails since gart_iommu_aperture is not set.
         - fall back to swiotlb.
     - with amd_iommu=off
         - init routines in aperture_64.c run fine as both 
amd_gart_present() and early_pci_allowed() are true
         -  amd_iommu_detect() fails due to command line arg.
         - fall back to gart iommu
     - with pci=noearly and amd_iommu=off
         - break out of aperture_64.c init routines, and 
amd_iommu_detect() fails.
         - fall back to swiotlb

2. on platform with no gart but iommu present,
     - pci=noearly option is not relevant as we break before that due to 
!amd_gart_present()
     - if amd_iommu_init() fails somewhere, we fall back to swiotlb, 
else use iommu

3. on platforms with no gart and no iommu
     - use swiotlb regardless of any command line options passed

Thanks,
-Aravind.
--
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