[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1xhaxBc+N=VXRDZyjUQ+W+=fkeDTUcZqeorsyDCTewZg@mail.gmail.com>
Date: Thu, 13 Jun 2019 14:40:35 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Bartosz Szczepanek <bsz@...ihalf.com>
Cc: Qian Cai <cai@....pw>, Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Matthew Garrett <mjg59@...gle.com>,
linux-efi <linux-efi@...r.kernel.org>,
Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] efi/tpm: fix a compilation warning
On Thu, Jun 13, 2019 at 1:41 PM Bartosz Szczepanek <bsz@...ihalf.com> wrote:
>
> On Thu, Jun 13, 2019 at 10:55 AM Arnd Bergmann <arnd@...db.de> wrote:
> >
> > - efi.tpm_final_log is a physical address that gets passed into
> > memremap() to return a pointer
> > - tpm2_calc_event_log_size() takes a pointer argument and
> > dereferences it.
>
> Where does it? It's passed with some added offset to
> __calc_tpm2_event_size, which does the remapping part. That's why
> physical address is used here.
Ah, right. I was confused by how __calc_tpm2_event_size()
may or may not do the mapping again based on the 'bool do_mapping'
argument, which is 'true' here.
Would it be correct to change that to 'false' then (or completely remove
the additional remap, given that the other two callers pass false
already) and pass final_tbl?
Arnd
Powered by blists - more mailing lists