lkml.org 
[lkml]   [2012]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlinux-next: manual merge of the arm tree with Linus' tree
Hi Russell,

Today's linux-next merge of the arm tree got a conflict in
arch/arm/kernel/process.c between commit 909af768e888 ("coredump: remove
VM_ALWAYSDUMP flag") from the tree and commit e19d478e808e ("ARM:
7294/1: vectors: use gate_vma for vectors user mapping") from the arm
tree.

I fixed it up (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au

diff --cc arch/arm/kernel/process.c
index d3eca45,1531480..0000000
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@@ -529,17 -531,36 +529,35 @@@ unsigned long arch_randomize_brk(struc
#ifdef CONFIG_MMU
/*
* The vectors page is always readable from user space for the
- * atomic helpers and the signal restart code. Let's declare a mapping
- * for it so it is visible through ptrace and /proc/<pid>/mem.
+ * atomic helpers and the signal restart code. Insert it into the
+ * gate_vma so that it is visible through ptrace and /proc/<pid>/mem.
*/
+ static struct vm_area_struct gate_vma;

- int vectors_user_mapping(void)
+ static int __init gate_vma_init(void)
{
- struct mm_struct *mm = current->mm;
- return install_special_mapping(mm, 0xffff0000, PAGE_SIZE,
- VM_READ | VM_EXEC |
- VM_MAYREAD | VM_MAYEXEC | VM_RESERVED,
- NULL);
+ 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;
++ VM_MAYREAD | VM_MAYEXEC;
+ return 0;
+ }
+ arch_initcall(gate_vma_init);
+
+ struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
+ {
+ return &gate_vma;
+ }
+
+ int in_gate_area(struct mm_struct *mm, unsigned long addr)
+ {
+ return (addr >= gate_vma.vm_start) && (addr < gate_vma.vm_end);
+ }
+
+ int in_gate_area_no_mm(unsigned long addr)
+ {
+ return in_gate_area(NULL, addr);
}

const char *arch_vma_name(struct vm_area_struct *vma)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-03-26 02:09    [W:0.025 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site