Page MenuHomeFreeBSD

Allow ddb and dtrace use the DMAP region on arm64
ClosedPublic

Authored by andrew on Sep 21 2021, 5:37 PM.
Tags
None
Referenced Files
F102412855: D32053.diff
Mon, Nov 11, 10:38 PM
Unknown Object (File)
Wed, Oct 16, 6:45 PM
Unknown Object (File)
Mon, Oct 14, 5:39 PM
Unknown Object (File)
Sep 23 2024, 9:16 AM
Unknown Object (File)
Sep 22 2024, 12:57 AM
Unknown Object (File)
Sep 21 2024, 10:57 PM
Unknown Object (File)
Sep 21 2024, 12:38 PM
Unknown Object (File)
Sep 19 2024, 6:30 PM
Subscribers

Details

Summary

When writing to memory on arm64 we may be trying to be accessing a
read-only page. In this case try to access via the DMAP region to
get a writable location.

While here simplify writing data in DDB and stop trashing the size as
it is passed into the cache handling functions.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41627
Build 38516: arc lint + arc unit

Event Timeline

Why should the DMAP alias be writable? Its protections are supposed to be kept in sync with the corresponding KVA page. You add a comment to this effect in D32026, but I think pmap_change_props_locked() is still missing the code that actually updates the DMAP protections (at least I don't see it).

  • Split out the translate code inot a new function
  • Add dtrace support
andrew retitled this revision from Allow ddb to write via the DMAP region on arm64 to Allow ddb and dtrace use the DMAP region on arm64.Sep 23 2021, 12:54 PM
andrew edited the summary of this revision. (Show Details)

Why should the DMAP alias be writable? Its protections are supposed to be kept in sync with the corresponding KVA page. You add a comment to this effect in D32026, but I think pmap_change_props_locked() is still missing the code that actually updates the DMAP protections (at least I don't see it).

In the current version of that change I forced the DMAP to be writable. I expect to change it to match the comment when I have time to update arm64_get_writable_addr to map the memory as writable.

This revision was not accepted when it landed; it landed in state Needs Review.Oct 1 2021, 10:28 AM
This revision was automatically updated to reflect the committed changes.