Re: [PATCH v3 2/3] resource: add walk_system_ram_res_rev()

From: Baoquan He
Date: Sun May 06 2018 - 02:20:04 EST


On 05/04/18 at 12:16pm, Borislav Petkov wrote:
> On Thu, Apr 26, 2018 at 09:22:04PM +0800, Baoquan He wrote:
> > I noticed maintainers merged patches with this Message-ID, could you
> > tell how to get this Message-ID?
>
> https://en.wikipedia.org/wiki/Message-ID
thx.
>
> > This is not a thing that one is top down, the other is bottom up. For
> > us, they might be so different on details of code, for customers, they
> > just think them as a same thing. They may say I just get a new machine,
> > and still do kexec loading, why these top-down, bottom-up things come
> > up.
>
> So if I read the above correctly, it doesn't matter whether top-down or
> bottom-up.

Well, kexec_file loading is added because kernel signature verification
has to be done in kernel space, it's implemented by porting code of user
space utility kexc-tools to kernel. In essence both the kexec loading
and kexec_file loading are the same, they are all used to load kernel
for the furture kexec/kdump jumping. Now they have different kernel
loading position, could you tell how you get the conclusion that it
doesn't matter? And what's your theory basis?

And KASLR also changes kernel's position, I don't think users have to
know all these details to exclude unnecessary noise.

>
> > And this is not causing code churn. You can see that by replacing
> > pointer operation with list_head, code in kernel/resource.c related to
> > child list iteration is much easier to read,
>
> Now *this* is starting to sound like some reason "why". If it is better
> readability, then say so in the commit message.

Yes, I can add it to log in next post. While the main reason I made
this is for the top down searching of system RAM in kexec_file
loading.