All of lore.kernel.org
 help / color / mirror / Atom feed
From: SevenBits <sevenbitstech@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Grub get and set efi variables
Date: Thu, 5 Nov 2015 13:25:23 -0500	[thread overview]
Message-ID: <CAKCeAn-6deosYohUDGnwR6JimC7YWhOzFJi=ovyJ=14GJn2QeA@mail.gmail.com> (raw)
In-Reply-To: <563999B9.7020108@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3630 bytes --]

On Wednesday, November 4, 2015, Andrei Borzenkov <arvidjaar@gmail.com>
wrote:

> 04.11.2015 02:05, Mat Troi пишет:
>
>> Hi SevenBits,
>>
>> Thanks for letting me know.  Out of curiosity, any particular reason why
>> this patch did not get merged?  It looks to be a useful feature.
>>
>>
> First, this patch was reverse patch :)


Yeah, I think I had accidentally passed the arguments to the diff command
in the wrong order.


>
> I am not convinced making it easy to set EFI variable from within GRUB is
> good thing, because there are known reports about systems rendered
> unbootable by writing too much into EFI flash. What is your use case that
> absolutely requires setting EFI variables? How are you going to implement
> it on other platforms?


I should probably note that I wrote this patch for a specific project of
mine which required the ability to read UEFI variables. I added in write
functionality for good measure because I could. But I agree, this would
only encourage tinkering and users messing with their systems and
potentially bricking it, which would of course be blamed on GRUB.


>
> Reading does not harm and may be useful, but then it should provide
> generic interface to access arbitrary vendor namespace, not only EFI global
> variables, and handle arbitrary binary data, even if initial implementation
> handles only subset of them. Once someone starts to use it changing it will
> be much more difficult.
>
> Maybe it should take hints how to interpret variable values, or have
> format option akin to printf.


I would be happy to resume work on this, and debase it on the current code,
if GRUB has a clear need for such functionality. I would prefer to have it
be clear what the patch should consist of, though.

A key question would be how to e.g. handle arbitrary data stored in
variables if it is not something easily represent able like a string. Right
now, the patch stores it's value into an environment variable specified by
the user. Unless the powers that be think otherwise, I think this is the
best way to go.


>
> Thanks,
>> Mat
>>
>> On Tue, Nov 3, 2015 at 12:12 PM, SevenBits <sevenbitstech@gmail.com>
>> wrote:
>>
>> On Tuesday, November 3, 2015, Mat Troi <mattroisang@gmail.com> wrote:
>>>
>>> Hi,
>>>>
>>>> Searching through google, I see there was an email thread to add a patch
>>>> for getting and setting efi variable in GRUB2.
>>>> https://lists.gnu.org/archive/html/grub-devel/2013-11/msg00328.html
>>>>
>>>> However, looking at the tree, it doesn't look like this patch was added,
>>>> am I missing something?  Does anyone know if we have command to get/set
>>>> efi
>>>> variables in GRUB2?
>>>>
>>>>
>>>>
>>>> http://git.savannah.gnu.org/gitweb/?p=grub.git;a=tree;f=grub-core/commands/efi;h=005fd2efc9a2eede2a1eb1cab8081c360219107b;hb=HEAD
>>>>
>>>>
>>>> I'm the author of that patch. No, it was never merged into the tree. As
>>> far as I know, there is no equivalent functionality; GRUB does not
>>> support
>>> this feature.
>>>
>>>
>>> Thanks,
>>>> Mat
>>>>
>>>>
>>> _______________________________________________
>>> Grub-devel mailing list
>>> Grub-devel@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>
>>>
>>>
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 5385 bytes --]

  reply	other threads:[~2015-11-05 18:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03 19:39 Grub get and set efi variables Mat Troi
2015-11-03 20:12 ` SevenBits
2015-11-03 23:05   ` Mat Troi
2015-11-04  5:38     ` Andrei Borzenkov
2015-11-05 18:25       ` SevenBits [this message]
2015-11-06  2:00         ` Ignat Korchagin
2015-11-11 18:09           ` Andrei Borzenkov
2015-11-13 19:34             ` Ignat Korchagin
2015-11-13 19:42               ` Ignat Korchagin
2015-11-14  4:03                 ` Andrei Borzenkov
2015-11-17 11:48                   ` Ignat Korchagin
2015-11-29  8:57                     ` Andrei Borzenkov
2015-11-24 19:23                   ` Mat Troi
2015-11-24 20:48                     ` Seth Goldberg
2015-11-27 14:07                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-11-27 14:25                     ` Ignat Korchagin
2015-11-29  9:00                       ` Andrei Borzenkov
2015-12-02 12:53                         ` Ignat Korchagin
2015-12-02 13:00                           ` Andrei Borzenkov
2015-12-02 13:05                             ` Vladimir 'phcoder' Serbinenko
2015-12-02 14:52                               ` Ignat Korchagin
2015-12-03 16:43                                 ` Andrei Borzenkov
2015-12-03 17:19                                   ` Ignat Korchagin
2015-12-09 14:42                                     ` Ignat Korchagin
2015-12-12  8:36                                     ` Andrei Borzenkov
2015-12-14 11:08                                       ` Ignat Korchagin
2015-12-14 11:17                                         ` Ignat Korchagin
2016-01-29 16:25                                           ` Ignat Korchagin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKCeAn-6deosYohUDGnwR6JimC7YWhOzFJi=ovyJ=14GJn2QeA@mail.gmail.com' \
    --to=sevenbitstech@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.