freebsd-skq/cddl/lib
markj 2fd28e2373 MFC r256571:
Add a function, memstr, which can be used to convert a buffer of
null-separated strings to a single string. This can be used to print the
full arguments of a process using execsnoop (from the DTrace toolkit) or
with the following one-liner:

dtrace -n 'syscall::execve:return {trace(curpsinfo->pr_psargs);}'

Note that this relies on the process arguments being cached via the struct
proc, which means that it will not work for argvs longer than
kern.ps_arg_cache_limit. However, the following rather non-portable
script can be used to extract any argv at exec time:

fbt::kern_execve:entry
{
    printf("%s", memstr(args[1]->begin_argv, ' ',
        args[1]->begin_envv - args[1]->begin_argv));
}

The debug.dtrace.memstr_max sysctl limits the maximum argument size to
memstr().
2014-08-04 15:36:22 +00:00
..
drti Work around the implementation of LIBRARIES_ONLY. It causes drti.o to 2013-05-07 22:05:57 +00:00
libavl Remove manual .includes in cddl Makefiles 2010-03-02 19:04:07 +00:00
libctf Remove manual .includes in cddl Makefiles 2010-03-02 19:04:07 +00:00
libdtrace MFC r256571: 2014-08-04 15:36:22 +00:00
libnvpair Introduce "feature flags" for ZFS pools (bump SPA version to 5000). 2012-06-11 11:35:22 +00:00
libumem Remove manual .includes in cddl Makefiles 2010-03-02 19:04:07 +00:00
libuutil Remove manual .includes in cddl Makefiles 2010-03-02 19:04:07 +00:00
libzfs MFC r266520: 2014-05-27 18:22:52 +00:00
libzfs_core Move common zfs ioctl compatibility functions (userland) into libzfs_compat.c 2013-03-18 09:32:29 +00:00
libzpool Build all ZFS testing & debugging tools with -g. 2013-08-27 04:01:31 +00:00
tests MFC r264741: Add placeholder Kyuafiles for various top-level hierarchies. 2014-04-28 04:20:14 +00:00
Makefile MFC r264741: Add placeholder Kyuafiles for various top-level hierarchies. 2014-04-28 04:20:14 +00:00
Makefile.inc Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00