All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: vincent.stehle@arm.com, u-boot@lists.u-boot-project.org,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Sughosh Ganu <sughosh.ganu@arm.com>, Udit Kumar <u-kumar1@ti.com>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>
Subject: Re: [PATCH v2 2/2] efi_selftest: add minimal fmp test
Date: Sat, 3 Oct 2026 09:23:53 -0600	[thread overview]
Message-ID: <20261003152353.GA82153@bill-the-cat> (raw)
In-Reply-To: <CAFLszTh8mPZRmvY3zNwtj2Qi5sAi9SJ2Zo_HU20eUXyLk__U9A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1913 bytes --]

On Sat, Oct 03, 2026 at 06:40:04AM +0100, Simon Glass wrote:
> Hi Vincent,
> 
> On 2026-10-02T08:37:46, Vincent Stehlé <vincent.stehle@arm.com> wrote:
> > efi_selftest: add minimal fmp test
> >
> > Add a minimal test for the UEFI Firmware Management Protocol.
> > At this point the test only does the following:
> >
> > For all handles in the system with FMP,
> > - Get current firmware images info.
> > - For each image, verify consistency of the flags, with some attention to
> >   authentication.
> >
> > This can be tested on the sandbox with the following command:
> >
> >   ./u-boot -T -c "setenv efi_selftest firmware management protocol; \
> >                   bootefi selftest"
> >
> > Testing with multiple handles supporting FMP can be done by enabling
> > both CONFIG_EFI_CAPSULE_FIRMWARE_FIT and
> > CONFIG_EFI_CAPSULE_FIRMWARE_RAW.
> >
> > Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
> > [...]
> >
> > lib/efi_selftest/Makefile           |   2 +
> >  lib/efi_selftest/efi_selftest_fmp.c | 240 ++++++++++++++++++++++++++++++++++++
> >  2 files changed, 242 insertions(+)
> 
> > diff --git a/lib/efi_selftest/efi_selftest_fmp.c b/lib/efi_selftest/efi_selftest_fmp.c
> > @@ -0,0 +1,240 @@
> > +     if (desc_size < sizeof(struct efi_firmware_image_descriptor) ||
> > +         __builtin_mul_overflow(desc_size, desc_cnt, &total_size) ||
> > +         total_size > img_info_size) {
> 
> Please can you use check_mul_overflow() from <linux/overflow.h> rather
> than the builtin? Nothing else in lib/efi_selftest or lib/efi_loader
> uses the builtin directly.

Importing that header first and making use of it more widely second
would be a reasonable thing for a backlog / TODO list for someone. As
Rasmus is the original author in Linux, it might even be on his list
somewhere (along with re-syncing the related compiler header parts).

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2026-10-03 15:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 14:58 [PATCH 0/2] efi: fix and test FMP image info authentication attribute Vincent Stehlé
2026-09-22 14:58 ` [PATCH 1/2] efi_loader: fix " Vincent Stehlé
2026-10-01  1:31   ` Simon Glass
2026-10-01 12:37   ` Ilias Apalodimas
2026-09-22 14:58 ` [PATCH 2/2] efi_selftest: add minimal fmp test Vincent Stehlé
2026-10-01  1:31   ` Simon Glass
2026-10-01 15:46     ` Vincent Stehlé
2026-10-01 13:55   ` Heinrich Schuchardt
2026-10-02  9:26     ` Vincent Stehlé
2026-10-02 14:39       ` Heinrich Schuchardt
2026-10-02  8:37 ` [PATCH v2 0/2] efi: fix and test FMP image info authentication attribute Vincent Stehlé
2026-10-02  8:37   ` [PATCH v2 1/2] efi_loader: fix " Vincent Stehlé
2026-10-03  5:39     ` Simon Glass
2026-10-08 10:33     ` Ilias Apalodimas
2026-10-02  8:37   ` [PATCH v2 2/2] efi_selftest: add minimal fmp test Vincent Stehlé
2026-10-03  5:40     ` Simon Glass
2026-10-03 15:23       ` Tom Rini [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=20261003152353.GA82153@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=sjg@chromium.org \
    --cc=sughosh.ganu@arm.com \
    --cc=u-boot@lists.u-boot-project.org \
    --cc=u-kumar1@ti.com \
    --cc=vincent.stehle@arm.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.