mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: Ard Biesheuvel <ardb@kernel.org>,
	linux-integrity <linux-integrity@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Peter Huewe <peterhuewe@gmx.de>
Subject: Re: [PATCH] tpm: of: avoid __va() translation for event log address
Date: Fri, 25 Sep 2020 09:00:18 -0300	[thread overview]
Message-ID: <20200925120018.GH9916@ziepe.ca> (raw)
In-Reply-To: <20200925102920.GA180915@linux.intel.com>

On Fri, Sep 25, 2020 at 01:29:20PM +0300, Jarkko Sakkinen wrote:
> On Fri, Sep 25, 2020 at 09:00:56AM +0200, Ard Biesheuvel wrote:
> > On Fri, 25 Sep 2020 at 07:56, Jarkko Sakkinen
> > <jarkko.sakkinen@linux.intel.com> wrote:
> > >
> > > On Tue, Sep 22, 2020 at 11:41:28AM +0200, Ard Biesheuvel wrote:
> > > > The TPM event log is provided to the OS by the firmware, by loading
> > > > it into an area in memory and passing the physical address via a node
> > > > in the device tree.
> > > >
> > > > Currently, we use __va() to access the memory via the kernel's linear
> > > > map: however, it is not guaranteed that the linear map covers this
> > > > particular address, as we may be running under HIGHMEM on a 32-bit
> > > > architecture, or running firmware that uses a memory type for the
> > > > event log that is omitted from the linear map (such as EfiReserved).
> > >
> > > Makes perfect sense to the level that I wonder if this should have a
> > > fixes tag and/or needs to be backported to the stable kernels?
> > >
> > 
> > AIUI, the code was written specifically for ppc64, which is a
> > non-highmem, non-EFI architecture. However, when we start reusing this
> > driver for ARM, this issue could pop up.
> > 
> > The code itself has been refactored a couple of times, so I think it
> > will require different versions of the patch for different generations
> > of stable kernels.
> > 
> > So perhaps just add Cc: <stable@vger.kernel.org>, and wait and see how
> > far back it applies cleanly?
> 
> Yeah, I think I'll cc it with some note before the diffstat.
> 
> I'm thinking to cap it to only 5.x kernels (at least first) unless it is
> dead easy to backport below that.

I have this vauge recollection of pointing at this before and being
told that it had to be __va for some PPC reason?

Do check with the PPC people first, I see none on the CC list.

Jason

  reply	other threads:[~2020-09-25 12:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22  9:41 Ard Biesheuvel
2020-09-25  5:56 ` Jarkko Sakkinen
2020-09-25  5:57   ` Jarkko Sakkinen
2020-09-25  7:00   ` Ard Biesheuvel
2020-09-25 10:29     ` Jarkko Sakkinen
2020-09-25 12:00       ` Jason Gunthorpe [this message]
2020-09-27 23:44         ` Jarkko Sakkinen
2020-09-28  5:56           ` Christophe Leroy
2020-09-28  6:20             ` Ard Biesheuvel
2020-09-28 14:09               ` 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=20200925120018.GH9916@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=ardb@kernel.org \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®