Re: [PATCH v13 1/6] x86/boot: Introduce kstrtoull() to boot directory instead of simple_strtoull()

From: Baoquan He
Date: Wed Dec 12 2018 - 03:03:17 EST

On 12/12/18 at 12:12pm, Chao Fan wrote:
> On Wed, Dec 12, 2018 at 11:10:48AM +0800, Chao Fan wrote:
> >Introduce kstrtoull() from lib/kstrtox.c to boot directory so that code
> >in boot/ can use kstrtoull() and the old simple_strtoull() can be
> >replaced.
> >
> Hi all,
> Thanks for Boris, Baoquan and Masa's help, this PATCHSET has proceeded to
> this step. With the talking in community, the key problem has been turned
> from ACPI issue to kstrtoull() issue.
> In this version, following the suggestion of Boris, I copy the kstrtoull()
> to boot/string.c
> But from last week, I was working on kstrtoull() issue in different methods
> and try many times, there are several methods:
> 1. Copy kstrtoull() to boot/string.c
> 2. Include kstrtoull() to boot/string.c.
> 3. Use existing simple_strtoull() for now, and proceed to include kstrtoull()
> as a next work.

If can incalude it to boot/string.c, that's surely the best. Since we
don't need to worry about update kstrtoull() update from /lib/kstrtox.c.
Currently simple_strtoull() is called in arch/x86/boot/compressed/kaslr.c
and arch/x86/boot/early_serial_console.c, if not easy to include kstrtoull()
to boot/string.c, copying it is also fine.

Surely, using the old simple_strtoull() is fine too, we can take its
replacement into TODO list. This fix has blocked KASLR&hotplug
combination long time, now we have to ask customsers to add 'nokaslr'
always if they want to do memory hot add/remove on bare metal system.

See what other reviewers will say.