aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-10-04 11:02:02 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-10-09 08:16:59 -0400
commit8fe234d3c8d66771b327accb8eef26f70a8a8db8 (patch)
treeb8dc843924f66162ccdcbd77a1e245ee9b72b490 /arch/s390/mm
parente76e82d772522b05ed93228478d2a4460754b6a4 (diff)
s390/mm: fix mapping of read-only kernel text section
Within the identity mapping the kernel text section is mapped read-only. However when mapping the first and last page of the text section we must round upwards and downwards respectively, if only parts of a page belong to the section. Otherwise potential rw data can be mapped read-only. So the rounding must be done just the other way we have it right now. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r--arch/s390/mm/vmem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 5b70393911bd..d402b19f1df2 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -331,8 +331,8 @@ void __init vmem_map_init(void)
331 unsigned long start, end; 331 unsigned long start, end;
332 int i; 332 int i;
333 333
334 ro_start = ((unsigned long)&_stext) & PAGE_MASK; 334 ro_start = PFN_ALIGN((unsigned long)&_stext);
335 ro_end = PFN_ALIGN((unsigned long)&_eshared); 335 ro_end = (unsigned long)&_eshared & PAGE_MASK;
336 for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { 336 for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) {
337 if (memory_chunk[i].type == CHUNK_CRASHK || 337 if (memory_chunk[i].type == CHUNK_CRASHK ||
338 memory_chunk[i].type == CHUNK_OLDMEM) 338 memory_chunk[i].type == CHUNK_OLDMEM)