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)
Mon, Feb 17, 6:23 AM
Unknown Object (File)
Wed, Jan 29, 6:20 AM
Unknown Object (File)
Wed, Jan 22, 4:59 PM
Unknown Object (File)
Jan 19 2025, 9:56 AM
Unknown Object (File)
Jan 18 2025, 2:24 AM
Unknown Object (File)
Jan 8 2025, 7:47 PM
Unknown Object (File)
Dec 29 2024, 12:40 AM
Unknown Object (File)
Dec 7 2024, 8: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.