]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: Support Linux-specific handling of envp / argv in psinfo
authorKris Van Hees <kris.van.hees@oracle.com>
Wed, 14 Oct 2015 12:09:29 +0000 (08:09 -0400)
committerKris Van Hees <kris.van.hees@oracle.com>
Wed, 18 Nov 2015 00:54:10 +0000 (19:54 -0500)
commit20492dfd41f6586db3cae23b28dc485c0179c94a
tree39d98e09ab4cf3a30cdddcff9cefe8f0d1d3a625
parentcea402192274d90729e0b9befd3d735bf518b0e7
dtrace: Support Linux-specific handling of envp / argv in psinfo

The implementation of retrievable envp and argv psinfo in Linux
requires those arrays to be located in kernel memory whereas in
traditional systems with DTrace implementations this was found in
userspace memory.  Therefore, scripts expect to be able to access
this memory using copyin().  We look at the address passed in for
a copyin operation (or copyinstr) and if it is one of these special
cases, we simply pretend to retrieve data from userspace while in
reality we're simply retrieving the data from kernel space.

Orabug: 21984854
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>
dtrace/dtrace_asm_sparc64.S
dtrace/dtrace_isa.c
dtrace/dtrace_isa_x86_64.c
dtrace/include/dtrace/dtrace_impl.h