From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Fix the ptep_set_wrprotect() to set PTE_DIRTY if (PTE_DBM && !PTE_RDONLY)
Date: Thu, 10 Mar 2016 18:39:51 +0000 [thread overview]
Message-ID: <20160310183951.GA2804@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <CAFpQJXVy-FafeU+Uq40_27ZauDN6ziYtGugUBiWJ8eHGOwkCfQ@mail.gmail.com>
On Thu, Mar 10, 2016 at 08:34:46AM +0530, Ganapatrao Kulkarni wrote:
> > On Wed, Mar 9, 2016 at 9:33 PM, Catalin Marinas <catalin.marinas@arm.com> wrote:
> >> diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
> >> index 7c73b365fcfa..b409a983f870 100644
> >> --- a/arch/arm64/include/asm/pgtable.h
> >> +++ b/arch/arm64/include/asm/pgtable.h
> >> @@ -201,7 +201,7 @@ extern void __sync_icache_dcache(pte_t pteval, unsigned long addr);
> >> static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
> >> pte_t *ptep, pte_t pte)
> >> {
> >> - if (pte_valid(pte)) {
> >> + if (pte_present(pte)) {
> >> if (pte_sw_dirty(pte) && pte_write(pte))
> >> pte_val(pte) &= ~PTE_RDONLY;
> >> else
>
> this diff works for me.
>
> Tested-by: Ganapatrao Kulkarni <gkulkarni@cavium.com>
Thanks. I'll push it out during the merging window and cc stable (though
it needs a slightly different workaround for 4.4 anyway).
--
Catalin
prev parent reply other threads:[~2016-03-10 18:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 5:02 [PATCH] arm64: Fix the ptep_set_wrprotect() to set PTE_DIRTY if (PTE_DBM && !PTE_RDONLY) Ganapatrao Kulkarni
2016-03-09 10:06 ` Catalin Marinas
2016-03-09 11:47 ` Ganapatrao Kulkarni
2016-03-09 16:03 ` Catalin Marinas
2016-03-09 17:43 ` Ganapatrao Kulkarni
2016-03-10 3:04 ` Ganapatrao Kulkarni
2016-03-10 18:39 ` Catalin Marinas [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=20160310183951.GA2804@e104818-lin.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).