[PATCH v3 1/3] powerpc: make fadump resilient with memory add/remove events

Aditya Gupta adityag at linux.ibm.com
Tue Oct 24 16:35:34 AEDT 2023


Hi sourabh, found a typo in comment.

On Mon, Oct 09, 2023 at 09:49:51AM +0530, Sourabh Jain wrote:
>
> +/*
> + * Process an active dump in four steps. First, verify the crash info header
> + * signature/magic number for integrity and accuracy. Second, if the fadump
> + * version is greater than 0, prepare the elfcorehdr; for fadump version 0,
> + * it's already created in the first kernel as part of the fadump reserved
> + * area. Third, let the platform update CPU notes in elfcorehdr. Finally,
> + * set elfcorehdr_addr so that the vmcore module can export the elfcore
> + * header through '/proc/vmcore'.
> + */
> +static void process_fadump(void)
> +{
>
> ...
>
> +     /*
> +      * fadump version zero indicates that fadump crash info header
> +      * is corrupted.
> +      */
> +     if (fadump_version < 0) {
> +             pr_err("Crash info header is not valid.\n");
> +             goto err_out;
> +     }
> +

Here, comment says 0 indicates header is corrupted. But as per my understanding,
version 0 means the earlier case (when MAGIC number was FADUMPINF).
Maybe it should be:

/*
 * fadump version less than zero indicates that fadump crash info header
 * is corrupted.
 */

Or:

/*
 * Negative fadump version indicates that fadump crash info header
 * is corrupted.
 */

Thanks,
Aditya Gupta



More information about the Linuxppc-dev mailing list