Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a trap on invalid physical address access #64

Open
arichardson opened this issue Jan 2, 2018 · 0 comments
Open

Add a trap on invalid physical address access #64

arichardson opened this issue Jan 2, 2018 · 0 comments

Comments

@arichardson
Copy link
Member

I spent a lot of time looking at instruction traces when debugging a baremetal newlib null pointer dereference. Writes to the pointer location look sensible in the instruction trace but a read returns NULL. It turned out that this null pointer dereference happended because a pointer ended up pointing past the end of physical memory.

    Memory Write [ffffffff88001d88] = ffffffff80020a98
...
...
    Memory Read [ffffffff88001d88] = 0000000000000000

It would be great if QEMU could cause a trap (maybe ADDRS/ADDRL? or even better a different exception code so we can diagnose it easily) whenever a memory address is read/written that is unmapped. If this will cause issues when running CheriBSD maybe just logging it in the textual trace/stderr would be great. Suggesting to run info mtree would also be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants