From: =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?=@zytor.com
To: =?UTF-8?B?bGludXgtdGlwLWNvbW1pdHNAdmdlci5rZXJuZWwub3Jn?=@zytor.com
Cc: dvlasenk@redhat.com, tglx@linutronix.de, catalin.marinas@arm.com,
arnd@arndb.de, ard.biesheuvel@linaro.org, will.deacon@arm.com,
mpe@ellerman.id.au, agross@codeaurora.org, rusty@rustcorp.com.au,
paul.gortmaker@windriver.com, deller@gmx.de, brgerst@gmail.com,
mingo@kernel.org, jejb@parisc-linux.org, re.emese@gmail.com,
linux@arm.linux.org.uk, dan.j.williams@intel.com,
linux-arch@vger.kernel.org, nicolas.pitre@linaro.org,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
ashoks@broadcom.com, marc.zyngier@arm.com, sboyd@codeaurora.org,
toshi.kani@hp.com, bp@suse.de, bp@alien8.de,
linux-kernel@vger.kernel.org, hpa@zytor.com,
peterz@infradead.org, mark.rutland@arm.com, pageexec@freemail.hu,
dahi@linux.vnet.ibm.com, minipli@googlemail.com,
david.brown@linaro.org, keescook@chromium.org,
ross.zwisler@linux.intel.com, mcgrof@suse.com,
luto@amacapital.net
Subject: [tip:mm/readonly] asm-generic: Consolidate mark_rodata_ro()
Date: Mon, 22 Feb 2016 04:18:06 -0800 [thread overview]
Message-ID: <tip-e267d97b83d9cecc16c54825f9f3ac7f72dc1e1e@git.kernel.org> (raw)
In-Reply-To: <1455748879-21872-2-git-send-email-keescook@chromium.org>
Commit-ID: e267d97b83d9cecc16c54825f9f3ac7f72dc1e1e
Gitweb: http://git.kernel.org/tip/e267d97b83d9cecc16c54825f9f3ac7f72dc1e1e
Author: Kees Cook <keescook@chromium.org>
AuthorDate: Wed, 17 Feb 2016 14:41:12 -0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 22 Feb 2016 08:51:37 +0100
asm-generic: Consolidate mark_rodata_ro()
Instead of defining mark_rodata_ro() in each architecture, consolidate it.
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Gross <agross@codeaurora.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Ashok Kumar <ashoks@broadcom.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Borislav Petkov <bp@suse.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: David Brown <david.brown@linaro.org>
Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Emese Revfy <re.emese@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luis R. Rodriguez <mcgrof@suse.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathias Krause <minipli@googlemail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: PaX Team <pageexec@freemail.hu>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: kernel-hardening@lists.openwall.com
Cc: linux-arch <linux-arch@vger.kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Link: http://lkml.kernel.org/r/1455748879-21872-2-git-send-email-keescook@chromium.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/arm/include/asm/cacheflush.h | 1 -
arch/arm64/include/asm/cacheflush.h | 4 ----
arch/parisc/include/asm/cacheflush.h | 4 ----
arch/x86/include/asm/cacheflush.h | 1 -
include/linux/init.h | 4 ++++
5 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
index d5525bf..9156fc3 100644
--- a/arch/arm/include/asm/cacheflush.h
+++ b/arch/arm/include/asm/cacheflush.h
@@ -491,7 +491,6 @@ static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
#endif
#ifdef CONFIG_DEBUG_RODATA
-void mark_rodata_ro(void);
void set_kernel_text_rw(void);
void set_kernel_text_ro(void);
#else
diff --git a/arch/arm64/include/asm/cacheflush.h b/arch/arm64/include/asm/cacheflush.h
index 7fc294c..22dda61 100644
--- a/arch/arm64/include/asm/cacheflush.h
+++ b/arch/arm64/include/asm/cacheflush.h
@@ -156,8 +156,4 @@ int set_memory_rw(unsigned long addr, int numpages);
int set_memory_x(unsigned long addr, int numpages);
int set_memory_nx(unsigned long addr, int numpages);
-#ifdef CONFIG_DEBUG_RODATA
-void mark_rodata_ro(void);
-#endif
-
#endif
diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h
index 845272c..7bd69bd 100644
--- a/arch/parisc/include/asm/cacheflush.h
+++ b/arch/parisc/include/asm/cacheflush.h
@@ -121,10 +121,6 @@ flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vma
}
}
-#ifdef CONFIG_DEBUG_RODATA
-void mark_rodata_ro(void);
-#endif
-
#include <asm/kmap_types.h>
#define ARCH_HAS_KMAP
diff --git a/arch/x86/include/asm/cacheflush.h b/arch/x86/include/asm/cacheflush.h
index e63aa38..c8cff75 100644
--- a/arch/x86/include/asm/cacheflush.h
+++ b/arch/x86/include/asm/cacheflush.h
@@ -92,7 +92,6 @@ void clflush_cache_range(void *addr, unsigned int size);
#define mmio_flush_range(addr, size) clflush_cache_range(addr, size)
#ifdef CONFIG_DEBUG_RODATA
-void mark_rodata_ro(void);
extern const int rodata_test_data;
extern int kernel_set_to_readonly;
void set_kernel_text_rw(void);
diff --git a/include/linux/init.h b/include/linux/init.h
index b449f37..aedb254 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -142,6 +142,10 @@ void prepare_namespace(void);
void __init load_default_modules(void);
int __init init_rootfs(void);
+#ifdef CONFIG_DEBUG_RODATA
+void mark_rodata_ro(void);
+#endif
+
extern void (*late_time_init)(void);
extern bool initcall_debug;
next prev parent reply other threads:[~2016-02-22 12:18 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 22:41 [PATCH v5 0/7] introduce post-init read-only memory Kees Cook
2016-02-17 22:41 ` [PATCH v5 1/7] asm-generic: consolidate mark_rodata_ro() Kees Cook
2016-02-19 14:38 ` Will Deacon
2016-02-22 12:18 ` =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?= [this message]
2016-02-22 12:18 ` [tip:mm/readonly] asm-generic: Consolidate mark_rodata_ro() =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?=
2016-02-17 22:41 ` [PATCH v5 2/7] init: create cmdline param to disable readonly Kees Cook
2016-02-17 22:41 ` Kees Cook
2016-02-22 12:18 ` [tip:mm/readonly] mm/init: Add 'rodata=off' boot cmdline parameter to disable read-only kernel mappings =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?=
2016-02-22 12:18 ` =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?=
2016-02-17 22:41 ` [PATCH v5 3/7] x86: make CONFIG_DEBUG_RODATA non-optional Kees Cook
2016-02-17 22:41 ` Kees Cook
2016-02-22 12:19 ` [tip:mm/readonly] x86/mm: Always enable CONFIG_DEBUG_RODATA and remove the Kconfig option =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?=
2016-02-22 12:19 ` =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?=
2016-02-17 22:41 ` [PATCH v5 4/7] introduce post-init read-only memory Kees Cook
2016-02-17 22:41 ` Kees Cook
2016-02-22 12:19 ` [tip:mm/readonly] arch: Introduce " =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?=
2016-02-22 12:19 ` =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?=
2016-03-07 13:00 ` [PATCH v5 4/7] introduce " Christian Borntraeger
2016-03-08 0:16 ` Kees Cook
2016-03-08 0:16 ` Kees Cook
2016-03-08 0:23 ` Andy Lutomirski
2016-03-08 0:23 ` Andy Lutomirski
2016-02-17 22:41 ` [PATCH v5 5/7] lkdtm: verify that __ro_after_init works correctly Kees Cook
2016-02-17 22:41 ` Kees Cook
2016-02-22 12:19 ` [tip:mm/readonly] lkdtm: Verify that '__ro_after_init' " =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?=
2016-02-22 12:19 ` =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?=
2016-02-17 22:41 ` [PATCH v5 6/7] x86, vdso: mark vDSO read-only after init Kees Cook
2016-02-17 22:41 ` Kees Cook
2016-02-22 12:20 ` [tip:mm/readonly] x86/vdso: Mark the vDSO code " =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?=
2016-02-22 12:20 ` =?UTF-8?B?dGlwLWJvdCBmb3IgS2VlcyBDb29rIDx0aXBib3RAenl0b3IuY29tPg==?=
2016-02-17 22:41 ` [PATCH v5 7/7] ARM: vdso: Mark vDSO code as read-only Kees Cook
2016-02-17 22:41 ` Kees Cook
2016-02-22 12:20 ` [tip:mm/readonly] ARM/vdso: Mark the vDSO code read-only after init =?UTF-8?B?dGlwLWJvdCBmb3IgRGF2aWQgQnJvd24gPHRpcGJvdEB6eXRvci5jb20+?=
2016-02-22 12:20 ` =?UTF-8?B?dGlwLWJvdCBmb3IgRGF2aWQgQnJvd24gPHRpcGJvdEB6eXRvci5jb20+?=
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-e267d97b83d9cecc16c54825f9f3ac7f72dc1e1e@git.kernel.org \
--to==?utf-8?b?dglwlwjvdcbmb3igs2vlcybdb29ridx0axbib3raenl0b3iuy29tpg==?=@zytor.com \
--cc==?UTF-8?B?bGludXgtdGlwLWNvbW1pdHNAdmdlci5rZXJuZWwub3Jn?=@zytor.com \
--cc=agross@codeaurora.org \
--cc=akpm@linux-foundation.org \
--cc=ard.biesheuvel@linaro.org \
--cc=arnd@arndb.de \
--cc=ashoks@broadcom.com \
--cc=bp@alien8.de \
--cc=bp@suse.de \
--cc=brgerst@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=dahi@linux.vnet.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=david.brown@linaro.org \
--cc=deller@gmx.de \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=jejb@parisc-linux.org \
--cc=keescook@chromium.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kern \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=luto@amacapital.net \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=mcgrof@suse.com \
--cc=mingo@kernel.org \
--cc=minipli@googlemail.com \
--cc=mpe@ellerman.id.au \
--cc=nicolas.pitre@linaro.org \
--cc=pageexec@freemail.hu \
--cc=paul.gortmaker@windriver.com \
--cc=peterz@infradead.org \
--cc=re.emese@gmail.com \
--cc=ross.zwisler@linux.intel.com \
--cc=rusty@rustcorp.com.au \
--cc=sboyd@codeaurora.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=toshi.kani@hp.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).