loc2c-runtime deref()

Frank Ch. Eigler fche@redhat.com
Thu Aug 18 21:50:00 GMT 2005


Hi -

roland wrote:

> > Then can you please educate me/us about how come your macros call
> > __get_user_asm, the same routines defined in asm/uaccess.h that are
> > used for get_user(), copy_from_user(), and so on?
> 
> __get_user_asm is a handy macro that implements the fetch with fault
> recovery.  Read the uaccess.h code to see what it does.  [...]

OK.  So you are indeed passing kernel-space pointers to this routine,
which in (all?) other cases is given __user pointers.  This works
because normally the kernel address space is mapped at constant
addresses, and that this low-level function bypasses the usual
access_ok checks.  It is in a way a coincidence.

> I provided macros that work.  [...]

OK.  (It would not work on 4G+4G, right?)

- FChE



More information about the Systemtap mailing list