rpms/kernel/devel kernel.spec, 1.26, 1.27 linux-2.6-elf-core-sysctl.patch, 1.2, 1.3

Roland McGrath (roland) fedora-extras-commits at redhat.com
Sun Jul 22 04:07:54 UTC 2007


Author: roland

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26179

Modified Files:
	kernel.spec linux-2.6-elf-core-sysctl.patch 
Log Message:
Fix biarch issue in linux-2.6-elf-core-sysctl.patch


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- kernel.spec	21 Jul 2007 18:43:56 -0000	1.26
+++ kernel.spec	22 Jul 2007 04:07:19 -0000	1.27
@@ -2130,6 +2130,9 @@
 %endif
 
 %changelog
+* Sat Jul 21 2007 Roland McGrath <roland at redhat.com>
+- Fix biarch issue in linux-2.6-elf-core-sysctl.patch
+
 * Sat Jul 21 2007 Dave Jones <davej at redhat.com>
 - 2.6.22-git16
 

linux-2.6-elf-core-sysctl.patch:

Index: linux-2.6-elf-core-sysctl.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-elf-core-sysctl.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-elf-core-sysctl.patch	21 Jul 2007 09:29:32 -0000	1.2
+++ linux-2.6-elf-core-sysctl.patch	22 Jul 2007 04:07:19 -0000	1.3
@@ -1,6 +1,6 @@
-From 3fc969e9b3913c1153124c179ad7fff4df1afda9 Mon Sep 17 00:00:00 2001
+From 5bf9b9fac15226cd4da04e03cc518f4dd4444d4b Mon Sep 17 00:00:00 2001
 From: Roland McGrath <roland at redhat.com>
-Date: Thu, 19 Jul 2007 13:44:13 -0700
+Date: Sat, 21 Jul 2007 21:04:31 -0700
 Subject: [PATCH] Add sysctl controls on ELF core dump segments, dump first page of DSOs
 
 This adds two sysctl items under fs.binfmt_elf for controlling how memory
@@ -16,11 +16,11 @@
 
 Signed-off-by: Roland McGrath <roland at redhat.com>
 ---
- fs/binfmt_elf.c |  158 ++++++++++++++++++++++++++++++++++++++++++++++---------
- 1 files changed, 132 insertions(+), 26 deletions(-)
+ fs/binfmt_elf.c |  171 ++++++++++++++++++++++++++++++++++++++++++++++--------
+ 1 files changed, 145 insertions(+), 26 deletions(-)
 
 diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
-index ba24cb2..a6e659c 100644
+index 4482a06..fca03ec 100644
 --- a/fs/binfmt_elf.c
 +++ b/fs/binfmt_elf.c
 @@ -20,6 +20,7 @@
@@ -31,7 +31,7 @@
  #include <linux/string.h>
  #include <linux/file.h>
  #include <linux/fcntl.h>
-@@ -1224,6 +1225,10 @@ out:
+@@ -1161,6 +1162,10 @@ out:
   * Modelled on fs/exec.c:aout_core_dump()
   * Jeremy Fitzhardinge <jeremy at sw.oz.au>
   */
@@ -42,7 +42,7 @@
  /*
   * These are the only things you should do on a core-file: use only these
   * functions to write out all the necessary info.
-@@ -1256,17 +1261,14 @@ static int dump_seek(struct file *file, loff_t off)
+@@ -1193,17 +1198,14 @@ static int dump_seek(struct file *file, loff_t off)
  }
  
  /*
@@ -64,7 +64,7 @@
  
  	/* Do not dump I/O mapped devices or special mappings */
  	if (vma->vm_flags & (VM_IO | VM_RESERVED))
-@@ -1274,17 +1276,51 @@ static int maydump(struct vm_area_struct *vma, unsigned long mm_flags)
+@@ -1211,17 +1213,51 @@ static int maydump(struct vm_area_struct *vma, unsigned long mm_flags)
  
  	/* By default, dump shared memory if mapped from an anonymous file. */
  	if (vma->vm_flags & VM_SHARED) {
@@ -124,7 +124,7 @@
  }
  
  /* An ELF note in memory */
-@@ -1731,16 +1767,13 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)
+@@ -1668,16 +1704,13 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)
  	for (vma = first_vma(current, gate_vma); vma != NULL;
  			vma = next_vma(vma, gate_vma)) {
  		struct elf_phdr phdr;
@@ -143,7 +143,7 @@
  		offset += phdr.p_filesz;
  		phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
  		if (vma->vm_flags & VM_WRITE)
-@@ -1782,13 +1815,11 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)
+@@ -1719,13 +1752,11 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)
  	for (vma = first_vma(current, gate_vma); vma != NULL;
  			vma = next_vma(vma, gate_vma)) {
  		unsigned long addr;
@@ -160,7 +160,7 @@
  			struct page *page;
  			struct vm_area_struct *vma;
  
-@@ -1846,17 +1877,92 @@ cleanup:
+@@ -1783,17 +1814,105 @@ cleanup:
  #undef NUM_NOTES
  }
  
@@ -185,6 +185,19 @@
 +	{ .ctl_name = 0 }
 +};
 +
++#if BITS_PER_LONG > 32 && ELF_CLASS == ELFCLASS32
++static ctl_table binfmt_elf_sysctl_32bit_dir[] = {
++	{
++		.ctl_name = CTL_UNNUMBERED,
++		.procname = "32bit",
++		.mode = 0555,
++		.child = elf_core_dump_sysctls,
++	},
++	{ .ctl_name = 0 }
++};
++#define elf_core_dump_sysctls binfmt_elf_sysctl_32bit_dir
++#endif
++
 +static ctl_table binfmt_elf_sysctl_dir[] = {
 +	{
 +		.ctl_name = CTL_UNNUMBERED,




More information about the fedora-extras-commits mailing list