[dtrace-discuss] destructive dtrace kernel code

2011-09-15 Thread William Reich
Hi While trying to debug a kernel driver, I was using dtrace to try and write to kernel memory. I was trying to change the return result/parameter of a function call. No luck. I see that copyout can be used to write to userspace memory. I see that there are some ways to write to

Re: [dtrace-discuss] destructive dtrace kernel code

2011-09-15 Thread Katsunori FUJIWARA
Hi, William # Sorry for un-related/un-linked reply posting, # because I joined the list after your post So, the question I ask to the mailing list - is writing to kernel memory allowed in dtrace or not? As far as I know, DTrace script can not modify any data in kernel memory space. So, once

Re: [dtrace-discuss] destructive dtrace kernel code

2011-09-15 Thread Adam Leventhal
Hi William, DTrace contains no such facility. While such a feature might be useful for kernel debugging, we decided that it presented too grave a risk. The DTrace motto is first do no harm -- it must always be safe to use in production. While destructive actions do -- as their name states --

Re: [dtrace-discuss] destructive dtrace kernel code

2011-09-15 Thread Chris Horne
You can however use 'dtrace -w' to establish complex condition filters, and then call breakpoint() - and proceed into mayhem via kmdb. -Chris NOTE: If you did not boot with kmdb enabled, you may need to run 'mdb -K' and ':c' before running 'dtrace -w'. -Chris Hi William, DTrace contains no