Page MenuHomeFreeBSD

Mark relocated memory region as valid
AbandonedPublic

Authored by luporl on May 7 2018, 4:05 PM.

Details

Summary

Programs using kmem to read kernel memory (ex: ktrdump) are
getting invalid address errors.
This happens because mem_valid() don't find direct mapped memory
range 0xc000...0000 in pranges.

As in pseries the kernel gets relocated to 0xc000...0000 early in
the boot phase, I thought that it would be reasonable to add
another memory region starting at the new address, with the same
size.
However, I really don't know if this is the correct way to fix
the issue.

This change is being done after MMU initialization, because
otherwise the system will panic saying 0xc000...0000 is already
being used.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 16464
Build 16383: arc lint + arc unit

Event Timeline

This is an interesting problem that I need to think about -- thanks for identifying it! I think this particular patch is not the right one, so let's put a pin in this for a couple days.

luporl commandeered this revision.Jan 7 2019, 7:38 PM
luporl added a reviewer: leandro.lupori_gmail.com.
luporl abandoned this revision.May 24 2019, 3:32 PM

This is pretty old and it seems the issue that this change was supposed to fix was already fixed in a proper way quite some time ago.