All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergio Prado <sergio.prado@e-labworks.com>
To: u-boot@lists.denx.de
Cc: trini@konsulko.com, sjg@chromium.org, alpernebiyasak@gmail.com,
	marek.vasut+renesas@mailbox.org, ilias.apalodimas@linaro.org,
	pbrobinson@gmail.com, sughosh.ganu@arm.com,
	sergio.prado@e-labworks.com, wolfgang.wallner@at.abb.com,
	xypron.glpk@gmx.de, quentin.schulz@cherry.de,
	jj251510319013@gmail.com, Wojciech.Dubowik@mt.com
Subject: [PATCH v6 3/5] binman: ti_secure: drop the redundant keyfile re-read
Date: Tue, 28 Jul 2026 08:35:33 -0300	[thread overview]
Message-ID: <20260728113535.128601-4-sergio.prado@e-labworks.com> (raw)
In-Reply-To: <20260728113535.128601-1-sergio.prado@e-labworks.com>

Entry_ti_secure and Entry_ti_secure_rom both call super().ReadNode() and
then read the 'keyfile' entry argument a second time, with exactly the
call that Entry_x509_cert.ReadNode() has already made. The second read is
pure duplication, and it means anything the parent does to
self.key_fname is silently discarded.

Drop it, so that the subclasses use the value their parent decided on,
and drop the EntryArg import which becomes unused.

No functional change.

Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
---
 tools/binman/etype/ti_secure.py     | 3 ---
 tools/binman/etype/ti_secure_rom.py | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/tools/binman/etype/ti_secure.py b/tools/binman/etype/ti_secure.py
index f6caa0286d97..705a05342a85 100644
--- a/tools/binman/etype/ti_secure.py
+++ b/tools/binman/etype/ti_secure.py
@@ -5,7 +5,6 @@
 
 # Support for generation of TI secured binary blobs
 
-from binman.entry import EntryArg
 from binman.etype.x509_cert import Entry_x509_cert
 from dataclasses import dataclass
 
@@ -110,8 +109,6 @@ class Entry_ti_secure(Entry_x509_cert):
 
     def ReadNode(self):
         super().ReadNode()
-        self.key_fname = self.GetEntryArgsOrProps([
-            EntryArg('keyfile', str)], required=True)[0]
         auth_in_place = fdt_util.GetInt(self._node, 'auth-in-place')
         if auth_in_place:
             self.firewall_cert_data['auth_in_place'] = auth_in_place
diff --git a/tools/binman/etype/ti_secure_rom.py b/tools/binman/etype/ti_secure_rom.py
index 7e90c6559409..f1bc9e7577e6 100644
--- a/tools/binman/etype/ti_secure_rom.py
+++ b/tools/binman/etype/ti_secure_rom.py
@@ -5,7 +5,6 @@
 
 # Support for generation of TI secured bootloaders booted by ROM
 
-from binman.entry import EntryArg
 from binman.etype.x509_cert import Entry_x509_cert
 
 import hashlib
@@ -71,8 +70,6 @@ class Entry_ti_secure_rom(Entry_x509_cert):
         self.sha = fdt_util.GetInt(self._node, 'sha', 512)
         self.core = fdt_util.GetString(self._node, 'core', 'secure')
         self.bootcore_opts = fdt_util.GetInt(self._node, 'core-opts')
-        self.key_fname = self.GetEntryArgsOrProps([
-            EntryArg('keyfile', str)], required=True)[0]
         if self.combined:
             self.sysfw_inner_cert = fdt_util.GetBool(self._node, 'sysfw-inner-cert', False)
             self.load_addr_sysfw = fdt_util.GetInt(self._node, 'load-sysfw', 0x00000000)
-- 
2.34.1


  parent reply	other threads:[~2026-07-28 11:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4LN_e4Mi0TK99Phw-qnFJv5fIiv9tloFlexssVWY2btc8KqK4_JhOcNLziBlaQYe1fRY5-gnFHrYEYQjBOTiPw==@protonmail.internalid>
2026-07-28 11:35 ` [PATCH v6 0/5] binman: add PKCS#11/HSM signing support for X509 certificates Sergio Prado
2026-07-28 11:35   ` [PATCH v6 1/5] binman: x509_cert: document Entry_x509_cert properties Sergio Prado
2026-07-28 11:35   ` [PATCH v6 2/5] binman: x509_cert: document PKCS#11 URI support in keyfile Sergio Prado
2026-08-05 18:57     ` Simon Glass
2026-07-28 11:35   ` Sergio Prado [this message]
2026-08-05 18:58     ` [PATCH v6 3/5] binman: ti_secure: drop the redundant keyfile re-read Simon Glass
2026-08-07 13:19       ` Sergio Prado
2026-07-28 11:35   ` [PATCH v6 4/5] binman: x509_cert: support PKCS11_PIN environment variable Sergio Prado
2026-08-05 18:58     ` Simon Glass
2026-07-28 11:35   ` [PATCH v6 5/5] binman: Add BINMAN_X509_KEYFILE to override the signing key Sergio Prado
2026-08-05 18:58     ` Simon Glass
2026-07-28 14:40   ` [PATCH v6 0/5] binman: add PKCS#11/HSM signing support for X509 certificates Rasmus Villemoes via U-Boot

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=20260728113535.128601-4-sergio.prado@e-labworks.com \
    --to=sergio.prado@e-labworks.com \
    --cc=Wojciech.Dubowik@mt.com \
    --cc=alpernebiyasak@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jj251510319013@gmail.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=pbrobinson@gmail.com \
    --cc=quentin.schulz@cherry.de \
    --cc=sjg@chromium.org \
    --cc=sughosh.ganu@arm.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=wolfgang.wallner@at.abb.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.