stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "gkulkarni@cavium.com" <gkulkarni@cavium.com>,
	"gkulkarni@caviumnetworks.com" <gkulkarni@caviumnetworks.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: FAILED: patch "[PATCH] arm64: Update PTE_RDONLY in set_pte_at() for PROT_NONE" failed to apply to 4.4-stable tree
Date: Mon, 11 Apr 2016 15:48:40 +0100	[thread overview]
Message-ID: <20160411144838.GA7908@MBP.local> (raw)
In-Reply-To: <1460249615199147@kroah.com>

Hi Greg,

On Sun, Apr 10, 2016 at 01:53:35AM +0100, gregkh@linuxfoundation.org wrote:
> The patch below does not apply to the 4.4-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> From fdc69e7df3cb24f18a93192641786e5b7ecd1dfe Mon Sep 17 00:00:00 2001
> From: Catalin Marinas <catalin.marinas@arm.com>
> Date: Wed, 9 Mar 2016 16:31:29 +0000
> Subject: [PATCH] arm64: Update PTE_RDONLY in set_pte_at() for PROT_NONE
>  permission
> 
> The set_pte_at() function must update the hardware PTE_RDONLY bit
> depending on the state of the PTE_WRITE and PTE_DIRTY bits of the given
> entry value. However, it currently only performs this for pte_valid()
> entries, ignoring PTE_PROT_NONE. The side-effect is that PROT_NONE
> mappings would not have the PTE_RDONLY bit set. Without
> CONFIG_ARM64_HW_AFDBM, this is not an issue since such PROT_NONE pages
> are not accessible anyway.
> 
> With commit 2f4b829c625e ("arm64: Add support for hardware updates of
> the access and dirty pte bits"), the ptep_set_wrprotect() function was
> re-written to cope with automatic hardware updates of the dirty state.
> As an optimisation, only PTE_RDONLY is checked to assess the "dirty"
> status. Since set_pte_at() does not set this bit for PROT_NONE mappings,
> such pages may be considered "dirty" as a result of
> ptep_set_wrprotect().
> 
> This patch updates the pte_valid() check to pte_present() in
> set_pte_at(). It also adds PTE_PROT_NONE to the swap entry bits comment.
> 
> Fixes: 2f4b829c625e ("arm64: Add support for hardware updates of the access and dirty pte bits")
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> Reported-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> Tested-by: Ganapatrao Kulkarni <gkulkarni@cavium.com>
> Cc: <stable@vger.kernel.org>

This patch requires another commit that was merged in 4.5. The actual
"Cc: stable" line above should have been:

Cc: <stable@vger.kernel.org> # 4.4.x: ac15bd63bbb2: arm64: Honour !PTE_WRITE in set_pte_at() for kernel mappings

Shall I re-send commit fdc69e7df3cb ("arm64: Update PTE_RDONLY in
set_pte_at() for PROT_NONE permission") with the amended "Cc: stable"
line or you're OK to cherry-pick the dependency?

Thanks.

-- 
Catalin

  reply	other threads:[~2016-04-11 14:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-10  0:53 FAILED: patch "[PATCH] arm64: Update PTE_RDONLY in set_pte_at() for PROT_NONE" failed to apply to 4.4-stable tree gregkh
2016-04-11 14:48 ` Catalin Marinas [this message]
2016-04-11 17:46   ` gregkh
2016-04-18  1:23     ` gregkh
2016-04-18  9:15       ` Catalin Marinas

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=20160411144838.GA7908@MBP.local \
    --to=catalin.marinas@arm.com \
    --cc=gkulkarni@cavium.com \
    --cc=gkulkarni@caviumnetworks.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).