Page MenuHomeFreeBSD

dtrace: fix userspace access on boxes with SMAP
ClosedPublic

Authored by mjg on Dec 13 2018, 7:31 PM.

Details

Summary

This in particular fixes ustack().

illumos also has SMAP support and patched the same routines, but with adding func calls inside. The files already diverged regardless of this so I think we should go for ifunc (as in this patch).

Test Plan

dtrace -n 'pid$target:::entry { @[ustack()] = count(); }' -c /bin/sh

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mjg created this revision.Dec 13 2018, 7:31 PM
mjg edited the summary of this revision. (Show Details)Dec 13 2018, 7:31 PM
markj accepted this revision.Dec 13 2018, 7:41 PM

Thanks. Do you plan to MFC this?

sys/cddl/dev/dtrace/amd64/dtrace_asm.S
357 ↗(On Diff #51967)

The order of stac/clac is inverted here.

mjg marked an inline comment as done.Dec 13 2018, 7:53 PM

Yea, 1 week.

too bad i did not find this before 12.0, i guess it can get in as an EN.

sys/cddl/dev/dtrace/amd64/dtrace_asm.S
357 ↗(On Diff #51967)

ops, thanks

This revision was not accepted when it landed; it landed in state Needs Review.Dec 13 2018, 8:12 PM
This revision was automatically updated to reflect the committed changes.