Page MenuHomeFreeBSD

dtrace: fix userspace access on boxes with SMAP
ClosedPublic

Authored by mjg on Dec 13 2018, 7:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 6:49 AM
Unknown Object (File)
Thu, Nov 14, 7:30 PM
Unknown Object (File)
Oct 6 2024, 12:04 PM
Unknown Object (File)
Sep 8 2024, 10:39 PM
Unknown Object (File)
Sep 8 2024, 8:17 PM
Unknown Object (File)
Sep 8 2024, 11:42 AM
Unknown Object (File)
Aug 15 2024, 10:24 AM
Unknown Object (File)
Aug 15 2024, 6:23 AM
Subscribers

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

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 21542

Event Timeline

Thanks. Do you plan to MFC this?

sys/cddl/dev/dtrace/amd64/dtrace_asm.S
357

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

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.