Hi,

While accessing the userspace page, the address was aligned to the next page
boundry. This was giving the kdb_getarea: Bad area message while dumping the memory.

The fix below for linux-2.4.23-rc1 takes care of aligning the address to the current 
page boundry and
now the dumping memory within this page should not be a problem.

diff -urNp linux.orig/kdb/kdbsupport.c linux-rc1+kdb/kdb/kdbsupport.c
--- linux.orig/kdb/kdbsupport.c 2003-11-15 12:41:05.000000000 +0530
+++ linux-rc1+kdb/kdb/kdbsupport.c      2003-11-15 12:25:00.000000000 +0530
@@ -815,7 +815,10 @@ static struct page * kdb_get_one_user_pa
                return NULL;
        }
 
-       start = PAGE_ALIGN(start);
+       /* we need to align start address to the current page boundy, PAGE_ALIGN
+        * aligns to next page boundry. 
+        */
+       start = start & PAGE_MASK;
        flags = write ? (VM_WRITE | VM_MAYWRITE) : (VM_READ | VM_MAYREAD);
 
        vma = find_extend_vma(mm, start);
-- 
Thanks & Regards
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Ph: 91-80-5044632

Reply via email to