linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yu Zhao <yuzhao@google.com>
To: Juergen Gross <jgross@suse.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-mm@kvack.org,
	 Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	 Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Sander Eikelenboom <linux@eikelenboom.it>
Subject: Re: [PATCH] mm: introduce arch_has_hw_pmd_young()
Date: Mon, 21 Nov 2022 02:51:59 -0700	[thread overview]
Message-ID: <CAOUHufYVm4oc7JG=y3nwiLqKBBtzBMrHns=1ZNcQRSd1Rk-OFQ@mail.gmail.com> (raw)
In-Reply-To: <40c58b1b-9b90-ccd8-1387-362de236af2a@suse.com>

On Mon, Nov 21, 2022 at 2:50 AM Juergen Gross <jgross@suse.com> wrote:
>
> On 21.11.22 10:32, Juergen Gross wrote:
> > When running as a Xen PV guests commit eed9a328aa1a ("mm: x86: add
> > CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG") can cause a protection violation
> > in pmdp_test_and_clear_young():
> >
> >   BUG: unable to handle page fault for address: ffff8880083374d0
> >   #PF: supervisor write access in kernel mode
> >   #PF: error_code(0x0003) - permissions violation
> >   PGD 3026067 P4D 3026067 PUD 3027067 PMD 7fee5067 PTE 8010000008337065
> >   Oops: 0003 [#1] PREEMPT SMP NOPTI
> >   CPU: 7 PID: 158 Comm: kswapd0 Not tainted 6.1.0-rc5-20221118-doflr+ #1
> >   RIP: e030:pmdp_test_and_clear_young+0x25/0x40
> >
> > This happens because the Xen hypervisor can't emulate direct writes to
> > page table entries other than PTEs.
> >
> > This can easily be fixed by introducing arch_has_hw_pmd_young()
> > similar to arch_has_hw_pte_young() and test that instead of
> > CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.
>
> I just spotted that I missed to update my commit message to match the
> patch:
>
> s/arch_has_hw_pmd_young/arch_has_hw_nonleaf_pmd_young/
>
> I'll wait with a resend in order to get some feedback first.

Thanks. For the next spin:

Acked-by: Yu Zhao <yuzhao@google.com>


  reply	other threads:[~2022-11-21  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21  9:32 Juergen Gross
2022-11-21  9:50 ` Juergen Gross
2022-11-21  9:51   ` Yu Zhao [this message]
2022-11-22 16:57   ` Sander Eikelenboom

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='CAOUHufYVm4oc7JG=y3nwiLqKBBtzBMrHns=1ZNcQRSd1Rk-OFQ@mail.gmail.com' \
    --to=yuzhao@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@eikelenboom.it \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox