[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MINI-OS PATCH 04/12] kexec: analyze new kernel for kexec



On Fri, Mar 21, 2025 at 5:25 AM Juergen Gross <jgross@xxxxxxxx> wrote:
>
> Analyze the properties of the new kernel to be loaded by kexec. The
> data needed is:
>
> - upper boundary in final location
> - copy and memory clear operations
> - entry point and entry parameter
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

> +
> +static void check_notes_entry(elf_ehdr *ehdr, void *start, unsigned int len)

I think you should rename this to include read_ since it is necessary
to set kernel_entry.  read_phys32_entry_note() or
read_note_kernel_entry() or some variation.  To me, check_ implies a
boolean return without a side effect.

> @@ -54,9 +57,122 @@
>   * - The new kernel is activated.
>   */
>
> -int kexec(void *kernel, unsigned long kernel_size,
> -          const char *cmdline)

> +int kexec(void *kernel, unsigned long kernel_size, const char *cmdline)

NIT: introduce kexec() with the single line form to avoid changing it

Everything else looks good, so preferably with the renaming:

Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>

Regards,
Jason



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.