All of lore.kernel.org
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: mm: avoid setting nG bit for user mappings that aren't present
Date: Thu, 26 Jul 2012 17:49:08 +0100	[thread overview]
Message-ID: <20120726164908.GC29764@arm.com> (raw)
In-Reply-To: <1343318468-10412-2-git-send-email-will.deacon@arm.com>

On Thu, Jul 26, 2012 at 05:01:07PM +0100, Will Deacon wrote:
> Swap entries are encoding in ptes such that !pte_present(pte) and
> pte_file(pte). The remaining bits of the descriptor are used to identify
> the swapfile and offset within it to the swap entry.
> 
> When writing such a pte for a user virtual address, set_pte_at
> unconditionally sets the nG bit, which (in the case of LPAE) will
> corrupt the swapfile offset and lead to a BUG:
> 
> [  140.494067] swap_free: Unused swap offset entry 000763b4
> [  140.509989] BUG: Bad page map in process rs:main Q:Reg  pte:0ec76800 pmd:8f92e003
> 
> This patch fixes the problem by only setting the nG bit for user
> mappings that are actually present.
> 
> Signed-off-by: Will Deacon <will.deacon@arm.com>

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

  reply	other threads:[~2012-07-26 16:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26 16:01 [PATCH 0/2] Fix swap and page migration for LPAE Will Deacon
2012-07-26 16:01 ` [PATCH 1/2] ARM: mm: avoid setting nG bit for user mappings that aren't present Will Deacon
2012-07-26 16:49   ` Catalin Marinas [this message]
2012-07-26 16:01 ` [PATCH 2/2] ARM: mm: use 5 bits for swapfile type encoding Will Deacon
2012-07-26 16:49   ` 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=20120726164908.GC29764@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.