[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <201606071207.u57C5SK3003539@mx0a-001b2d01.pphosted.com>
Date: Tue, 7 Jun 2016 14:06:59 +0200
From: Heiko Carstens <heiko.carstens@...ibm.com>
To: Kees Cook <keescook@...omium.org>, Ingo Molnar <mingo@...nel.org>
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 0/2] Proper ro_after_init implementation on s390
These two patches allow a proper ro_after_init implementation on s390.
The current implementation maps __ro_after_init to __read_mostly,
which means that ro_after_init data won't be write protected at all.
Reason for this is that s390 write protects rodata very early (before
init calls) and therefore adding ro_after_init data to rodata would
lead to crashes.
Since I don't want to mark the page table entries much later read-only
on s390 just to make this work, allow an architecture specific
handling which can be used to move the ro_after_init data to a
different place which can be marked read-only later when
mark_rodata_ro gets executed.
Note: these patches require the s390 kernel page table splitting
support which currently is only available at
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
(included in linux-next)
Therefore, if we can agree on this solution I'd like to add these
patches to the s390 tree, so it can be merged during the next merge
window.
Heiko Carstens (2):
vmlinux.lds.h: allow arch specific handling of ro_after_init data section
s390/mm: add proper __ro_after_init support
arch/s390/include/asm/cache.h | 3 ---
arch/s390/include/asm/sections.h | 1 +
arch/s390/kernel/vmlinux.lds.S | 12 +++++++++++-
arch/s390/mm/init.c | 7 ++++---
arch/s390/mm/vmem.c | 7 +++----
include/asm-generic/vmlinux.lds.h | 10 +++++++++-
6 files changed, 28 insertions(+), 12 deletions(-)
--
2.6.6
Powered by blists - more mailing lists