[PATCH] access user space addresses/switch process context
Keith Owens
kaos at sgi.com
Wed Apr 16 06:11:25 PDT 2003
On Wed, 16 Apr 2003 23:01:19 +1000,
Keith Owens <kaos at sgi.com> wrote:
>On Wed, 16 Apr 2003 17:31:33 +0530,
>"Vamsi Krishna S ." <vamsi at in.ibm.com> wrote:
>>diff -urN -X /home/vamsi/.dontdiff 2420-kdb4.1-pure/kdb/kdbsupport.c 2420-kdb4.1/kdb/kdbsupport.c
>>--- 2420-kdb4.1-pure/kdb/kdbsupport.c 2003-04-16 11:38:14.000000000 +0530
>>+++ 2420-kdb4.1/kdb/kdbsupport.c 2003-04-16 12:56:42.000000000 +0530
>>+/*
>>+ * from mm/memory.c, adapted to run without any locks to work within kdb
>>+ */
>>+static struct page * kdb_follow_page(struct mm_struct *mm, unsigned long address, int write)
>
>AFAICT this function is identical to follow_page(). Instead of
>duplicating that code and possibly getting out of sync with the real
>follow_page(), change follow_page() so it is extern for CONFIG_KDB=y,
>otherwise it is static.
Sorry for the scattered mails, things are a bit hectic at the moment.
Forget about making follow_page() extern. Instead add
kdb_get_one_user_page to the end of mm/memory.c so it can access the
private mm data and functions.
Also kdb_getuserarea_size() needs to be exported, any module that does
kdb_getarea() will end up with a call to kdb_getuserarea_size().
More information about the kdb
mailing list