Mark Phalan
2010-05-11 14:36:54 UTC
I'd like for my provider to work properly with both 64 and 32 bit user
processes and for that I need to be able to distinguish them at runtime.
curthread->t_procp->p_model
This works fine in the global zone:
# dtrace -q -n 'BEGIN {printf("%x\n", curthread->t_procp->p_model);}'
200000
but not very well in a non-global zone:
# dtrace -q -n 'BEGIN {printf("%x\n", curthread->t_procp->p_model);}'
dtrace: error on enabled probe ID 1 (ID 1: dtrace:::BEGIN): invalid
kernel access in action #1 at DIF offset 0
I presume this is failing due to the lack of the dtrace_kernel privilege
(which cannot be granted to a zone).
Is there a better way to determine whether or not a user process is
64bit which works in a zone?
Thanks,
-M
processes and for that I need to be able to distinguish them at runtime.
From what I've seen the way people are doing that is by looking at the
value ofcurthread->t_procp->p_model
This works fine in the global zone:
# dtrace -q -n 'BEGIN {printf("%x\n", curthread->t_procp->p_model);}'
200000
but not very well in a non-global zone:
# dtrace -q -n 'BEGIN {printf("%x\n", curthread->t_procp->p_model);}'
dtrace: error on enabled probe ID 1 (ID 1: dtrace:::BEGIN): invalid
kernel access in action #1 at DIF offset 0
I presume this is failing due to the lack of the dtrace_kernel privilege
(which cannot be granted to a zone).
Is there a better way to determine whether or not a user process is
64bit which works in a zone?
Thanks,
-M