linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: vectors: use gate_vma for vectors user mapping
Date: Thu, 23 Feb 2012 09:01:52 +0000	[thread overview]
Message-ID: <20120223090152.GI22562@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <alpine.LFD.2.02.1201171410250.2722@xanadu.home>

On Tue, Jan 17, 2012 at 02:11:14PM -0500, Nicolas Pitre wrote:
> On Tue, 17 Jan 2012, Will Deacon wrote:
> 
> > The current user mapping for the vectors page is inserted as a `horrible
> > hack vma' into each task via arch_setup_additional_pages. This causes
> > problems with the MM subsystem and vm_normal_page, as described here:
> > 
> > https://lkml.org/lkml/2012/1/14/55
> > 
> > Following the suggestion from Hugh in the above thread, this patch uses
> > the gate_vma for the vectors user mapping, therefore consolidating
> > the horrible hack VMAs into one.
> > 
> > Cc: Nicolas Pitre <nico@fluxnic.net>
> > Signed-off-by: Will Deacon <will.deacon@arm.com>
> 
> Acked-by: Nicolas Pitre <nico@linaro.org>
> Tested-by: Nicolas Pitre <nico@linaro.org>

Al Viro has spotted this patch, and commented on it last night:
| static struct vm_area_struct gate_vma;
| static int __init gate_vma_init(void)
| {
|         gate_vma.vm_start       = 0xffff0000;
|         gate_vma.vm_end         = 0xffff0000 + PAGE_SIZE;
|         gate_vma.vm_page_prot   = PAGE_READONLY_EXEC;
|         gate_vma.vm_flags       = VM_READ | VM_EXEC |
|                                   VM_MAYREAD | VM_MAYEXEC |
|                                   VM_ALWAYSDUMP;
|         return 0;
| }
| why bother with initcall?
| it's all constant, AFAICS
| IOW, why not initialize it statically and be done with that?

  reply	other threads:[~2012-02-23  9:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 16:50 [PATCH v2] ARM: vectors: use gate_vma for vectors user mapping Will Deacon
2012-01-17 19:11 ` Nicolas Pitre
2012-02-23  9:01   ` Russell King - ARM Linux [this message]
2012-02-23  9:57     ` Will Deacon

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=20120223090152.GI22562@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).