All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Sam Protsenko <semen.protsenko@linaro.org>,
	Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>
Cc: Mattijs Korpershoek <mkorpershoek@kernel.org>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Jerome Forissier <jerome.forissier@linaro.org>,
	u-boot@lists.denx.de
Subject: Re: [PATCH] bootstd: Fix bootflow info for efi_mgr
Date: Thu, 09 Oct 2025 13:27:05 +0200	[thread overview]
Message-ID: <87cy6wwc1i.fsf@kernel.org> (raw)
In-Reply-To: <20251003222714.4921-1-semen.protsenko@linaro.org>

Hi Sam,

Thank you for the patch.

On Fri, Oct 03, 2025 at 17:27, Sam Protsenko <semen.protsenko@linaro.org> wrote:

> A "Synchronous Abort" CPU exception happens on an attempt to run the
> "bootflow info" command for a global boot method (e.g. efi_mgr):
>
>     => bootflow select 0
>     => bootflow info
>
>     "Synchronous Abort" handler, esr 0x96000006, far 0x8
>
> It happens because do_bootflow_info() tries to dereference bflow->dev,
> which is NULL in case of efi_mgr. Add the corresponding check to prevent
> this NULL pointer dereference and make "bootflow info" command work
> properly for global boot methods.
>
> Fixes: 2d653f686b6d ("bootstd: Add a bootflow command")
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>

> ---
>  cmd/bootflow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cmd/bootflow.c b/cmd/bootflow.c
> index 551dffbb8b89..081f64e12ce9 100644
> --- a/cmd/bootflow.c
> +++ b/cmd/bootflow.c
> @@ -404,7 +404,7 @@ static int do_bootflow_info(struct cmd_tbl *cmdtp, int flag, int argc,
>  	}
>  
>  	printf("Name:      %s\n", bflow->name);
> -	printf("Device:    %s\n", bflow->dev->name);
> +	printf("Device:    %s\n", bflow->dev ? bflow->dev->name : "(none)");
>  	printf("Block dev: %s\n", bflow->blk ? bflow->blk->name : "(none)");
>  	printf("Method:    %s\n", bflow->method->name);
>  	printf("State:     %s\n", bootflow_state_get_name(bflow->state));
>
> base-commit: d33b21b7e261691e8d6613a24cc9b0ececba3b01
> -- 
> 2.39.5

  parent reply	other threads:[~2025-10-09 11:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-03 22:27 [PATCH] bootstd: Fix bootflow info for efi_mgr Sam Protsenko
2025-10-06 20:40 ` Simon Glass
2025-10-07 19:32   ` Sam Protsenko
2025-10-07 19:48     ` Tom Rini
2025-10-08 12:53     ` Simon Glass
2025-10-09 11:27 ` Mattijs Korpershoek [this message]
2025-10-14 14:20 ` Tom Rini

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=87cy6wwc1i.fsf@kernel.org \
    --to=mkorpershoek@kernel.org \
    --cc=jerome.forissier@linaro.org \
    --cc=semen.protsenko@linaro.org \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.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.