03-19-05 07:47 AM
G'Day Gary,
On 18 Mar 2005, Gary Mills wrote:
> I'm attempting to display the contents of the data buffer from the
> putmsg system call using dtrace. This is on sparc, with the 32-bit
> executable and 64-bit kernel. Here's my last try, but it only
> complains about a null pointer in the `trace' statement:
>
> struct strbuf {
> int maxlen;
> int len;
> char *buf;
> };
> self struct strbuf *x;
> syscall::putmsg:entry
> /pid != $pid/
> {
> self->x = copyin(arg2, sizeof(struct strbuf));
> trace(copyinstr(self->x->buf));
> }
>
> What's the proper way to display the buffer? I have read the
> 400-page manual.
Try this,
# dtrace -n 'syscall::putmsg:entry {
trace(copyinstr((uintptr_t)((struct strbuf *)arg2)->buf)); }'
dtrace: description 'syscall::putmsg:entry ' matched 1 probe
CPU ID FUNCTION:NAME
0 153 putmsg:entry Mar 19 19:40:55 ssh[21182]:
[ID 514540 FACILITY_AND_PRIORITY] libpkcs11: No slots presented from
/usr/lib/security/pkcs11_kernel.so. Skipping this plug-in at this time.
I tested it with a few commands like logger, but the message above came
from ssh. Looks like it is asking the Solaris Cryptographic Framework for
a hand at doing encryption?...
Brendan
[Sydney, Australia]
[ Post a follow-up to this message ]
|