Commit 6af7eea2aee57b869f34eba0a94ef122fe90fbfd

Authored by Christian Borntraeger
Committed by Martin Schwidefsky
1 parent 176b1803ce

[S390] s390: disable change bit override

commit 6a985c6194017de2c062916ad1cd00dee0302c40
([S390] s390: use change recording override for kernel mapping)
deactivated the change bit recording for the kernel mapping to
improve the performance. This works most of the time, but there
are cases (e.g. kernel runs in home space, futex atomic compare xcmg)
where we modify user memory with the kernel mapping instead of the
user mapping.
Instead of fixing these cases, this patch just deactivates change bit
override to avoid future problems with other kernel code that might
use the kernel mapping for user memory.

CC: stable@kernel.org
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

Showing 1 changed file with 3 additions and 8 deletions Side-by-side Diff

... ... @@ -71,12 +71,8 @@
71 71 pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t));
72 72 if (!pte)
73 73 return NULL;
74   - if (MACHINE_HAS_HPAGE)
75   - clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY | _PAGE_CO,
76   - PTRS_PER_PTE * sizeof(pte_t));
77   - else
78   - clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY,
79   - PTRS_PER_PTE * sizeof(pte_t));
  74 + clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY,
  75 + PTRS_PER_PTE * sizeof(pte_t));
80 76 return pte;
81 77 }
82 78  
... ... @@ -117,8 +113,7 @@
117 113 if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) &&
118 114 (address + HPAGE_SIZE <= start + size) &&
119 115 (address >= HPAGE_SIZE)) {
120   - pte_val(pte) |= _SEGMENT_ENTRY_LARGE |
121   - _SEGMENT_ENTRY_CO;
  116 + pte_val(pte) |= _SEGMENT_ENTRY_LARGE;
122 117 pmd_val(*pm_dir) = pte_val(pte);
123 118 address += HPAGE_SIZE - PAGE_SIZE;
124 119 continue;