From: Matthew Garrett <mjg59@google.com>
To: David Laight <David.Laight@aculab.com>
Cc: "linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>,
"peterhuewe@gmx.de" <peterhuewe@gmx.de>,
"jarkko.sakkinen@linux.intel.com"
<jarkko.sakkinen@linux.intel.com>, "jgg@ziepe.ca" <jgg@ziepe.ca>,
"roberto.sassu@huawei.com" <roberto.sassu@huawei.com>,
"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
"linux-security-module@vger.kernel.org"
<linux-security-module@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"tweek@google.com" <tweek@google.com>
Subject: Re: [PATCH 1/2] efi: Fix cast to pointer from integer of different size in TPM log code
Date: Wed, 3 Apr 2019 09:51:54 -0700 [thread overview]
Message-ID: <CACdnJusiCSH93cz+Q3yH01HBfDbVRQdO6JNCNOJwqt9Uqj_Qsw@mail.gmail.com> (raw)
In-Reply-To: <89e1cf4093d7405987c55f682519f9fc@AcuMS.aculab.com>
On Wed, Apr 3, 2019 at 6:41 AM David Laight <David.Laight@aculab.com> wrote:
>
> From: Matthew Garrett
> > Sent: 02 April 2019 22:56
> >
> > 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.
>
> Casting a physical address to 'void *' seems completely wrong.
> Also you'd need a guarantee that the address was below 4G or the result
> is meaningless.
> Looks to me like something is using the wrong types somewhere.
We're in UEFI here, not the kernel proper - the firmware functions we
call give us back physical addresses, and we're operating with a 1:1
mapping. long is 64 bit on 64 bit systems, and on 32 bit systems we've
already asserted that all firmware resources are under 4GB (obviously
we're going to have a bad time if they're not, but there's not really
anything we can do about that)
next prev parent reply other threads:[~2019-04-03 16:52 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 ` [PATCH 1/2] efi: Fix cast to pointer from integer of different size in TPM log code Matthew Garrett
2019-04-03 13:42 ` David Laight
2019-04-03 16:51 ` Matthew Garrett [this message]
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=CACdnJusiCSH93cz+Q3yH01HBfDbVRQdO6JNCNOJwqt9Uqj_Qsw@mail.gmail.com \
--to=mjg59@google.com \
--cc=David.Laight@aculab.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=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).