summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vserver-sources/old/2.1.1_rc21-r1/4412_vs2.1.1-rc21-ioport-fix01.patch')
-rw-r--r--vserver-sources/old/2.1.1_rc21-r1/4412_vs2.1.1-rc21-ioport-fix01.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/vserver-sources/old/2.1.1_rc21-r1/4412_vs2.1.1-rc21-ioport-fix01.patch b/vserver-sources/old/2.1.1_rc21-r1/4412_vs2.1.1-rc21-ioport-fix01.patch
new file mode 100644
index 0000000..3c879e8
--- /dev/null
+++ b/vserver-sources/old/2.1.1_rc21-r1/4412_vs2.1.1-rc21-ioport-fix01.patch
@@ -0,0 +1,55 @@
+diff -NurpP linux-2.6.16.17-vs2.1.1-rc21/arch/i386/kernel/ioport.c linux-2.6.16.17-vs2.1.1-rc21.z/arch/i386/kernel/ioport.c
+--- linux-2.6.16.17-vs2.1.1-rc21/arch/i386/kernel/ioport.c 2006-02-15 13:54:10 +0100
++++ linux-2.6.16.17-vs2.1.1-rc21.z/arch/i386/kernel/ioport.c 2006-05-25 20:08:33 +0200
+@@ -64,7 +64,9 @@ asmlinkage long sys_ioperm(unsigned long
+
+ if ((from + num <= from) || (from + num > IO_BITMAP_BITS))
+ return -EINVAL;
+- if (turn_on && !capable(CAP_SYS_RAWIO))
++ printk("IOPERM: (%d:%d) range 0x%04lx-0x%04lx\n",
++ current->xid, current->pid, from, from+num);
++ if (0 && turn_on && !capable(CAP_SYS_RAWIO))
+ return -EPERM;
+
+ /*
+diff -NurpP linux-2.6.16.17-vs2.1.1-rc21/drivers/char/mem.c linux-2.6.16.17-vs2.1.1-rc21.z/drivers/char/mem.c
+--- linux-2.6.16.17-vs2.1.1-rc21/drivers/char/mem.c 2006-01-18 06:08:00 +0100
++++ linux-2.6.16.17-vs2.1.1-rc21.z/drivers/char/mem.c 2006-05-25 20:12:59 +0200
+@@ -121,6 +121,8 @@ static ssize_t read_mem(struct file * fi
+
+ if (!valid_phys_addr_range(p, &count))
+ return -EFAULT;
++ printk("MEM: (%d:%d) read 0x%04lx-0x%04lx\n",
++ current->xid, current->pid, p, p+count);
+ read = 0;
+ #ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED
+ /* we don't have page 0 mapped on sparc and m68k.. */
+@@ -179,6 +181,8 @@ static ssize_t write_mem(struct file * f
+
+ if (!valid_phys_addr_range(p, &count))
+ return -EFAULT;
++ printk("MEM: (%d:%d) write 0x%04lx-0x%04lx\n",
++ current->xid, current->pid, p, p+count);
+
+ written = 0;
+
+@@ -253,6 +257,9 @@ static int mmap_mem(struct file * file,
+
+ if (!valid_mmap_phys_addr_range(vma->vm_pgoff << PAGE_SHIFT, &size))
+ return -EINVAL;
++ printk("MEM: (%d:%d) mmap 0x%04lx-0x%04lx\n",
++ current->xid, current->pid, vma->vm_pgoff << PAGE_SHIFT,
++ (vma->vm_pgoff << PAGE_SHIFT) + size);
+
+ vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff,
+ size,
+@@ -762,6 +769,9 @@ static loff_t memory_lseek(struct file *
+
+ static int open_port(struct inode * inode, struct file * filp)
+ {
++ printk("MEM: (%d:%d) open\n",
++ current->xid, current->pid);
++ return 0;
+ return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
+ }
+