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, 19 Dec 2017 18:58:27 +0100
From:   Jiri Bohac <jbohac@...e.cz>
To:     Baoquan He <bhe@...hat.com>
Cc:     Borislav Petkov <bp@...en8.de>, Toshi Kani <toshi.kani@....com>,
        David Airlie <airlied@...ux.ie>,
        Dave Young <dyoung@...hat.com>, joro@...tes.org,
        kexec@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Thomas Gleixner <tglx@...utronix.de>, yinghai@...nel.org,
        Vivek Goyal <vgoyal@...hat.com>
Subject: Re: [PATCH v2] x86/kexec: Exclude GART aperture from vmcore


On Tue, Dec 19, 2017 at 09:58:04AM +0800, Baoquan He wrote:
> Hmm, as I have said in the first replying mail, the v2 will introduce
> issues:
> 
> 1) If 'iommu=off' is specified in 1st kernel but not in kdump kernel, it
> will ignore the ram we need dump.

yes, instead of crashing the machine (because GART may be initialized in the
2nd kernel, overlapping the 1st kernel memory, which the 2nd kernel with its
fake e820 map sees as unused).

I'd say this is an improvement.

> 2) If 'iommu=off' is specified in kdump kernel, but not in 1st kernel,
> it won't get the GART region, this patch does't work.

No. It will work:

First kernel initializes the GART (either in a hole properly provided by the
BIOS or overlapping e820 RAM).

Second kernel will start with the GART initialized.  In gart_iommu_hole_init()
the setting is read from the northbridge registers and verified as valid. It
does not overlap e820 memory, because the second kernel has a fake e820 map
only spanning the crashkernel= reserved range. "fix" is never set to 1, so it
will exclude GART from vmcore in this path:

out:
        if (!fix && !fallback_aper_force) {
                if (last_aper_base) {
                        exclude_from_vmcore(last_aper_base, last_aper_order);
                        return 1;

(fix is never set to 1)
no_iommu is only checked after that.


> 3) If people enable GART in bios, there's a ram memory hole for GART.
> Nothing need to do while kdump kernel doesn't know GART is enabled or
> not in bios, will try to avoid it anyway. It won't hurt anythig though,
> in logic it's not suggested since confusion will be brought in.

I don't have easy access to the HP machines. I have a machine right here in our
lab that has this issue. It has no "enable GART" setting in BIOS.  It has a
"enable IOMMU" setting. The bug stays there regardless of the setting.
It's old. Noone will fix the firmware. The patch fixes it.

Thanks,

-- 
Jiri Bohac <jbohac@...e.cz>
SUSE Labs, Prague, Czechia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ