lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Feb 2016 04:18:06 -0800
From:	tip-bot for Kees Cook <tipbot@...or.com>@zytor.com
To:	linux-tip-commits@...r.kernel.org@...or.com
Cc:	dvlasenk@...hat.com, tglx@...utronix.de, catalin.marinas@....com,
	arnd@...db.de, ard.biesheuvel@...aro.org, will.deacon@....com,
	mpe@...erman.id.au, agross@...eaurora.org, rusty@...tcorp.com.au,
	paul.gortmaker@...driver.com, deller@....de, brgerst@...il.com,
	mingo@...nel.org, jejb@...isc-linux.org, re.emese@...il.com,
	linux@....linux.org.uk, dan.j.williams@...el.com,
	linux-arch@...r.kernel.org, nicolas.pitre@...aro.org,
	torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
	ashoks@...adcom.com, marc.zyngier@....com, sboyd@...eaurora.org,
	toshi.kani@...com, bp@...e.de, bp@...en8.de,
	linux-kernel@...r.kernel.org, hpa@...or.com, peterz@...radead.org,
	mark.rutland@....com, pageexec@...email.hu,
	dahi@...ux.vnet.ibm.com, minipli@...glemail.com,
	david.brown@...aro.org, keescook@...omium.org,
	ross.zwisler@...ux.intel.com, mcgrof@...e.com, luto@...capital.net
Subject: [tip:mm/readonly] asm-generic: Consolidate mark_rodata_ro()

Commit-ID:  e267d97b83d9cecc16c54825f9f3ac7f72dc1e1e
Gitweb:     http://git.kernel.org/tip/e267d97b83d9cecc16c54825f9f3ac7f72dc1e1e
Author:     Kees Cook <keescook@...omium.org>
AuthorDate: Wed, 17 Feb 2016 14:41:12 -0800
Committer:  Ingo Molnar <mingo@...nel.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@...omium.org>
Acked-by: Will Deacon <will.deacon@....com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andy Gross <agross@...eaurora.org>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Ashok Kumar <ashoks@...adcom.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Borislav Petkov <bp@...e.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Dan Williams <dan.j.williams@...el.com>
Cc: David Brown <david.brown@...aro.org>
Cc: David Hildenbrand <dahi@...ux.vnet.ibm.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: Emese Revfy <re.emese@...il.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Helge Deller <deller@....de>
Cc: James E.J. Bottomley <jejb@...isc-linux.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Luis R. Rodriguez <mcgrof@...e.com>
Cc: Marc Zyngier <marc.zyngier@....com>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Mathias Krause <minipli@...glemail.com>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Nicolas Pitre <nicolas.pitre@...aro.org>
Cc: PaX Team <pageexec@...email.hu>
Cc: Paul Gortmaker <paul.gortmaker@...driver.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ross Zwisler <ross.zwisler@...ux.intel.com>
Cc: Russell King <linux@....linux.org.uk>
Cc: Rusty Russell <rusty@...tcorp.com.au>
Cc: Stephen Boyd <sboyd@...eaurora.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Toshi Kani <toshi.kani@...com>
Cc: kernel-hardening@...ts.openwall.com
Cc: linux-arch <linux-arch@...r.kernel.org>
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org
Cc: linux-parisc@...r.kernel.org
Link: http://lkml.kernel.org/r/1455748879-21872-2-git-send-email-keescook@chromium.org
Signed-off-by: Ingo Molnar <mingo@...nel.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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ