Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-13 Thread Chao Fan
On Wed, Feb 13, 2019 at 09:50:10AM +0100, Borislav Petkov wrote: >On Wed, Feb 13, 2019 at 04:12:21PM +0800, Chao Fan wrote: >> Yes, I tried the 32-bit OVMF and rootfs from Guenter. > >Ok, thanks. > >Final version of the fix coming up... Thanks so much for your help. Thanks, Chao Fan > >-- >Rega

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-13 Thread Borislav Petkov
On Wed, Feb 13, 2019 at 04:12:21PM +0800, Chao Fan wrote: > Yes, I tried the 32-bit OVMF and rootfs from Guenter. Ok, thanks. Final version of the fix coming up... -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-13 Thread Chao Fan
On Wed, Feb 13, 2019 at 09:01:27AM +0100, Ard Biesheuvel wrote: >On Wed, 13 Feb 2019 at 08:59, Chao Fan wrote: >> >> On Wed, Feb 13, 2019 at 08:36:12AM +0100, Boris Petkov wrote: >> >On February 13, 2019 2:54:29 AM GMT+01:00, Chao Fan >> > wrote: >> >>Yes, your PATCH really works well. I tried bo

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-13 Thread Ard Biesheuvel
On Wed, 13 Feb 2019 at 08:59, Chao Fan wrote: > > On Wed, Feb 13, 2019 at 08:36:12AM +0100, Boris Petkov wrote: > >On February 13, 2019 2:54:29 AM GMT+01:00, Chao Fan > > wrote: > >>Yes, your PATCH really works well. I tried both efi32 OVMF and efi64 > >>OVMF, all boot. > > > >What about the real

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-12 Thread Chao Fan
On Wed, Feb 13, 2019 at 08:36:12AM +0100, Boris Petkov wrote: >On February 13, 2019 2:54:29 AM GMT+01:00, Chao Fan >wrote: >>Yes, your PATCH really works well. I tried both efi32 OVMF and efi64 >>OVMF, all boot. > >What about the real hardware you are normally testing on? Boots there too? I test

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-12 Thread Boris Petkov
On February 13, 2019 2:54:29 AM GMT+01:00, Chao Fan wrote: >Yes, your PATCH really works well. I tried both efi32 OVMF and efi64 >OVMF, all boot. What about the real hardware you are normally testing on? Boots there too? Thx. -- Sent from a small device: formatting sux and brevity is inevitab

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-12 Thread Chao Fan
On Mon, Feb 11, 2019 at 12:20:09PM +0100, Borislav Petkov wrote: >On Mon, Feb 11, 2019 at 10:46:18AM +, Ard Biesheuvel wrote: >> As I pointed out in my previous reply, systab will be the wrong type >> on 32-bit firmware, it needs to be efi_system_table_32_t > >This seems to work. Chao, please r

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Guenter Roeck
On 2/11/19 2:08 AM, Borislav Petkov wrote: On Mon, Feb 11, 2019 at 05:30:33PM +0800, Chao Fan wrote: Yes, I download your ovmf file in linux-build-test/rootfs/firmware/ from your link. There are two files, efi32 and efi64. Then I try to run: You need both OVMF-pure-efi-32.fd and rootfs.squashf

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Chao Fan
On Mon, Feb 11, 2019 at 12:20:09PM +0100, Borislav Petkov wrote: >On Mon, Feb 11, 2019 at 10:46:18AM +, Ard Biesheuvel wrote: >> As I pointed out in my previous reply, systab will be the wrong type >> on 32-bit firmware, it needs to be efi_system_table_32_t > >This seems to work. Chao, please r

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Chao Fan
On Mon, Feb 11, 2019 at 11:08:00AM +0100, Borislav Petkov wrote: >On Mon, Feb 11, 2019 at 05:30:33PM +0800, Chao Fan wrote: >> Yes, I download your ovmf file in linux-build-test/rootfs/firmware/ from >> your link. There are two files, efi32 and efi64. Then I try to run: > >You need both OVMF-pure-e

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Borislav Petkov
On Mon, Feb 11, 2019 at 11:55:27AM +, Ard Biesheuvel wrote: > It you have CONFIG_EFI_MIXED enabled, you can in fact use 32-bit UEFI > runtime services from 64-bit Linux, so just using the tables should be > fine as well, and I don't think we should hide that behind a Kconfig > option. (Note tha

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Ard Biesheuvel
On Mon, 11 Feb 2019 at 12:04, Borislav Petkov wrote: > > On Mon, Feb 11, 2019 at 10:46:18AM +, Ard Biesheuvel wrote: > > As I pointed out in my previous reply, systab will be the wrong type > > on 32-bit firmware, it needs to be efi_system_table_32_t > > Yeah, that seems to work. It boots now

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Borislav Petkov
On Mon, Feb 11, 2019 at 10:46:18AM +, Ard Biesheuvel wrote: > As I pointed out in my previous reply, systab will be the wrong type > on 32-bit firmware, it needs to be efi_system_table_32_t This seems to work. Chao, please run it too. Thx. --- diff --git a/arch/x86/boot/compressed/acpi.c b/a

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Borislav Petkov
On Mon, Feb 11, 2019 at 10:46:18AM +, Ard Biesheuvel wrote: > As I pointed out in my previous reply, systab will be the wrong type > on 32-bit firmware, it needs to be efi_system_table_32_t Yeah, that seems to work. It boots now and it says: [0.00] efi: No EFI runtime due to 32/64-bit

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Ard Biesheuvel
On Mon, 11 Feb 2019 at 11:43, Borislav Petkov wrote: > > On Mon, Feb 11, 2019 at 11:24:26AM +0100, Borislav Petkov wrote: > > It is only an observation for now though... > > Ok, now I did this: > > for (i = 0; i < systab->nr_tables; i++) { > acpi_physical_address table; >

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Borislav Petkov
On Mon, Feb 11, 2019 at 11:24:26AM +0100, Borislav Petkov wrote: > It is only an observation for now though... Ok, now I did this: for (i = 0; i < systab->nr_tables; i++) { acpi_physical_address table; void *config_tables; efi_guid_t guid;

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Ard Biesheuvel
On Mon, 11 Feb 2019 at 11:24, Borislav Petkov wrote: > > On Mon, Feb 11, 2019 at 10:17:36AM +, Ard Biesheuvel wrote: > > That still does not explain how 'table' can assume a value > 4 GB > > after assigning the contents of a u32 to it. > > See efi_get_rsdp_addr() in tip/master and especially t

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Borislav Petkov
On Mon, Feb 11, 2019 at 10:17:36AM +, Ard Biesheuvel wrote: > That still does not explain how 'table' can assume a value > 4 GB > after assigning the contents of a u32 to it. See efi_get_rsdp_addr() in tip/master and especially that systable address computation: #ifdef CONFIG_X86_64 s

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Ard Biesheuvel
On Mon, 11 Feb 2019 at 11:10, Chao Fan wrote: > > On Mon, Feb 11, 2019 at 09:57:02AM +, Ard Biesheuvel wrote: > >On Mon, 11 Feb 2019 at 10:56, Chao Fan wrote: > >> > >> On Mon, Feb 11, 2019 at 09:46:03AM +, Ard Biesheuvel wrote: > >> >On Mon, 11 Feb 2019 at 01:22, Borislav Petkov wrote:

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Chao Fan
On Mon, Feb 11, 2019 at 09:57:02AM +, Ard Biesheuvel wrote: >On Mon, 11 Feb 2019 at 10:56, Chao Fan wrote: >> >> On Mon, Feb 11, 2019 at 09:46:03AM +, Ard Biesheuvel wrote: >> >On Mon, 11 Feb 2019 at 01:22, Borislav Petkov wrote: >> >> >> >> On Fri, Feb 08, 2019 at 10:53:22PM +0100, Boris

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Borislav Petkov
On Mon, Feb 11, 2019 at 05:30:33PM +0800, Chao Fan wrote: > Yes, I download your ovmf file in linux-build-test/rootfs/firmware/ from > your link. There are two files, efi32 and efi64. Then I try to run: You need both OVMF-pure-efi-32.fd and rootfs.squashfs from the repo. And then this works here.

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Ard Biesheuvel
On Mon, 11 Feb 2019 at 10:56, Chao Fan wrote: > > On Mon, Feb 11, 2019 at 09:46:03AM +, Ard Biesheuvel wrote: > >On Mon, 11 Feb 2019 at 01:22, Borislav Petkov wrote: > >> > >> On Fri, Feb 08, 2019 at 10:53:22PM +0100, Borislav Petkov wrote: > >> > On Fri, Feb 08, 2019 at 12:44:51PM -0800, Gue

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Chao Fan
On Mon, Feb 11, 2019 at 09:46:03AM +, Ard Biesheuvel wrote: >On Mon, 11 Feb 2019 at 01:22, Borislav Petkov wrote: >> >> On Fri, Feb 08, 2019 at 10:53:22PM +0100, Borislav Petkov wrote: >> > On Fri, Feb 08, 2019 at 12:44:51PM -0800, Guenter Roeck wrote: >> > > Yes, the kernel boots if I comment

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Ard Biesheuvel
On Mon, 11 Feb 2019 at 01:22, Borislav Petkov wrote: > > On Fri, Feb 08, 2019 at 10:53:22PM +0100, Borislav Petkov wrote: > > On Fri, Feb 08, 2019 at 12:44:51PM -0800, Guenter Roeck wrote: > > > Yes, the kernel boots if I comment out that function and have it return 0. > > > > Thanks, this localiz

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-11 Thread Chao Fan
On Fri, Feb 08, 2019 at 11:02:48AM -0800, Guenter Roeck wrote: >Hi, > >On Fri, Feb 01, 2019 at 03:01:11AM -0800, tip-bot for Chao Fan wrote: >> Commit-ID: 3a63f70bf4c3a17f5d9c9bf3bc3288a23bdfefce >> Gitweb: >> https://git.kernel.org/tip/3a63f70bf4c3a17f5d9c9bf3bc3288a23bdfefce >> Author:

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-10 Thread Chao Fan
On Mon, Feb 11, 2019 at 01:22:20AM +0100, Borislav Petkov wrote: >On Fri, Feb 08, 2019 at 10:53:22PM +0100, Borislav Petkov wrote: >> On Fri, Feb 08, 2019 at 12:44:51PM -0800, Guenter Roeck wrote: >> > Yes, the kernel boots if I comment out that function and have it return 0. >> >> Thanks, this lo

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-10 Thread Chao Fan
On Fri, Feb 08, 2019 at 08:10:24PM +0100, Borislav Petkov wrote: >On Fri, Feb 08, 2019 at 11:02:48AM -0800, Guenter Roeck wrote: >> Hi, >> >> On Fri, Feb 01, 2019 at 03:01:11AM -0800, tip-bot for Chao Fan wrote: >> > Commit-ID: 3a63f70bf4c3a17f5d9c9bf3bc3288a23bdfefce >> > Gitweb: >> > https

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-10 Thread Borislav Petkov
On Fri, Feb 08, 2019 at 10:53:22PM +0100, Borislav Petkov wrote: > On Fri, Feb 08, 2019 at 12:44:51PM -0800, Guenter Roeck wrote: > > Yes, the kernel boots if I comment out that function and have it return 0. > > Thanks, this localizes the issue significantly. Some observations:

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-08 Thread Borislav Petkov
On Fri, Feb 08, 2019 at 12:44:51PM -0800, Guenter Roeck wrote: > Yes, the kernel boots if I comment out that function and have it return 0. Thanks, this localizes the issue significantly. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-08 Thread Guenter Roeck
On Fri, Feb 08, 2019 at 08:10:24PM +0100, Borislav Petkov wrote: > On Fri, Feb 08, 2019 at 11:02:48AM -0800, Guenter Roeck wrote: > > Hi, > > > > On Fri, Feb 01, 2019 at 03:01:11AM -0800, tip-bot for Chao Fan wrote: > > > Commit-ID: 3a63f70bf4c3a17f5d9c9bf3bc3288a23bdfefce > > > Gitweb: > >

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-08 Thread Borislav Petkov
On Fri, Feb 08, 2019 at 11:02:48AM -0800, Guenter Roeck wrote: > Hi, > > On Fri, Feb 01, 2019 at 03:01:11AM -0800, tip-bot for Chao Fan wrote: > > Commit-ID: 3a63f70bf4c3a17f5d9c9bf3bc3288a23bdfefce > > Gitweb: > > https://git.kernel.org/tip/3a63f70bf4c3a17f5d9c9bf3bc3288a23bdfefce > > Autho

Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

2019-02-08 Thread Guenter Roeck
Hi, On Fri, Feb 01, 2019 at 03:01:11AM -0800, tip-bot for Chao Fan wrote: > Commit-ID: 3a63f70bf4c3a17f5d9c9bf3bc3288a23bdfefce > Gitweb: > https://git.kernel.org/tip/3a63f70bf4c3a17f5d9c9bf3bc3288a23bdfefce > Author: Chao Fan > AuthorDate: Wed, 23 Jan 2019 19:08:48 +0800 > Committer: