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, Apr 18, 12:37 PM
Unknown Object (File)
Feb 15 2024, 10:28 PM
Unknown Object (File)
Feb 14 2024, 5:42 PM
Unknown Object (File)
Feb 12 2024, 6:43 PM
Unknown Object (File)
Dec 23 2023, 11:16 AM
Unknown Object (File)
Nov 12 2023, 6:00 PM
Unknown Object (File)
Nov 8 2023, 9:13 PM
Unknown Object (File)
Nov 8 2023, 4:51 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.