Re: [PATCH v11 3/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdlien from kexec

2018-11-13 Thread Chao Fan
Hi Boris, Masa, and Baoquan, On Tue, Nov 13, 2018 at 10:51:56PM +0100, Borislav Petkov wrote: >On Tue, Nov 13, 2018 at 03:06:16PM -0500, Masayoshi Mizuma wrote: >> I just felt the BOOT_STRING thing in lib/kstrtox.c confuses... >> I'm OK for now if it's applied your below comment. > >Well,

Re: [PATCH v11 3/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdlien from kexec

2018-11-13 Thread Chao Fan
On Wed, Nov 14, 2018 at 09:54:50AM +0800, Chao Fan wrote: >On Tue, Nov 13, 2018 at 06:51:50PM +0100, Borislav Petkov wrote: >>On Mon, Nov 12, 2018 at 05:46:43PM +0800, Chao Fan wrote: >>> Imitate setup_acpi_rsdp() for the early_param of 'acpi_rsdp'. >>> KEXEC writes the RSDP pointer to cmdline for

Re: [PATCH v11 3/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdlien from kexec

2018-11-13 Thread Chao Fan
On Tue, Nov 13, 2018 at 06:51:50PM +0100, Borislav Petkov wrote: >On Mon, Nov 12, 2018 at 05:46:43PM +0800, Chao Fan wrote: >> Imitate setup_acpi_rsdp() for the early_param of 'acpi_rsdp'. >> KEXEC writes the RSDP pointer to cmdline for EFI booting. >> So if 'acpi_rsdp' found in cmdline, use it

Re: [PATCH] firmware: efi: add NULL pointer checks in efivars api functions

2018-11-13 Thread Arend van Spriel
On 11/13/2018 11:50 PM, Ard Biesheuvel wrote: Hi Arend, On Tue, 13 Nov 2018 at 12:51, Arend van Spriel wrote: Since commit ce2e6db554fa ("brcmfmac: Add support for getting nvram contents from EFI variables") we have a device driver accessing the efivars api (since next-20181107). Several

Re: [PATCH] firmware: efi: add NULL pointer checks in efivars api functions

2018-11-13 Thread Ard Biesheuvel
Hi Arend, On Tue, 13 Nov 2018 at 12:51, Arend van Spriel wrote: > > Since commit ce2e6db554fa ("brcmfmac: Add support for getting nvram > contents from EFI variables") we have a device driver accessing the > efivars api (since next-20181107). Several functions in efivars api > assume __efivars

Re: [PATCH v11 3/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdlien from kexec

2018-11-13 Thread Borislav Petkov
On Tue, Nov 13, 2018 at 03:06:16PM -0500, Masayoshi Mizuma wrote: > I just felt the BOOT_STRING thing in lib/kstrtox.c confuses... > I'm OK for now if it's applied your below comment. Well, actually, upon a second look, I don't think that including a .c file into a header is ok: diff --git

[PATCH] firmware: efi: add NULL pointer checks in efivars api functions

2018-11-13 Thread Arend van Spriel
Since commit ce2e6db554fa ("brcmfmac: Add support for getting nvram contents from EFI variables") we have a device driver accessing the efivars api (since next-20181107). Several functions in efivars api assume __efivars is set, ie. will be accessed after efivars_register() has been called.

Re: [PATCH v11 3/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdlien from kexec

2018-11-13 Thread Masayoshi Mizuma
On Tue, Nov 13, 2018 at 06:54:13PM +0100, Borislav Petkov wrote: > On Tue, Nov 13, 2018 at 11:11:11AM -0500, Masayoshi Mizuma wrote: > > I think it's not very good idea to use kstrtoull() in > > arch/x86/boot/compressed/* because some tricks are needed to > > use the function, looks like Chao is

Re: [PATCH v11 3/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdlien from kexec

2018-11-13 Thread Borislav Petkov
On Tue, Nov 13, 2018 at 11:11:11AM -0500, Masayoshi Mizuma wrote: > I think it's not very good idea to use kstrtoull() in > arch/x86/boot/compressed/* because some tricks are needed to > use the function, looks like Chao is trying... Ok, I had a look at the patch. And frankly, I don't see

Re: [PATCH v11 3/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdlien from kexec

2018-11-13 Thread Borislav Petkov
On Mon, Nov 12, 2018 at 05:46:43PM +0800, Chao Fan wrote: > Imitate setup_acpi_rsdp() for the early_param of 'acpi_rsdp'. > KEXEC writes the RSDP pointer to cmdline for EFI booting. > So if 'acpi_rsdp' found in cmdline, use it directely. > > Since function kstrtoull() is needed, include it in >

Re: [PATCH v11 3/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdlien from kexec

2018-11-13 Thread Borislav Petkov
On Tue, Nov 13, 2018 at 11:11:11AM -0500, Masayoshi Mizuma wrote: > I know checkpatch.pl says an warning about simple_strtoull(), > however, I believe the warning is for simple_strtoull() defined > in lib/vsprintf.c. simple_strtoull is deprecated for various reasons. I'll take a look at Chao's

Re: [PATCH v11 3/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdlien from kexec

2018-11-13 Thread Masayoshi Mizuma
Hi Chao and Boris, On Tue, Nov 13, 2018 at 10:12:18AM +0800, Chao Fan wrote: > On Mon, Nov 12, 2018 at 12:43:44PM -0500, Masayoshi Mizuma wrote: > >How about the following get_acpi_rsdp()...? It doesn't use kstrtoull(). > > > >static void get_acpi_rsdp(acpi_physical_address *rsdp_addr) > >{ >

Re: [PATCH v11 2/5] x86/boot: Add bios_get_rsdp_addr() to search RSDP in memory

2018-11-13 Thread Borislav Petkov
On Tue, Nov 13, 2018 at 10:10:16AM +0800, Chao Fan wrote: > The 'rover' was named as 'mem_rover', but the length of this line is too > long. So shorten it as 'rever' so that they can keep in one line. I still have no clue what "rover" or "rever" means... > This name came from ACPI driver code,