[Top][All Lists]

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

Re: [PATCH] Warn the user to edit environment block by grub-editenv

From: Javier Martinez Canillas
Subject: Re: [PATCH] Warn the user to edit environment block by grub-editenv
Date: Tue, 5 Nov 2019 12:49:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

Hello Michael,

On 11/5/19 10:20 AM, Michael Chang wrote:
> The environment block is a preallocated 1024-byte file serves as persistent
> storage for environment variables. It has its own format which is sensitive to
> corruption if using editor doesn't know how to process it. Besides the editor
> may inadvertantly change size allocation that could have it sparse the
> filesystem which could lead to unexpected outcome.

Yes, we also get reports about this issue:
> This patch adds message in grubenv file to warn the user from editing it by
> tools other than grub-editenv.

Agreed that users should be warned that the file should only be edited with
the GRUB tools.

I also wonder if grub-editenv can't be made more robust and correct a grubenv
file (i.e: filling the missing # characters / removing any extra # character)
if is found to be corrupted and not having the expected size.

> Signed-off-by: Michael Chang <address@hidden>
> ---
>  util/editenv.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)

The patch looks good to me.

Reviewed-by: Javier Martinez Canillas <address@hidden>

Best regards,
Javier Martinez Canillas
Software Engineer - Desktop Hardware Enablement
Red Hat

reply via email to

[Prev in Thread] Current Thread [Next in Thread]