From: Matthew Garrett <matthewgarrett@google.com>
To: linux-integrity@vger.kernel.org
Cc: peterhuewe@gmx.de, jarkko.sakkinen@linux.intel.com, jgg@ziepe.ca,
roberto.sassu@huawei.com, linux-efi@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, tweek@google.com,
Matthew Garrett <matthewgarrett@google.com>,
Matthew Garrett <mjg59@google.com>
Subject: [PATCH 1/2] efi: Fix cast to pointer from integer of different size in TPM log code
Date: Tue, 2 Apr 2019 14:55:55 -0700 [thread overview]
Message-ID: <20190402215556.257406-2-matthewgarrett@google.com> (raw)
In-Reply-To: <20190402215556.257406-1-matthewgarrett@google.com>
8bfcff4a6a1d9d7226bb63a7da758b82d9ab4373 introduced a cast from
efi_physical_address_t to (void *), which are different sizes on 32-bit.
Fix that. Caught by the 0-day test bot.
Signed-off-by: Matthew Garrett <mjg59@google.com>
---
drivers/firmware/efi/libstub/tpm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/efi/libstub/tpm.c b/drivers/firmware/efi/libstub/tpm.c
index b6e93e14fcf1..6b3b507a54eb 100644
--- a/drivers/firmware/efi/libstub/tpm.c
+++ b/drivers/firmware/efi/libstub/tpm.c
@@ -114,8 +114,8 @@ void efi_retrieve_tpm2_eventlog(efi_system_table_t *sys_table_arg)
*/
last_entry_size =
__calc_tpm2_event_size((void *)last_entry_addr,
- (void *)log_location,
- false);
+ (void *)(long)log_location,
+ false);
} else {
last_entry_size = sizeof(struct tcpa_event) +
((struct tcpa_event *) last_entry_addr)->event_size;
--
2.21.0.392.gf8f6787159e-goog
next prev parent reply other threads:[~2019-04-02 21:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 21:55 [PATCH] TCG2 log support build fixes for non-x86_64 Matthew Garrett
2019-04-02 21:55 ` Matthew Garrett [this message]
2019-04-03 13:42 ` [PATCH 1/2] efi: Fix cast to pointer from integer of different size in TPM log code David Laight
2019-04-03 16:51 ` Matthew Garrett
2019-04-04 12:39 ` Jarkko Sakkinen
2019-04-04 12:54 ` Ard Biesheuvel
2019-04-04 17:23 ` Matthew Garrett
2019-04-02 21:55 ` [PATCH 2/2] tpm: Fix builds on platforms that lack early_memremap() Matthew Garrett
2019-04-04 12:40 ` Jarkko Sakkinen
2019-04-04 12:40 ` [PATCH] TCG2 log support build fixes for non-x86_64 Jarkko Sakkinen
2019-04-04 17:24 ` Matthew Garrett
2019-04-15 8:47 ` Jarkko Sakkinen
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=20190402215556.257406-2-matthewgarrett@google.com \
--to=matthewgarrett@google.com \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=jgg@ziepe.ca \
--cc=linux-efi@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mjg59@google.com \
--cc=peterhuewe@gmx.de \
--cc=roberto.sassu@huawei.com \
--cc=tweek@google.com \
/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;
as well as URLs for NNTP newsgroup(s).