[PATCH] access user space addresses/switch process context

Vamsi Krishna S . vamsi at in.ibm.com
Wed Apr 16 07:07:35 PDT 2003


On Wed, Apr 16, 2003 at 11:11:25PM +1000, Keith Owens wrote:
> 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.
> 
No problems. Thanks for taking the time to look into it :-)

> 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.
> 
Ok.. will do.

> Also kdb_getuserarea_size() needs to be exported, any module that does
> kdb_getarea() will end up with a call to kdb_getuserarea_size().
> 
Right. I will export it.

-- 
Vamsi Krishna S.
Linux Technology Center,
IBM Software Lab, Bangalore.
Ph: +91 80 5044959
Internet: vamsi at in.ibm.com



More information about the kdb mailing list