kdb
[Top] [All Lists]

[PATCH] for Bug kdb 4.3 user context not working correctly.

To: kaos@xxxxxxx
Subject: [PATCH] for Bug kdb 4.3 user context not working correctly.
From: Prasanna S Panchamukhi <prasanna@xxxxxxxxxx>
Date: Fri, 14 Nov 2003 20:21:03 +0530
Cc: kdb@xxxxxxxxxxx, suparna@xxxxxxxxxx, prasanna@xxxxxxxxxx
Reply-to: prasanna@xxxxxxxxxx
Sender: kdb-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4i
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

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] for Bug kdb 4.3 user context not working correctly., Prasanna S Panchamukhi <=