mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
Greatly improve /proc/PID/stack by tracing the ebp frame chain.
I also added a generator cache to FileHandle. This way, multiple reads to a generated file (i.e in a synthfs) can transparently handle multiple calls to read() without the contents changing between calls. The cache is discarded at EOF (or when the FileHandle is destroyed.)
This commit is contained in:
parent
c928b06218
commit
2716a9e2d7
22 changed files with 210 additions and 116 deletions
|
@ -885,3 +885,23 @@ Task::Region::Region(LinearAddress a, size_t s, RetainPtr<Zone>&& z, String&& n)
|
|||
Task::Region::~Region()
|
||||
{
|
||||
}
|
||||
|
||||
bool Task::isValidAddressForKernel(LinearAddress laddr) const
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
if (laddr.get() >= ksyms().first().address && laddr.get() <= ksyms().last().address)
|
||||
return true;
|
||||
if (is_kmalloc_address((void*)laddr.get()))
|
||||
return true;
|
||||
return isValidAddressForUser(laddr);
|
||||
}
|
||||
|
||||
bool Task::isValidAddressForUser(LinearAddress laddr) const
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
for (auto& region: m_regions) {
|
||||
if (laddr >= region->linearAddress && laddr < region->linearAddress.offset(region->size))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue