From: Michael Ellerman <patch-notifications@ellerman•id.au>
To: Nicholas Piggin <npiggin@gmail•com>, linuxppc-dev@lists•ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail•com>
Subject: Re: powerpc/64s/radix: Fix missing ptesync in flush_cache_vmap
Date: Thu, 7 Jun 2018 10:17:43 +1000 (AEST) [thread overview]
Message-ID: <411R2H1G5Kz9s1b@ozlabs.org> (raw)
In-Reply-To: <20180606014008.20363-1-npiggin@gmail.com>
On Wed, 2018-06-06 at 01:40:08 UTC, Nicholas Piggin wrote:
> There is a typo in f1cb8f9beb ("powerpc/64s/radix: avoid ptesync after
> set_pte and ptep_set_access_flags") config ifdef, which results in the
> necessary ptesync not being issued after vmalloc.
>
> This causes random kernel faults in module load, bpf load, anywhere
> that vmalloc mappings are used.
>
> After correcting the code, this survives a guest kernel booting
> hundreds of times where previously there would be a crash every few
> boots (I haven't noticed the crash on host, perhaps due to different
> TLB and page table walking behaviour in hardware).
>
> A memory clobber is also added to the flush, just to be sure it won't
> be reordered with the pte set or the subsequent mapping access.
>
> Fixes: f1cb8f9beb ("powerpc/64s/radix: avoid ptesync after set_pte and ptep_set_access_flags")
> Signed-off-by: Nicholas Piggin <npiggin@gmail•com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/ff5bc793e47b537bf3e904fada585e
cheers
prev parent reply other threads:[~2018-06-07 0:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-06 1:40 [PATCH] powerpc/64s/radix: Fix missing ptesync in flush_cache_vmap Nicholas Piggin
2018-06-07 0:17 ` Michael Ellerman [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=411R2H1G5Kz9s1b@ozlabs.org \
--to=patch-notifications@ellerman$(echo .)id.au \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=npiggin@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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