mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 06:18:12 +00:00
ptrace: Add PT_POKE
PT_POKE writes a single word to the tracee's address space. Some caveats: - If the user requests to write to an address in a read-only region, we temporarily change the page's protections to allow it. - If the user requests to write to a region that's backed by a SharedInodeVMObject, we replace the vmobject with a PrivateIndoeVMObject.
This commit is contained in:
parent
924fda19b0
commit
b306ac9b2b
5 changed files with 52 additions and 3 deletions
|
@ -31,6 +31,7 @@
|
|||
#include <AK/Weakable.h>
|
||||
#include <Kernel/Heap/SlabAllocator.h>
|
||||
#include <Kernel/VM/RangeAllocator.h>
|
||||
#include <Kernel/VM/VMObject.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -79,6 +80,7 @@ public:
|
|||
|
||||
const VMObject& vmobject() const { return *m_vmobject; }
|
||||
VMObject& vmobject() { return *m_vmobject; }
|
||||
void set_vmobject(NonnullRefPtr<VMObject>&& obj) { m_vmobject = obj; }
|
||||
|
||||
bool is_shared() const { return m_shared; }
|
||||
void set_shared(bool shared) { m_shared = shared; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue