linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: Mike Rapoport <rppt@kernel.org>
Cc: Jessica Clarke <jrtc27@jrtc27.com>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Tony Luck <tony.luck@intel.com>,
	linux-ia64@vger.kernel.org, Anatoly Pugachev <matorola@gmail.com>,
	Sergei Trofimovich <slyfox@gentoo.org>,
	linux-mm@kvack.org, Frank Scheiner <frank.scheiner@web.de>
Subject: Re: [PATCH v5] arch/ia64: Restore arch-specific pgd_offset_k implementation
Date: Mon, 17 Aug 2020 10:33:33 +0300	[thread overview]
Message-ID: <20200817073333.GK969206@linux.ibm.com> (raw)
In-Reply-To: <20200813205521.5405-1-rppt@kernel.org>

On Thu, Aug 13, 2020 at 11:55:21PM +0300, Mike Rapoport wrote:
> From: Jessica Clarke <jrtc27@jrtc27.com>
> 
> IA-64 is special and treats pgd_offset_k() differently to pgd_offset(),
> using different formulae to calculate the indices into the kernel and user
> PGDs.  The index into the user PGDs takes into account the region number,
> but the index into the kernel (init_mm) PGD always assumes a predefined
> kernel region number. Commit 974b9b2c68 ("mm: consolidate pte_index() and
> pte_offset_*() definitions") made IA-64 use a generic pgd_offset_k() which
> incorrectly used pgd_index() for kernel page tables.  As a result, the
> index into the kernel PGD was going out of bounds and the kernel hung
> during early boot.
> 
> Allow overrides of pgd_offset_k() and override it on IA-64 with the old
> implementation that will correctly index the kernel PGD.
> 
> Fixes: 974b9b2c68 ("mm: consolidate pte_index() and pte_offset_*() definitions")
> Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> ---
> Changes in v4:
> * Correct the comment that I missed in v4 :(
> 
> Changes since v3:
> * Correct commit message as Jessica suggested
> 
> Changes since v2:
> * Rephrase commit message and comment about pgd_offset_k()
> 
> Changes since v1:
>  * Fixed typo in commit message
>  * Slightly reworded commit message to sound less weird
>  * Included Adrian's Tested-by
>  arch/ia64/include/asm/pgtable.h | 9 +++++++++
>  include/linux/pgtable.h         | 2 ++
>  2 files changed, 11 insertions(+)

I can take this via my tree if there are no objections.

Tony?

-- 
Sincerely yours,
Mike.


  parent reply	other threads:[~2020-08-17  7:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13 20:55 [PATCH v5] arch/ia64: Restore arch-specific pgd_offset_k implementation Mike Rapoport
2020-08-13 21:36 ` Matthew Wilcox
2020-08-13 21:44   ` Jessica Clarke
2020-08-13 22:21   ` Mike Rapoport
2020-08-17  7:33 ` Mike Rapoport [this message]
2020-08-17 16:05   ` Luck, Tony

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=20200817073333.GK969206@linux.ibm.com \
    --to=rppt@linux.ibm.com \
    --cc=frank.scheiner@web.de \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=jrtc27@jrtc27.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matorola@gmail.com \
    --cc=rppt@kernel.org \
    --cc=slyfox@gentoo.org \
    --cc=tony.luck@intel.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).