All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>, Alexander Graf <agraf@csgraf.de>,
	 Wolfgang Wallner <wolfgang.wallner@br-automation.com>,
	 Christian Gmeiner <christian.gmeiner@gmail.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH 1/1] smbios: error handling for invalid addresses
Date: Mon, 5 Jul 2021 09:55:58 -0600	[thread overview]
Message-ID: <CAPnjgZ1kC6E4nVcQJbi17c55r4na1iTKpA0R4GgLd0SpPRud8g@mail.gmail.com> (raw)
In-Reply-To: <20210515160747.289642-1-xypron.glpk@gmx.de>

Hi Heinrich,

On Sat, 15 May 2021 at 10:08, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> SMBIOS tables only support 32bit addresses. If we don't have memory here
> handle the error gracefully:
>
> * on x86_64 fail to start U-Boot
> * during UEFI booting ignore the missing table
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  arch/x86/lib/tables.c       | 13 +++++++++++--
>  lib/efi_loader/efi_smbios.c | 15 ++++++++-------
>  lib/smbios.c                |  4 +++-
>  3 files changed, 22 insertions(+), 10 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

nit below

>
> diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c
> index 1779bb3e11..ea834a5035 100644
> --- a/arch/x86/lib/tables.c
> +++ b/arch/x86/lib/tables.c
> @@ -3,6 +3,8 @@
>   * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
>   */
>
> +#define LOG_CATEGORY LOGC_BOARD
> +
>  #include <common.h>
>  #include <bloblist.h>
>  #include <log.h>
> @@ -96,13 +98,20 @@ int write_tables(void)
>                                 return log_msg_ret("bloblist", -ENOBUFS);
>                 }
>                 rom_table_end = table->write(rom_table_start);
> -               rom_table_end = ALIGN(rom_table_end, ROM_TABLE_ALIGN);
> +               if (!rom_table_end) {
> +                       log_err("Can't create configuration table %d\n", i);
> +                       return -EINTR;

I think the function comments needs an update for the new error.

Regards

,Simon

      reply	other threads:[~2021-07-05 15:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-15 16:07 [PATCH 1/1] smbios: error handling for invalid addresses Heinrich Schuchardt
2021-07-05 15:55 ` Simon Glass [this message]

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=CAPnjgZ1kC6E4nVcQJbi17c55r4na1iTKpA0R4GgLd0SpPRud8g@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=agraf@csgraf.de \
    --cc=bmeng.cn@gmail.com \
    --cc=christian.gmeiner@gmail.com \
    --cc=u-boot@lists.denx.de \
    --cc=wolfgang.wallner@br-automation.com \
    --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.