All of lore.kernel.org
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 8/9] efi_loader: rework bootmgr/bootefi using load_image API
Date: Mon, 22 Apr 2019 09:44:33 +0900	[thread overview]
Message-ID: <20190422004432.GZ7158@linaro.org> (raw)
In-Reply-To: <ea345a76-9798-ed5a-c978-2a4f668f0894@gmx.de>

On Sat, Apr 20, 2019 at 10:07:20AM +0200, Heinrich Schuchardt wrote:
> On 4/19/19 5:22 AM, AKASHI Takahiro wrote:
> >+	/*
> >+	 * FIXME: Who is responsible for
> >+	 *	free(loaded_image_info->load_options);
> >+	 * Once efi_exit() is implemented correctly,
> >+	 * handle itself doesn't exist here.
> >+	 */
> 
> Load option can only be freed when the image is unloaded. For
> applications that will happen when the application call Exit(). For
> drivers there is not guarantee that they will be ever unloaded.

Should we be able to utilize "bootargs" even for drivers?

> In Unload() we should not free load options if they were not allocated
> by us but by an EFI binary.
> 
> In your implementation you have allocated the load options via calloc()
> and not from the EFI pool. So this may allow us to determine whether we
> allocated the load options in the Unload() service.

DO you mean:
    efi_unload_image(...)
        ret = EFI_CALL(efi_pool_free(info->load_options));
        if (ret != EFI_SUCCESS)
        /*
         * Don't care, assuming that load_options have been allocated
         * by application.
         */

It looks fragile.

-Takahiro Akashi

> Best regards
> 
> Heinrich

  reply	other threads:[~2019-04-22  0:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19  3:22 [U-Boot] [PATCH 0/9] efi_loader: rework bootefi/bootmgr AKASHI Takahiro
2019-04-19  3:22 ` [U-Boot] [PATCH 1/9] cmd: bootefi: rework set_load_options() AKASHI Takahiro
2019-04-19  3:37   ` Heinrich Schuchardt
2019-04-19  3:22 ` [U-Boot] [PATCH 2/9] cmd: bootefi: carve out fdt handling from do_bootefi() AKASHI Takahiro
2019-04-19  3:43   ` Heinrich Schuchardt
2019-04-19  3:22 ` [U-Boot] [PATCH 3/9] cmd: bootefi: merge efi_install_fdt() and efi_process_fdt() AKASHI Takahiro
2019-04-19  4:06   ` Heinrich Schuchardt
2019-04-19  4:42     ` AKASHI Takahiro
2019-04-19  3:22 ` [U-Boot] [PATCH 4/9] cmd: bootefi: carve out efi_selftest code from do_bootefi() AKASHI Takahiro
2019-04-20  6:57   ` Heinrich Schuchardt
2019-04-19  3:22 ` [U-Boot] [PATCH 5/9] cmd: bootefi: move do_bootefi_bootmgr_exec() forward AKASHI Takahiro
2019-04-19  3:22 ` [U-Boot] [PATCH 6/9] cmd: bootefi: carve out bootmgr code from do_bootefi() AKASHI Takahiro
2019-04-20  7:47   ` Heinrich Schuchardt
2019-04-19  3:22 ` [U-Boot] [PATCH 7/9] cmd: bootefi: carve out do_bootefi_image() " AKASHI Takahiro
2019-04-19  3:22 ` [U-Boot] [PATCH 8/9] efi_loader: rework bootmgr/bootefi using load_image API AKASHI Takahiro
2019-04-20  8:07   ` Heinrich Schuchardt
2019-04-22  0:44     ` AKASHI Takahiro [this message]
2019-04-20  8:37   ` Heinrich Schuchardt
2019-04-20 17:37     ` Heinrich Schuchardt
2019-04-22  0:36       ` AKASHI Takahiro
2019-04-20 18:24     ` Heinrich Schuchardt
2019-04-22  1:05     ` AKASHI Takahiro
2019-04-21  7:02   ` Heinrich Schuchardt
2019-04-19  3:22 ` [U-Boot] [PATCH 9/9] cmd: add efibootmgr command AKASHI Takahiro
2019-04-20  8:49   ` Heinrich Schuchardt
2019-04-22 18:16 ` [U-Boot] [PATCH 0/9] efi_loader: rework bootefi/bootmgr Heinrich Schuchardt
2019-04-23  0:24   ` AKASHI, Takahiro
2019-04-23  4:57     ` Heinrich Schuchardt
2019-04-23  5:08       ` AKASHI, Takahiro
2020-01-03  0:17 ` Heinrich Schuchardt
2020-01-06  1:42   ` AKASHI Takahiro

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=20190422004432.GZ7158@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=u-boot@lists.denx.de \
    /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.