grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 6/8] efi/efinet: Don't close connections at fini_hw() time


From: Heinrich Schuchardt
Subject: Re: [PATCH v3 6/8] efi/efinet: Don't close connections at fini_hw() time
Date: Fri, 2 Sep 2022 12:35:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1

On 8/18/22 16:51, Ard Biesheuvel wrote:
When GRUB runs on top of EFI firmware, it only has access to block and
network device abstractions exposed by the firmware, and it is up to the
firmware to quiesce the underlying hardware when handing over to the OS.

I guess you refer to ExitBootServices() here.


This is especially important for network devices, to prevent incoming
packets from being DMA'd straight into memory after the OS has taken
over but before it has managed to reconfigure the network hardware.

This is even more true considering that an EFI binary started by GRUB may return to GRUB and the user expects that all commands in the console are still usable.


GRUB handles this by means of the grub_net_fini_hw() preboot hook, which
is executed before calling into the booted image. This means that all
network devices disappear or become inoperable before the EFI stub
executes on EFI targeted builds. This is problematic as it prevents the
EFI stub from calling back into GRUB provided protocols such as
LoadFile2 for the initrd, which we will provide in a subsequent patch.

So add a flag that indicates to the network core that EFI network
devices should not be closed when grub_net_fini_hw() is called.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>



reply via email to

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