On Sun, Mar 14, 2010 at 07:42:08PM -0700, tester wrote:
> Ouch, copyin bites again. 

Remember: copyin() returns the kernel address of the buffer into which
it copied the data that you asked for.  To get to the data you have to
dereference that pointer.

> BTW, can you please explain the 8 byte difference in o/p
> 
> fbt::door_call:entry
> {
>    printf("entry args are %x  and %a \n", arg0, copyin(arg1,4));
>    door_arg = (curpsinfo->pr_dmodel == PR_MODEL_ILP32 ? copyin(arg1, 4) : 
> copyin(arg1, 8));
>    printf("argument pointer %a \n", door_arg);
> }
> 
> 8 bytes difference in o/p
> 
> entry args are 3 and 0x30226000040
> argument pointer 0x30226000048
> 
> I was expecting either a 32bit or 64 bit address. I am getting 44 bit address.

That's printing the kernel address returned by copyin().  Try this:

fbt::door_call:entry
/curpsinfo->pr_dmodel == PR_MODEL_ILP32/
{
        printf("entry args are %x and %x \n", arg0, *(uint32_t *)copyin(arg1, 
4));
}

fbt::door_call:entry
/curpsinfo->pr_dmodel == PR_MODEL_LP64/
{
        printf("entry args are %lx and %lx \n", arg0, *(uint64_t *)copyin(arg1, 
8));
}

Nico
-- 
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to