[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/kernel/FC-4 linux-2.6-write-protect-rodata.patch,1.1,1.2



Author: davej

Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv11972

Modified Files:
	linux-2.6-write-protect-rodata.patch 
Log Message:
update from devel/


linux-2.6-write-protect-rodata.patch:
 linux-2.6.14-fordiff/arch/i386/Kconfig.debug           |   10 +++++++
 linux-2.6.14-fordiff/arch/i386/kernel/entry.S          |    1 
 linux-2.6.14-fordiff/arch/i386/kernel/syscall_table.S  |    1 
 linux-2.6.14-fordiff/arch/i386/mm/init.c               |   24 +++++++++++++++++
 linux-2.6.14-fordiff/arch/x86_64/Kconfig.debug         |   10 +++++++
 linux-2.6.14-fordiff/arch/x86_64/kernel/syscall.c      |    2 -
 linux-2.6.14-fordiff/arch/x86_64/mm/init.c             |   23 ++++++++++++++++
 linux-2.6.14-fordiff/arch/x86_64/mm/pageattr.c         |    9 ++++--
 linux-2.6.14-fordiff/include/asm-generic/vmlinux.lds.h |    4 ++
 linux-2.6.14-fordiff/include/asm-x86_64/pgtable.h      |    2 +
 linux-2.6.14-fordiff/init/main.c                       |    6 ++++
 linux-2.6.14/arch/i386/mm/init.c                       |   12 ++++++++
 linux-2.6.14/arch/x86_64/mm/init.c                     |   12 ++++++++
 13 files changed, 112 insertions(+), 4 deletions(-)

Index: linux-2.6-write-protect-rodata.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-write-protect-rodata.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-write-protect-rodata.patch	10 Nov 2005 19:37:40 -0000	1.1
+++ linux-2.6-write-protect-rodata.patch	23 Nov 2005 05:29:27 -0000	1.2
@@ -250,3 +250,68 @@
  	numa_default_policy();
  
 
+--- linux-2.6.14/arch/i386/mm/init.c~	2005-11-22 10:05:02.000000000 -0500
++++ linux-2.6.14/arch/i386/mm/init.c	2005-11-22 10:08:07.000000000 -0500
+@@ -809,10 +809,14 @@ void free_initmem(void)
+ 
+ #ifdef CONFIG_DEBUG_RODATA
+ 
++static int nowprodata;
++
+ extern char __start_rodata, __end_rodata;
+ void mark_rodata_ro(void)
+ {
+ 	unsigned long addr = (unsigned long)&__start_rodata;
++	if (nowprodata == 1)
++		return;
+ 
+ 	for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE)
+ 		change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RO);
+@@ -828,6 +832,14 @@ void mark_rodata_ro(void)
+ 	 */
+ 	global_flush_tlb();
+ }
++ 
++static int __init disable_rodata(char *str)
++{
++	nowprodata = 1;
++	return 1;
++}
++__setup("nowprodata", disable_rodata);
++
+ #endif
+ 
+ 
+--- linux-2.6.14/arch/x86_64/mm/init.c~	2005-11-22 10:11:34.000000000 -0500
++++ linux-2.6.14/arch/x86_64/mm/init.c	2005-11-22 10:14:00.000000000 -0500
+@@ -576,11 +576,16 @@ void free_initmem(void)
+ 
+ #ifdef CONFIG_DEBUG_RODATA
+ 
++static int nowprodata;
++
+ extern char __start_rodata, __end_rodata;
+ void mark_rodata_ro(void)
+ {
+ 	unsigned long addr = (unsigned long)&__start_rodata;
+ 
++	if (nowprodata == 1)
++		return;
++
+ 	for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE)
+ 		change_page_attr_addr(addr, 1, PAGE_KERNEL_RO);
+ 
+@@ -595,6 +600,13 @@ void mark_rodata_ro(void)
+ 	 */
+ 	global_flush_tlb();
+ }
++
++static int __init disable_rodata(char *str)
++{
++	nowprodata = 1;
++	return 1;
++}
++__setup("nowprodata", disable_rodata);
+ #endif
+ 
+ #ifdef CONFIG_BLK_DEV_INITRD


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]