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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQUFO4yfEVgGZ9U0Q-RaokFor1gMbKJ7As2vvqGVkqrDbw@mail.gmail.com>
Date:	Mon, 9 Feb 2015 12:23:15 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Matt Fleming <matt@...eblueprint.co.uk>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
	Jonathan Corbet <corbet@....net>,
	Matt Fleming <matt.fleming@...el.com>,
	Kees Cook <keescook@...omium.org>,
	Junjie Mao <eternal.n08@...il.com>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86, boot: Allow 64bit EFI kernel to be loaded above 4G

On Mon, Feb 9, 2015 at 10:27 AM, Matt Fleming <matt@...eblueprint.co.uk> wrote:
> On Tue, 03 Feb, at 06:03:20PM, Yinghai Lu wrote:
>
> The first thing that comes to mind is the issues we experienced last
> year when adding support for loading initrds above 4GB to the EFI boot
> stub, c.f. commit 47226ad4f4cf ("x86/efi: Only load initrd above 4g on
> second try").
>
> Are things going to work correctly this time?

That should be addressed the grub2.

I was thinking that we may need to add mem_limit command together with
linuxefi and initrdefi.
or add linuxefi64/initrdefi64?

BTW, I tested loading kernel above grub2 on
virutalbox, qemu/kvm/OVMF, and real servers (ami ...) all work without problem.

wonder if we need have one black list for 64bit UEFI that does not
support access
memory above 4G.

>> @@ -1430,9 +1431,12 @@ struct boot_params *efi_main(struct efi_
>>        * If the kernel isn't already loaded at the preferred load
>>        * address, relocate it.
>>        */
>> -     if (hdr->pref_address != hdr->code32_start) {
>> -             unsigned long bzimage_addr = hdr->code32_start;
>> -             status = efi_relocate_kernel(sys_table, &bzimage_addr,
>> +     loaded_addr = hdr->code32_start;
>> +     loaded_addr |= (unsigned long)hdr->ext_code32_start << 32;
>
> Please compile this for CONFIG_X86_32 and fix any compiler warnings.

Ok.

>
>> @@ -738,6 +742,13 @@ Offset/size:     0x264/4
>>
>>    See EFI HANDOVER PROTOCOL below for more details.
>>
>> +Field name:  ext_code32_start
>> +Type:                modify (optional, reloc)
>> +Offset/size: 0x268/4
>> +Protocol:    2.14+
>> +
>> +  The address is used with code32_start to compare pref_address
>> +  to support EFI 64bit kernel get loaded above 4G.
>
> It would be good to mention that this new field contains the upper
> 32-bits of the 64-bit address.

ok. that is: upper 32bits of the 64bit address of startup_32 when kernel
loaded above 4G.

Thanks

Yinghai
--
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