public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: catalin.marinas@arm•com (Catalin Marinas)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: LPAE: Invalidate the TLB for module addresses during translation fault
Date: Fri, 24 Feb 2012 11:39:12 +0000	[thread overview]
Message-ID: <20120224113912.GC13117@arm.com> (raw)
In-Reply-To: <20120224101200.GG22562@n2100.arm.linux.org.uk>

On Fri, Feb 24, 2012 at 10:12:00AM +0000, Russell King - ARM Linux wrote:
> On Fri, Feb 24, 2012 at 09:58:06AM +0000, Catalin Marinas wrote:
> > On Thu, Feb 23, 2012 at 10:13:43PM +0000, Catalin Marinas wrote:
> > > On Thu, Feb 23, 2012 at 07:50:03PM +0000, Russell King - ARM Linux wrote:
> > > > On Thu, Feb 23, 2012 at 05:59:41PM +0000, Catalin Marinas wrote:
> > > > > During the free_pgtables() call all user and modules/pkmap entries are
> > > > > removed.
> > > > 
> > > > Err, no.  free_pgtables() should only ever touch up to TASK_SIZE, which
> > > > is the maximum size of userspace.  Moreover, because TASK_SIZE does not
> > > > cover an entire pud, free_pgtables() should not be removing the pud
> > > > table.
> > > 
> > > Are you sure? exit_mmap() calls free_pgtables() with ceiling == 0.  If
> > > free_pmd_range() is called for a range in the top 1GB of the task
> > > address space (which includes modules), it also calls pud_clear()
> > > because ceiling is 0.
> > 
> > BTW, an alternative patch but which needs wider acknowledgement as it
> > touches generic code (I can post it to linux-mm):
> 
> I think that's the right solution.

Something similar is needed in shift_arg_pages() when calling
free_pgd_range().

But my concern - are there other architectures that rely on
free_pgtables() to remove page tables corresponding to vmas beyond
TASK_SIZE (e.g. vsyscall)?

-- 
Catalin

      reply	other threads:[~2012-02-24 11:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23 17:59 [PATCH] ARM: LPAE: Invalidate the TLB for module addresses during translation fault Catalin Marinas
2012-02-23 19:50 ` Russell King - ARM Linux
2012-02-23 22:13   ` Catalin Marinas
2012-02-24  9:58     ` Catalin Marinas
2012-02-24 10:12       ` Russell King - ARM Linux
2012-02-24 11: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=20120224113912.GC13117@arm.com \
    --to=catalin.marinas@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /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