[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] Minimise writes to EFI variable storage
From: |
Steve McIntyre |
Subject: |
Re: [PATCH 2/2] Minimise writes to EFI variable storage |
Date: |
Mon, 25 Mar 2019 00:06:23 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Fri, Mar 22, 2019 at 11:29:15PM +0000, Colin Watson wrote:
>On Wed, Mar 13, 2019 at 01:07:20AM +0000, Steve McIntyre wrote:
>> On Mon, Mar 11, 2019 at 03:05:46PM +0000, Colin Watson wrote:
>> >+/* Boot option attributes. */
>> >+#define LOAD_OPTION_ACTIVE 0x00000001
>> >+
>> >+/* GUIDs. */
>> >+#define BLKX_UNKNOWN_GUID \
>> >+ EFI_GUID (0x47c7b225, 0xc42a, 0x11d2, 0x8e57, 0x00, 0xa0, 0xc9, 0x69, \
>> >+ 0x72, 0x3b)
>>
>> Ugh. I'm assuming the mahic numbers here are not exposed usefully by
>> efivar or efiboot?
>
>Sadly not, as far as I can see.
:-( That sounds like a clear bug, then. IMHO it's clearly part of the
interface that they should be providing.
>> So new_efi_variable() is using xmalloc() so it's safe if the
>> allocation fails. But what happens if efi_get_variable() fails - do
>> you need to free all the members by calling free_efi_variable() rather
>> than simply free() here?
>
>Quite right, and there was a similar bug in another place. I'll send a
>v2 fixing this and your comment about my grub_lltoa change.
ACK, and then a v3. Will look again shortly...
--
Steve McIntyre, Cambridge, UK. address@hidden
Welcome my son, welcome to the machine.