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
Unknown Object (File)
Mar 7 2024, 5:03 PM
Unknown Object (File)
Feb 21 2024, 7:02 AM
Unknown Object (File)
Dec 29 2023, 4:48 PM
Unknown Object (File)
Dec 20 2023, 2:28 AM
Unknown Object (File)
Dec 18 2023, 6:18 PM
Unknown Object (File)
Dec 7 2023, 8:43 PM
Unknown Object (File)
Nov 23 2023, 12:47 AM
Unknown Object (File)
Nov 14 2023, 12:42 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.