[PATCH v3 1/3] powerpc: make fadump resilient with memory add/remove events
Sourabh Jain
sourabhjain at linux.ibm.com
Tue Oct 24 16:48:03 AEDT 2023
Hi Aditya,
On 24/10/23 11:05, Aditya Gupta wrote:
> 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.
> */
My mistake, I'll address that comment in the next release.
I appreciate you taking a look.
By the way, version 4 is now available, and it includes a similar comment.
- Sourabh
More information about the Linuxppc-dev
mailing list