grub-devel
[Top][All Lists]
Advanced

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

Re: Bugs and tasks for 2.02[~rc1]


From: Andrei Borzenkov
Subject: Re: Bugs and tasks for 2.02[~rc1]
Date: Fri, 11 Mar 2016 21:01:28 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

08.03.2016 00:10, Peter Jones пишет:
> On Mon, Mar 07, 2016 at 11:33:52PM +0300, Andrei Borzenkov wrote:
>> 07.03.2016 22:57, Vladimir 'phcoder' Serbinenko пишет:
>>>>
>>>>>>> I would also appreciate if distros would tell which patches they would
>>>>>>> carry if 2.02 was released as it is now. If some patches are in more
>>>> than 1
>>>>>>> distro we probably need to look into including them.
>>>>>>
>>>>>> Well, I have a bunch of patches that need to be clean up (or even
>>>>>> re-examined), and I've also got the secure-boot branch here:
>>>>>>
>>>>>> https://github.com/vathpela/grub2-fedora/tree/sb
>>>>>>
>>>>>> Which is all the patches distros should be carrying to work with Secure
>>>>>> Boot correctly.  This branch is also recently rebased against master,
>>>>>> though I'm not sure what the current thinking is regarding their path
>>>>>> upstream.
>>>>>>
>>>>>
>>>>> Personally I'd rather include support for it. I'm tired of linux vs.
>>>>> linuxefi nightmare, and patches have been in the wild long enough.
>>>>
>>>> So what's the path forward, then?  Just make all efi use linuxefi, like
>>>> linux vs linux16?  That's pretty close to what I've got already, except
>>>> on arm where it's just "linux" in EFI mode as well.  But we could make
>>>> those aliases for the same thing on that platform easily enough.  Or do
>>>> you have something else in mind?
>>>
>>> RedHat/Fedora config is too platform-dependent and platform is detected at
>>> mkconfig time rather than at runtime. This is a problem as runtime and
>>> mkconfig can be different. Case that I see often is coreboot failing due to
>>> use of Linux16 (which is a valid protocol for coreboot and is used for
>>> memtest but Linux crashes with it) but other cases exist, like enabling or
>>> disabling of SCM or moving disk to another computer. Can we fix this by
>>> introducing some helper to detect it on runtime? It can either be a
>>> function or a real command
>>>
>>
>> Yes, of course, that was what I actually mean - get rid of special
>> linuxefi and just fold processing into standard linux command. We can
>> simply always call shim protocol if available on EFI; it should return
>> success if secure boot is disabled so should be transparent.
>>
>> What is really a problem (or at least rather more involved) is
>> chainloader. If secure boot is enabled, we effectively need to implement
>> complete relocation of PE binary, bypassing EFI. I remember several
>> interesting bugs in this code in openSUSE :)
> 
> We've already got something like that (I think derived from the SuSE
> patch) here:
> https://github.com/vathpela/grub2-fedora/commit/4ea532fc9f8af1b1b23f424e3205c5eebfa8f877
> 
> I think at this point it seems to generally work.  Note that we're
> bypassing EFI for loading, but we're still calling into shim for the
> verification, so there's not a validation loophole here.
> 
>> One more thing is module load. Currently patches disable it and use only
>> modules included in core.img. I think we could relax it and allow module
>> loading from internal memory disk. This will allow distribute signed
>> image as grub-mkstanalone, making available full GRUB functionality.
> 
> I'm not seeing what this accomplishes.  We don't have major limitations
> on e.g. bootloader size on these platforms, so linking in the modules
> we're comfortable supporting the first time is not a big deal.  Maybe
> I'm just missing your point though?
> 

Modules included in image are loaded and initialized when GRUB starts;
we may not want to do it for every module (in some cases modules are
mutually exclusive). Including only selected module almost sure means
you will miss some command when you need it (I remember attempts to
debug problems on EFI and finding that none of usual lsefi & co are
present). Having them in memory disk makes full functionality available
without any unintended side effect (except slightly increased size).



reply via email to

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