rpms/kernel/devel config-generic, 1.68, 1.69 kernel.spec, 1.420, 1.421 linux-2.6-devmem.patch, 1.22, 1.23
Dave Jones (davej)
fedora-extras-commits at redhat.com
Tue Feb 12 23:52:12 UTC 2008
Author: davej
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3292
Modified Files:
config-generic kernel.spec linux-2.6-devmem.patch
Log Message:
* Tue Feb 12 2008 Dave Jones <davej at redhat.com>
- Add latest version of almost-upstream restricted devmem patch.
Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-generic,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- config-generic 12 Feb 2008 23:42:49 -0000 1.68
+++ config-generic 12 Feb 2008 23:51:15 -0000 1.69
@@ -3404,8 +3404,7 @@
# CONFIG_SAMPLES is not set
-# CONFIG_WRITABLE_DEVMEM is not set
-# CONFIG_WRITABLE_DEVKMEM is not set
+# CONFIG_DEVKMEM is not set
CONFIG_PM_TRACE_RTC=y
CONFIG_R6040=m
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.420
retrieving revision 1.421
diff -u -r1.420 -r1.421
--- kernel.spec 12 Feb 2008 23:38:23 -0000 1.420
+++ kernel.spec 12 Feb 2008 23:51:15 -0000 1.421
@@ -1738,6 +1738,9 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
%changelog
+* Tue Feb 12 2008 Dave Jones <davej at redhat.com>
+- Add latest version of almost-upstream restricted devmem patch.
+
* Tue Feb 12 2008 Kyle McMartin <kmcmartin at redhat.com>
- Linux 2.6.25-rc1-git2
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.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- linux-2.6-devmem.patch 12 Feb 2008 06:18:04 -0000 1.22
+++ linux-2.6-devmem.patch 12 Feb 2008 23:51:15 -0000 1.23
@@ -1,497 +1,119 @@
-diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
-index 25aef62..ec4700c 100644
---- a/arch/ia64/mm/init.c
-+++ b/arch/ia64/mm/init.c
-@@ -227,6 +227,12 @@ free_initrd_mem (unsigned long start, unsigned long end)
- }
- }
-
-+int page_is_ram(unsigned long pagenr)
-+{
-+ //FIXME: implement w/efi walk
-+ return 1;
-+}
-+
- /*
- * This installs a clean page in the kernel's page table.
- */
-diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
-index 93a5c53..27d9f33 100644
---- a/arch/powerpc/mm/mem.c
-+++ b/arch/powerpc/mm/mem.c
-@@ -44,6 +44,7 @@
- #include <asm/tlb.h>
- #include <asm/lmb.h>
- #include <asm/sections.h>
-+#include <asm/rtas.h>
- #include <asm/vdso.h>
-
- #include "mmu_decl.h"
-@@ -329,6 +330,19 @@ void __init mem_init(void)
- max_mapnr = max_pfn;
- totalram_pages += free_all_bootmem();
- #endif
-+
-+#ifdef CONFIG_PPC_PSERIES
-+ /* Mark the RTAS pages as PG_reserved so userspace can mmap them */
-+ if (rtas_rmo_buf) {
-+ unsigned long pfn, start_pfn, end_pfn;
-+
-+ start_pfn = rtas_rmo_buf >> PAGE_SHIFT;
-+ end_pfn = (rtas_rmo_buf + RTAS_RMOBUF_MAX) >> PAGE_SHIFT;
-+ for (pfn = start_pfn; pfn < end_pfn; pfn++)
-+ SetPageReserved(pfn_to_page(pfn));
-+ }
-+#endif
-+
- for_each_online_pgdat(pgdat) {
- for (i = 0; i < pgdat->node_spanned_pages; i++) {
- if (!pfn_valid(pgdat->node_start_pfn + i))
-diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
-index 983ec6e..e727fd0 100644
---- a/arch/s390/mm/init.c
-+++ b/arch/s390/mm/init.c
-@@ -137,6 +137,11 @@ void __init paging_init(void)
- free_area_init_nodes(max_zone_pfns);
- }
-
-+int page_is_ram(unsigned long pagenr)
-+{
-+ return pagenr < max_mapnr;
-+}
-+
- void __init mem_init(void)
- {
- unsigned long codesize, reservedpages, datasize, initsize;
-diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
-index d1d8c34..2de224b 100644
---- a/arch/x86/kernel/setup_32.c
-+++ b/arch/x86/kernel/setup_32.c
-@@ -465,12 +465,16 @@ static inline unsigned long long get_total_mem(void)
- }
-
- #ifdef CONFIG_KEXEC
-+extern int allow_kcore_access;
-+
- static void __init reserve_crashkernel(void)
- {
- unsigned long long total_mem;
- unsigned long long crash_size, crash_base;
- int ret;
-
-+ allow_kcore_access = 1; /*enable ability to read /proc/kcore*/
-+
- total_mem = get_total_mem();
-
- ret = parse_crashkernel(boot_command_line, total_mem,
-diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
-index d1bc040..50d4b66 100644
---- a/arch/x86/mm/init_32.c
-+++ b/arch/x86/mm/init_32.c
-@@ -217,6 +217,25 @@ static inline int page_kills_ppro(unsigned long pagenr)
- return 0;
- }
-
-+/*
-+ * devmem_is_allowed() checks to see if /dev/mem access to a certain address is
-+ * valid. The argument is a physical page number.
-+ *
-+ *
-+ * On x86, access has to be given to the first megabyte of ram because that area
-+ * contains bios code and data regions used by X and dosemu and similar apps.
-+ * Access has to be given to non-kernel-ram areas as well, these contain the PCI
-+ * mmio resources as well as potential bios/acpi data regions.
-+ */
-+int devmem_is_allowed(unsigned long pagenr)
-+{
-+ if (pagenr <= 256)
-+ return 1;
-+ if (!page_is_ram(pagenr))
-+ return 1;
-+ return 0;
-+}
-+
- #ifdef CONFIG_HIGHMEM
- pte_t *kmap_pte;
- pgprot_t kmap_prot;
-diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
-index 5fe880f..a270b48 100644
---- a/arch/x86/mm/init_64.c
-+++ b/arch/x86/mm/init_64.c
-@@ -479,6 +479,25 @@ EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
- static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel,
- kcore_modules, kcore_vsyscall;
+From: Arjan van de Ven <arjan at linux.intel.com>
+Subject: [PATCH] make /dev/kmem a config option
+
+This patch makes /dev/kmem a config option; /dev/kmem is VERY rarely
+used, and when used, it's generally for no good (rootkits tend to be
+the most common users). With this config option, users have the
+choice to disable /dev/kmem, saving some size as well.
+
+A patch to disable /dev/kmem has been in the Fedora and RHEL kernels for
+4+ years now without any known problems or legit users of /dev/kmem.
+
+Signed-off-by: Arjan van de Ven <arjan at linux.intel.com>
+---
+ drivers/char/Kconfig | 8 ++++++++
+ drivers/char/mem.c | 10 ++++++++++
+ 2 files changed, 18 insertions(+)
+
+Index: linux.trees.git/drivers/char/Kconfig
+===================================================================
+--- linux.trees.git.orig/drivers/char/Kconfig
++++ linux.trees.git/drivers/char/Kconfig
+@@ -80,6 +80,14 @@ config VT_HW_CONSOLE_BINDING
+ information. For framebuffer console users, please refer to
+ <file:Documentation/fb/fbcon.txt>.
-+/*
-+ * devmem_is_allowed() checks to see if /dev/mem access to a certain address is
-+ * valid. The argument is a physical page number.
-+ *
-+ *
-+ * On x86-64, access has to be given to the first 1MB of ram because that area
-+ * contains bios code and data regions used by X and dosemu and similar apps.
-+ * Access has to be given to non-kernel-ram areas as well, these contain the
-+ * PCI MMIO resources as well as potential bios/acpi data regions.
-+ */
-+int devmem_is_allowed(unsigned long pagenr)
-+{
-+ if (pagenr <= 256)
-+ return 1;
-+ if (!page_is_ram(pagenr))
-+ return 1;
-+ return 0;
-+}
-+
- void __init mem_init(void)
- {
- long codesize, reservedpages, datasize, initsize;
-diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
-index f01ac9a..54a2f8c 100644
---- a/drivers/char/Kconfig
-+++ b/drivers/char/Kconfig
-@@ -1047,6 +1047,20 @@ config DEVPORT
- depends on ISA || PCI
- default y
-
-+config WRITABLE_DEVMEM
-+ bool "Allow writing to /dev/mem"
++config DEVKMEM
++ bool "/dev/kmem virtual device support"
+ help
-+ Very little software actually requires a writable /dev/mem
-+ Disabling this feature will close off a potential attack
-+ vector for kernel rootkits.
-+
-+config WRITABLE_DEVKMEM
-+ bool "Allow writing to /dev/kmem"
-+ help
-+ Very little software actually requires a writable /dev/kmem
-+ Disabling this feature will close off a potential attack
-+ vector for kernel rootkits.
-+
- source "drivers/s390/char/Kconfig"
-
- endmenu
-diff --git a/drivers/char/mem.c b/drivers/char/mem.c
-index 20070b7..9393369 100644
---- a/drivers/char/mem.c
-+++ b/drivers/char/mem.c
-@@ -108,6 +108,23 @@ static inline int valid_mmap_phys_addr_range(unsigned long pfn, size_t size)
- }
- #endif
-
-+static inline int range_is_allowed(unsigned long from, unsigned long to)
-+{
-+ unsigned long cursor;
-+
-+ cursor = from >> PAGE_SHIFT;
-+ while ((cursor << PAGE_SHIFT) < to) {
-+ if (!devmem_is_allowed(cursor)) {
-+ printk(KERN_INFO "Program %s tried to read /dev/mem "
-+ "between %lx->%lx.\n",
-+ current->comm, from, to);
-+ return 0;
-+ }
-+ cursor++;
-+ }
-+ return 1;
-+}
-+
- /*
- * This funcion reads the *physical* memory. The f_pos points directly to the
- * memory location.
-@@ -157,6 +174,9 @@ static ssize_t read_mem(struct file * file, char __user * buf,
- */
- ptr = xlate_dev_mem_ptr(p);
-
-+ //FIXME: Add write-once sysctl
-+ //if (!range_is_allowed(p, p+count))
-+ // return -EPERM;
- if (copy_to_user(buf, ptr, sz))
- return -EFAULT;
- buf += sz;
-@@ -169,6 +189,7 @@ static ssize_t read_mem(struct file * file, char __user * buf,
- return read;
++ Say Y here if you want to support the /dev/kmem device. The
++ /dev/kmem device is rarely used, but can be used for certain
++ kind of kernel debugging operations.
++ When in doubt, say "N".
++
+ config SERIAL_NONSTANDARD
+ bool "Non-standard serial port support"
+ depends on HAS_IOMEM
+Index: linux.trees.git/drivers/char/mem.c
+===================================================================
+--- linux.trees.git.orig/drivers/char/mem.c
++++ linux.trees.git/drivers/char/mem.c
+@@ -295,6 +295,7 @@ static int mmap_mem(struct file * file,
+ return 0;
}
-+#ifdef CONFIG_WRITABLE_DEVMEM
- static ssize_t write_mem(struct file * file, const char __user * buf,
- size_t count, loff_t *ppos)
++#ifdef CONFIG_DEVKMEM
+ static int mmap_kmem(struct file * file, struct vm_area_struct * vma)
{
-@@ -214,6 +235,8 @@ static ssize_t write_mem(struct file * file, const char __user * buf,
- */
- ptr = xlate_dev_mem_ptr(p);
-
-+ if (!range_is_allowed(ptr, ptr+sz))
-+ return -EPERM;
- copied = copy_from_user(ptr, buf, sz);
- if (copied) {
- written += sz - copied;
-@@ -230,6 +253,9 @@ static ssize_t write_mem(struct file * file, const char __user * buf,
- *ppos += written;
- return written;
+ unsigned long pfn;
+@@ -315,6 +316,7 @@ static int mmap_kmem(struct file * file,
+ vma->vm_pgoff = pfn;
+ return mmap_mem(file, vma);
}
-+#else
-+#define write_mem 0
+#endif
- #ifndef __HAVE_PHYS_MEM_ACCESS_PROT
- static pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
-@@ -363,6 +389,9 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
- ssize_t low_count, read, sz;
- char * kbuf; /* k-addr because vread() takes vmlist_lock rwlock */
-
-+ //FIXME: Add write-once sysctl
-+ //return -EPERM;
-+
- read = 0;
- if (p < (unsigned long) high_memory) {
- low_count = count;
-@@ -439,6 +468,7 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
- }
-
+ #ifdef CONFIG_CRASH_DUMP
+ /*
+@@ -353,6 +355,7 @@ static ssize_t read_oldmem(struct file *
+ extern long vread(char *buf, char *addr, unsigned long count);
+ extern long vwrite(char *buf, char *addr, unsigned long count);
-+#ifdef CONFIG_WRITABLE_DEVKMEM
- static inline ssize_t
- do_write_kmem(void *p, unsigned long realp, const char __user * buf,
- size_t count, loff_t *ppos)
-@@ -557,6 +587,9 @@ static ssize_t write_kmem(struct file * file, const char __user * buf,
++#ifdef CONFIG_DEVKMEM
+ /*
+ * This function reads the *virtual* memory as seen by the kernel.
+ */
+@@ -557,6 +560,7 @@ static ssize_t write_kmem(struct file *
*ppos = p;
return virtr + wrote;
}
-+#else
-+#define write_kmem 0
+#endif
#ifdef CONFIG_DEVPORT
static ssize_t read_port(struct file * file, char __user * buf,
-@@ -873,7 +906,6 @@ static const struct {
+@@ -734,6 +738,7 @@ static const struct file_operations mem_
+ .get_unmapped_area = get_unmapped_area_mem,
+ };
+
++#ifdef CONFIG_DEVKMEM
+ static const struct file_operations kmem_fops = {
+ .llseek = memory_lseek,
+ .read = read_kmem,
+@@ -742,6 +747,7 @@ static const struct file_operations kmem
+ .open = open_kmem,
+ .get_unmapped_area = get_unmapped_area_mem,
+ };
++#endif
+
+ static const struct file_operations null_fops = {
+ .llseek = null_lseek,
+@@ -820,11 +826,13 @@ static int memory_open(struct inode * in
+ filp->f_mapping->backing_dev_info =
+ &directly_mappable_cdev_bdi;
+ break;
++#ifdef CONFIG_DEVKMEM
+ case 2:
+ filp->f_op = &kmem_fops;
+ filp->f_mapping->backing_dev_info =
+ &directly_mappable_cdev_bdi;
+ break;
++#endif
+ case 3:
+ filp->f_op = &null_fops;
+ break;
+@@ -873,7 +881,9 @@ static const struct {
const struct file_operations *fops;
} devlist[] = { /* list of minor devices */
{1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
-- {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
++#ifdef CONFIG_DEVKMEM
+ {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
++#endif
{3, "null", S_IRUGO | S_IWUGO, &null_fops},
#ifdef CONFIG_DEVPORT
{4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
-diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
-index 7dd26e1..6908684 100644
---- a/fs/proc/kcore.c
-+++ b/fs/proc/kcore.c
-@@ -23,10 +23,10 @@
- #include <asm/io.h>
-
- #define CORE_STR "CORE"
--
-+unsigned int allow_kcore_access;
- static int open_kcore(struct inode * inode, struct file * filp)
- {
-- return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
-+ return (capable(CAP_SYS_RAWIO) && allow_kcore_access) ? 0 : -EPERM;
- }
-
- static ssize_t read_kcore(struct file *, char __user *, size_t, loff_t *);
-diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h
-index 05f09f9..4a6278d 100644
---- a/include/asm-alpha/page.h
-+++ b/include/asm-alpha/page.h
-@@ -93,6 +93,8 @@ typedef unsigned long pgprot_t;
- #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-
-+#define devmem_is_allowed(x) 1
-+
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
-
-diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h
-index 31ff12f..a323361 100644
---- a/include/asm-arm/page.h
-+++ b/include/asm-arm/page.h
-@@ -189,4 +189,6 @@ typedef unsigned long pgprot_t;
-
- #include <asm-generic/page.h>
-
-+#define devmem_is_allowed(x) 1
-+
- #endif
-diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h
-index 3b0156c..5470f04 100644
---- a/include/asm-cris/page.h
-+++ b/include/asm-cris/page.h
-@@ -72,5 +72,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
-
-+#define devmem_is_allowed(x) 1
-+
- #endif /* _CRIS_PAGE_H */
-
-diff --git a/include/asm-h8300/page.h b/include/asm-h8300/page.h
-index a834924..3f6df5f 100644
---- a/include/asm-h8300/page.h
-+++ b/include/asm-h8300/page.h
-@@ -77,4 +77,6 @@ extern unsigned long memory_end;
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
-
-+#define devmem_is_allowed(x) 1
-+
- #endif /* _H8300_PAGE_H */
-diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h
-index 8a8aa3f..97c0ce7 100644
---- a/include/asm-ia64/page.h
-+++ b/include/asm-ia64/page.h
-@@ -225,4 +225,6 @@ get_order (unsigned long size)
- (((current->personality & READ_IMPLIES_EXEC) != 0) \
- ? VM_EXEC : 0))
-
-+#define devmem_is_allowed(x) 1
-+
- #endif /* _ASM_IA64_PAGE_H */
-diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h
-index 3f29e2a..3b02899 100644
---- a/include/asm-m68k/page.h
-+++ b/include/asm-m68k/page.h
-@@ -227,4 +227,6 @@ static inline __attribute_const__ int __virt_to_node_shift(void)
-
- #include <asm-generic/page.h>
-
-+#define devmem_is_allowed(x) 1
-+
- #endif /* _M68K_PAGE_H */
-diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h
-index 6af480c..b92da3c 100644
---- a/include/asm-m68knommu/page.h
-+++ b/include/asm-m68knommu/page.h
-@@ -76,4 +76,6 @@ extern unsigned long memory_end;
-
- #include <asm-generic/page.h>
-
-+#define devmem_is_allowed(x) 1
-+
- #endif /* _M68KNOMMU_PAGE_H */
-diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
-index 635aa44..f3b43fb 100644
---- a/include/asm-mips/page.h
-+++ b/include/asm-mips/page.h
-@@ -187,4 +187,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
-
-+#define devmem_is_allowed(x) 1
-+
- #endif /* _ASM_PAGE_H */
-diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h
-index b08d915..7826e3d 100644
---- a/include/asm-parisc/page.h
-+++ b/include/asm-parisc/page.h
-@@ -173,4 +173,6 @@ extern int npmem_ranges;
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
-
-+#define devmem_is_allowed(x) 1
-+
- #endif /* _PARISC_PAGE_H */
-diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h
-index 61e3725..7327b1c 100644
---- a/include/asm-powerpc/page.h
-+++ b/include/asm-powerpc/page.h
-@@ -193,4 +193,6 @@ struct vm_area_struct;
- #include <asm-generic/memory_model.h>
- #endif /* __ASSEMBLY__ */
-
-+#define devmem_is_allowed(x) 1
-+
- #endif /* _ASM_POWERPC_PAGE_H */
-diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
-index ad4c5a1..cd10d2d 100644
---- a/include/asm-ppc/page.h
-+++ b/include/asm-ppc/page.h
-@@ -133,6 +133,8 @@ extern __inline__ int get_order(unsigned long size)
- /* We do define AT_SYSINFO_EHDR but don't use the gate mechanism */
- #define __HAVE_ARCH_GATE_AREA 1
-
-+#define devmem_is_allowed(x) 1
-+
- #include <asm-generic/memory_model.h>
- #endif /* __KERNEL__ */
- #endif /* _PPC_PAGE_H */
-diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h
-index a55f9d9..68ec282 100644
---- a/include/asm-s390/page.h
-+++ b/include/asm-s390/page.h
-@@ -171,4 +171,6 @@ static inline int pfn_valid(unsigned long pfn)
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
-
-+#define devmem_is_allowed(x) 1
-+
- #endif /* _S390_PAGE_H */
-diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h
-index e0fe029..ace1608 100644
---- a/include/asm-sh/page.h
-+++ b/include/asm-sh/page.h
-@@ -176,4 +176,6 @@ typedef struct { unsigned long pgd; } pgd_t;
- #define ARCH_SLAB_MINALIGN 8
- #endif
-
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __ASM_SH_PAGE_H */
-diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h
-index cbc48c0..eaeb356 100644
---- a/include/asm-sparc/page.h
-+++ b/include/asm-sparc/page.h
-@@ -161,4 +161,6 @@ extern unsigned long pfn_base;
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
-
-+#define devmem_is_allowed(x) 1
-+
- #endif /* _SPARC_PAGE_H */
-diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h
-index cdf950e..5bd81d2 100644
---- a/include/asm-sparc64/page.h
-+++ b/include/asm-sparc64/page.h
-@@ -139,6 +139,8 @@ typedef unsigned long pgprot_t;
- #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-
-+#define devmem_is_allowed(x) 1
-+
- #include <asm-generic/page.h>
-
- #endif /* _SPARC64_PAGE_H */
-diff --git a/include/asm-um/page.h b/include/asm-um/page.h
-index fe2374d..6d4fb09 100644
---- a/include/asm-um/page.h
-+++ b/include/asm-um/page.h
-@@ -115,6 +115,8 @@ extern unsigned long uml_physmem;
- extern struct page *arch_validate(struct page *page, gfp_t mask, int order);
- #define HAVE_ARCH_VALIDATE
-
-+#define devmem_is_allowed(x) 1
-+
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
-
-diff --git a/include/asm-v850/page.h b/include/asm-v850/page.h
-index 661d8cd..3c0ac0c 100644
---- a/include/asm-v850/page.h
-+++ b/include/asm-v850/page.h
-@@ -124,4 +124,6 @@ typedef unsigned long pgprot_t;
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
-
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __V850_PAGE_H__ */
-diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h
-index 1cb7c51..e480ff0 100644
---- a/include/asm-x86/page.h
-+++ b/include/asm-x86/page.h
-@@ -49,6 +49,7 @@
- #ifndef __ASSEMBLY__
-
- extern int page_is_ram(unsigned long pagenr);
-+extern int devmem_is_allowed(unsigned long pagenr);
-
- struct page;
-
+
+
+--
+If you want to reach me at my work email, use arjan at linux.intel.com
+For development, discussion and tips for power savings,
+visit http://www.lesswatts.org
+
More information about the fedora-extras-commits
mailing list