rpms/kernel/devel kernel-2.6.spec, 1.3203, 1.3204 linux-2.6-devmem.patch, 1.15, 1.16

Dave Jones (davej) fedora-extras-commits at redhat.com
Mon Jun 4 21:42:11 UTC 2007


Author: davej

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

Modified Files:
	kernel-2.6.spec linux-2.6-devmem.patch 
Log Message:
* Mon Jun 04 2007 Dave Jones <davej at redhat.com>
- Allow kdump to read /proc/kcore. (#241362)



Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3203
retrieving revision 1.3204
diff -u -r1.3203 -r1.3204
--- kernel-2.6.spec	4 Jun 2007 21:38:14 -0000	1.3203
+++ kernel-2.6.spec	4 Jun 2007 21:41:02 -0000	1.3204
@@ -2051,6 +2051,9 @@
 
 %changelog
 * Mon Jun 04 2007 Dave Jones <davej at redhat.com>
+- Allow kdump to read /proc/kcore. (#241362)
+
+* Mon Jun 04 2007 Dave Jones <davej at redhat.com>
 - 2.6.22-rc3-git7
 
 * Mon Jun 04 2007 Dave Jones <davej at redhat.com>

linux-2.6-devmem.patch:

Index: linux-2.6-devmem.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-devmem.patch,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- linux-2.6-devmem.patch	3 Jun 2007 19:01:57 -0000	1.15
+++ linux-2.6-devmem.patch	4 Jun 2007 21:41:02 -0000	1.16
@@ -628,3 +628,33 @@
  #endif /* __KERNEL__ */
  
  #endif /* _X86_64_PAGE_H */
+--- linux-2.6.20.noarch/fs/proc/kcore.c.orig	2007-06-04 15:44:29.000000000 -0400
++++ linux-2.6.20.noarch/fs/proc/kcore.c	2007-06-04 15:48:57.000000000 -0400
+@@ -23,10 +23,10 @@
+ #include <asm/io.h>
+ 
+ #define CORE_STR "CORE"
+-
++unsigned int allow_kcore_access = 0;
+ static int open_kcore(struct inode * inode, struct file * filp)
+ {
+-	return -EPERM;
++	return (capable(CAP_SYS_RAWIO) && allow_kcore_access) ? 0 : -EPERM;
+ }
+ 
+ static ssize_t read_kcore(struct file *, char __user *, size_t, loff_t *);
+--- linux-2.6.20.noarch/arch/x86_64/kernel/machine_kexec.c.orig	2007-06-04 15:50:52.000000000 -0400
++++ linux-2.6.20.noarch/arch/x86_64/kernel/machine_kexec.c	2007-06-04 15:52:14.000000000 -0400
+@@ -236,10 +236,12 @@
+  * Useful for holding code to do something appropriate
+  * after a kernel panic.
+  */
++extern int allow_kcore_access;
+ static int __init setup_crashkernel(char *arg)
+ {
+ 	unsigned long size, base;
+ 	char *p;
++	allow_kcore_access = 1; /*enable ability to read /proc/kcore*/
+ 	if (!arg)
+ 		return -EINVAL;
+ 	size = memparse(arg, &p);




More information about the fedora-extras-commits mailing list