diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-01 12:57:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-01 12:57:50 -0400 |
commit | ebad825cdd4e6b327eaf0dd72439408957049cea (patch) | |
tree | 1968af65b9f31924d271db19ade63809fed105ec | |
parent | 37b71411b75c6a6c918e3102097417fdfed667b8 (diff) |
ia64: mark special ia64 memory areas anonymous
Commit bfd40eaff5ab ("mm: fix vma_is_anonymous() false-positives") made
newly allocated vma's have a dummy vm_ops field so that they wouldn't be
mistaken for anonymous mappings, and if you wanted an anonymous vma you
had to explicitly say so by calling "vma_set_anonymous()" on it.
However, it missed the two special vmas that ia64 processes have: the
register backing store and the NaT page. So they wouldn't actually act
like anonymous ranges, and page faults on them caused a SIGBUS rather
than the creation of a new anon page in them.
That obviously will make any ia64 binary very unhappy indeed, and the
boot fails early.
Fixes: bfd40eaff5ab ("mm: fix vma_is_anonymous() false-positives")
Reported-by: Tony Luck <tony.luck@intel.com>
Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/ia64/mm/init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index e6c6dfd98de2..3b85c3ecac38 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -116,6 +116,7 @@ ia64_init_addr_space (void) | |||
116 | */ | 116 | */ |
117 | vma = vm_area_alloc(current->mm); | 117 | vma = vm_area_alloc(current->mm); |
118 | if (vma) { | 118 | if (vma) { |
119 | vma_set_anonymous(vma); | ||
119 | vma->vm_start = current->thread.rbs_bot & PAGE_MASK; | 120 | vma->vm_start = current->thread.rbs_bot & PAGE_MASK; |
120 | vma->vm_end = vma->vm_start + PAGE_SIZE; | 121 | vma->vm_end = vma->vm_start + PAGE_SIZE; |
121 | vma->vm_flags = VM_DATA_DEFAULT_FLAGS|VM_GROWSUP|VM_ACCOUNT; | 122 | vma->vm_flags = VM_DATA_DEFAULT_FLAGS|VM_GROWSUP|VM_ACCOUNT; |
@@ -133,6 +134,7 @@ ia64_init_addr_space (void) | |||
133 | if (!(current->personality & MMAP_PAGE_ZERO)) { | 134 | if (!(current->personality & MMAP_PAGE_ZERO)) { |
134 | vma = vm_area_alloc(current->mm); | 135 | vma = vm_area_alloc(current->mm); |
135 | if (vma) { | 136 | if (vma) { |
137 | vma_set_anonymous(vma); | ||
136 | vma->vm_end = PAGE_SIZE; | 138 | vma->vm_end = PAGE_SIZE; |
137 | vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT); | 139 | vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT); |
138 | vma->vm_flags = VM_READ | VM_MAYREAD | VM_IO | | 140 | vma->vm_flags = VM_READ | VM_MAYREAD | VM_IO | |