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: <5ADDB2D6.3040703@huawei.com>
Date:   Mon, 23 Apr 2018 18:17:58 +0800
From:   Xishi Qiu <qiuxishi@...wei.com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "Ard Biesheuvel" <ard.biesheuvel@...aro.org>,
        "H. Peter Anvin" <hpa@...or.com>
CC:     yeyunfeng <yeyunfeng@...wei.com>, Wenan Mao <maowenan@...wei.com>,
        "Linux MM" <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] should BIOS change the efi type when we set CONFIG_X86_RESERVE_LOW
 ?

On 2018/4/12 9:49, Xishi Qiu wrote:

> Hi, I find CONFIG_X86_RESERVE_LOW=64 in my system, so trim_low_memory_range()
> will reserve low 64kb memory. But efi_free_boot_services() will free it to
> buddy system again later because BIOS set the type to EFI_BOOT_SERVICES_CODE.
> 
> Here is the log:
> ...
> efi: mem03: type=3, attr=0xf, range=[0x000000000000e000-0x0000000000010000) (0MB
> ...
> 
> 

When call memblock_is_region_reserved(), it will set md->num_pages = 0 if the
memblock region is reserved. But trim_low_memory_range() reserve the region
after efi, so this breaks the logic, and efi_free_boot_services() will free
the pages(efi code/data). That means trim_low_memory_range() has not reserve
the low memory range.

...
efi_reserve_boot_services()
...
trim_low_memory_range()
...
efi_free_boot_services()
...

Shall we move trim_low_memory_range() before efi_reserve_boot_services()?

Thanks,
Xishi Qiu

> .
> 



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ