Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1391772

Re: [tip:efi/core] efibc: Add EFI Bootloader Control module

From Ard Biesheuvel <ard.biesheuvel@linaro.org>
Newsgroups linux.kernel
Subject Re: [tip:efi/core] efibc: Add EFI Bootloader Control module
Date 2016-05-01 10:10 +0200
Message-ID <rtUBY-6bC-3@gated-at.bofh.it> (permalink)
References <rrV99-3ni-41@gated-at.bofh.it> <rsRGa-1DA-15@gated-at.bofh.it> <rtdnk-3Gu-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 29 April 2016 at 11:53, Ingo Molnar <mingo@kernel.org> wrote:
>
> * tip-bot for Compostella, Jeremy <tipbot@zytor.com> wrote:
>
>> Commit-ID:  06f7d4a1618dbb086e738c93cd1ef416ab01027d
>> Gitweb:     http://git.kernel.org/tip/06f7d4a1618dbb086e738c93cd1ef416ab01027d
>> Author:     Compostella, Jeremy <jeremy.compostella@intel.com>
>> AuthorDate: Mon, 25 Apr 2016 21:06:57 +0100
>> Committer:  Ingo Molnar <mingo@kernel.org>
>> CommitDate: Thu, 28 Apr 2016 11:34:02 +0200
>>
>> efibc: Add EFI Bootloader Control module
>>
>> This module installs a reboot callback, such that if reboot() is invoked
>> with a string argument NNN, "NNN" is copied to the "LoaderEntryOneShot"
>> EFI variable, to be read by the bootloader.
>

Apologies for only mentioning this now, but I wonder why we need this
in the kernel in the first place? The UEFI spec defines 'BootNext' as
the way to set the boot entry for the next boot only, and this could
also be set from userland. (i.e., the agent that knows how to invoke
reboot with this particular string argument could simply set the EFI
variable from userspace)

As far as reboot/shutdown is concerned, there is a ResetSystem()
runtime service which reboots via the UEFI firmware, which seems like
a better place to record the reboot/shutdown value.

So what bootloader is this exactly that requires this?

Thanks,
Ard.


>>  drivers/firmware/efi/Kconfig  |  15 +++++++
>>  drivers/firmware/efi/Makefile |   1 +
>>  drivers/firmware/efi/efibc.c  | 101 ++++++++++++++++++++++++++++++++++++++++++
>>  include/linux/efi.h           |   4 ++
>>  4 files changed, 121 insertions(+)
>
> So this bloated things a bit on 32-bit x86 allyesconfig kernels, we now have this
> new warning:
>
>   drivers/firmware/efi/efibc.c:53:1: warning: the frame size of 2256 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>
> 2K of stack use for a function is quite excessive, can we improve the stack
> footprint of this code?
>
> Thanks,
>
>         Ingo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[tip:efi/core] efibc: Add EFI Bootloader Control module "tip-bot for Compostella, Jeremy" <tipbot@zytor.com> - 2016-04-28 12:50 +0200
  Re: [tip:efi/core] efibc: Add EFI Bootloader Control module Ingo Molnar <mingo@kernel.org> - 2016-04-29 12:00 +0200
    Re: [tip:efi/core] efibc: Add EFI Bootloader Control module Matt Fleming <matt@codeblueprint.co.uk> - 2016-04-29 12:40 +0200
      Re: [tip:efi/core] efibc: Add EFI Bootloader Control module jeremy.compostella@intel.com (Compostella, Jeremy) - 2016-04-29 13:40 +0200
        Re: [tip:efi/core] efibc: Add EFI Bootloader Control module Matt Fleming <matt@codeblueprint.co.uk> - 2016-04-29 14:20 +0200
          Re: [tip:efi/core] efibc: Add EFI Bootloader Control module jeremy.compostella@intel.com (Compostella, Jeremy) - 2016-04-29 16:00 +0200
            Re: [tip:efi/core] efibc: Add EFI Bootloader Control module Ingo Molnar <mingo@kernel.org> - 2016-04-29 21:50 +0200
              Re: [tip:efi/core] efibc: Add EFI Bootloader Control module jeremy.compostella@intel.com (Compostella, Jeremy) - 2016-04-30 10:40 +0200
                Re: [tip:efi/core] efibc: Add EFI Bootloader Control module Matt Fleming <matt@codeblueprint.co.uk> - 2016-04-30 22:10 +0200
            Re: [tip:efi/core] efibc: Add EFI Bootloader Control module Matt Fleming <matt@codeblueprint.co.uk> - 2016-04-30 22:10 +0200
              Re: [tip:efi/core] efibc: Add EFI Bootloader Control module jeremy.compostella@intel.com (Compostella, Jeremy) - 2016-05-02 10:00 +0200
                Re: [tip:efi/core] efibc: Add EFI Bootloader Control module Matt Fleming <matt@codeblueprint.co.uk> - 2016-05-03 16:50 +0200
    Re: [tip:efi/core] efibc: Add EFI Bootloader Control module Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-05-01 10:10 +0200
      Re: [tip:efi/core] efibc: Add EFI Bootloader Control module Matt Fleming <matt@codeblueprint.co.uk> - 2016-05-01 15:20 +0200

csiph-web