[Bug 274198] ktrace: logs only one arg for symlink() call

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 01 Oct 2023 19:55:31 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274198

--- Comment #3 from Ivan Rozhuk <rozhuk.im@gmail.com> ---
(In reply to Mark Johnston from comment #2)

> NAMEI events are generated by namei().  symlink(2) doesn't call namei() on the second parameter, so this patch doesn't really make sense.

vn_getcwd() and few other places call ktrnamei().
I do not understand why call ktrnamei() directly is wrong.


> ktrace(2) in general does not show you arbitrary system call parameters.

It is enough for my purposes to get few NAMEI, like:
    47 ktrace   CALL  execve(0x7fffffffdfb6,0x7fffffffd970,0x7fffffffd980)
    47 ktrace   NAMI  "build-install_media.sh"
    47 ktrace   NAMI  "/bin/sh"
    47 ktrace   NAMI  "/libexec/ld-elf.so.1"
    47 sh       RET   execve JUSTRETURN

> But if you want to see parameters, you can also just use truss or dtrace.

I need get list of all files that was read with abs path.
I wrote tool to parse ktrace file, it keep context of process and convert path
to abs on logging and filter crap out of src dir.
I can not use truss without modifications to get same results.

-- 
You are receiving this mail because:
You are the assignee for the bug.