From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Sang-Heon Jeon <ekffu200098@gmail.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] Revert "tpm: do not ignore memblock_reserve return value"
Date: Wed, 17 Jun 2026 03:29:56 +0900 [thread overview]
Message-ID: <20260616182959.2429774-6-ekffu200098@gmail.com> (raw)
In-Reply-To: <20260616182959.2429774-1-ekffu200098@gmail.com>
This reverts commit c33c28f9f6e017702374e1ab907dfa5a63db5301.
efi_tpm_eventlog_init() runs from efi_config_parse_tables() during early
EFI initialization, before memblock_allow_resize(). At that point
memblock_reserve() either succeeds or panics, never returning an error.
Therefore the return value check is unreachable, so restore the original
unconditional memblock_reserve().
No functional change.
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
drivers/firmware/efi/tpm.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c
index cdd431027065..288bcf7a5b99 100644
--- a/drivers/firmware/efi/tpm.c
+++ b/drivers/firmware/efi/tpm.c
@@ -61,12 +61,7 @@ int __init efi_tpm_eventlog_init(void)
}
tbl_size = sizeof(*log_tbl) + log_tbl->size;
- if (memblock_reserve(efi.tpm_log, tbl_size)) {
- pr_err("TPM Event Log memblock reserve fails (0x%lx, 0x%x)\n",
- efi.tpm_log, tbl_size);
- ret = -ENOMEM;
- goto out;
- }
+ memblock_reserve(efi.tpm_log, tbl_size);
if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR) {
pr_info("TPM Final Events table not present\n");
--
2.43.0
prev parent reply other threads:[~2026-06-16 18:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 18:29 [PATCH 0/5] treewide: remove unreachable memblock_reserve() return value checks in early boot Sang-Heon Jeon
2026-06-16 18:29 ` Sang-Heon Jeon [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=20260616182959.2429774-6-ekffu200098@gmail.com \
--to=ekffu200098@gmail.com \
--cc=ardb@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox