All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Hugh Dickins <hughd@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] x86/boot/compressed/64: Fix moving page table out of trampoline memory
Date: Sun, 13 May 2018 23:05:41 +0300	[thread overview]
Message-ID: <20180513200541.5lywvjfoppjtivpa@black.fi.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1805132045150.1582@nanos.tec.linutronix.de>

On Sun, May 13, 2018 at 06:56:14PM +0000, Thomas Gleixner wrote:
> On Thu, 10 May 2018, Kirill A. Shutemov wrote:
> 
> > top_pgtable address has to be calculated relative to where the kernel
> > image will be relocated for decompression, not relative to position of
> > kernel is running at the moment. We do the same for the rest of page
> > table we use the stage. It makes them safe from being overwritten during
> > decompression.
> > 
> > Calculate the address of top_pgtable in assembly and pass down to
> > cleanup_trampoline().
> > 
> > Move the page table to .pgtable section where the rest of page tables
> > are. The section is @nobits so we save 4k in kernel image.
> 
> So this is supposed to be a fix, but the whole changelog talks about WHAT
> the patch does and not WHY. Darn, we need proper description of the failure
> which is about to be fixed.

"It makes them safe from being overwritten during decompression."

> It's not that hard and I'm really tired to tell you that over and over.
> 
> >  	/*
> >  	 * cleanup_trampoline() would restore trampoline memory.
> >  	 *
> > +	 * RDI is address of the page table to use instead of page table
> > +	 * in trampoline memory (if required).
> 
> Do you really believe that you understand that comment 6 month from now?

Yes, I think I will.

-- 
 Kirill A. Shutemov

      reply	other threads:[~2018-05-13 20:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 17:38 [PATCH for v4.17 0/2] Fix two crashes in decomression code Kirill A. Shutemov
2018-05-10 17:38 ` [PATCH 1/2] x86/boot/compressed/64: Set up GOT for paging_prepare() and cleanup_trampoline() Kirill A. Shutemov
2018-05-13 18:55   ` Thomas Gleixner
2018-05-13 20:03     ` Kirill A. Shutemov
2018-05-13 21:30       ` Thomas Gleixner
2018-05-10 17:38 ` [PATCH 2/2] x86/boot/compressed/64: Fix moving page table out of trampoline memory Kirill A. Shutemov
2018-05-13 18:56   ` Thomas Gleixner
2018-05-13 20:05     ` Kirill A. Shutemov [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=20180513200541.5lywvjfoppjtivpa@black.fi.intel.com \
    --to=kirill.shutemov@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.