Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTrace Guide: invalid user access on OSX #97

Open
JustinChristensen opened this issue Sep 21, 2020 · 0 comments
Open

DTrace Guide: invalid user access on OSX #97

JustinChristensen opened this issue Sep 21, 2020 · 0 comments

Comments

@JustinChristensen
Copy link

JustinChristensen commented Sep 21, 2020

On OSX, processes that request PT_DENY_ATTACH with the ptrace system call will cause dtrace to log a message about invalid user access when attempting to access that process' memory.

[[email protected]] (master) $ sudo dtruss -n ssh-agent
dtrace: error on enabled probe ID 2708 (ID 224: syscall::accept:return): invalid user access in action #5 at DIF offset 0

The OSX dtrace manual page makes no reference to this, and this behavior and message may lead dtrace beginners, like me, to think that they're incorrectly accessing memory they haven't copied into the dtrace address space yet.

There's also no way that I see to force dtrace on OSX to ignore PT_DENY_ATTACH processes, but that's a separate issue from the documentation itself.

@rmustacc thought that this behavior might be worth documenting in the dtrace guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant