mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
Kernel: Let InodeWatcher track child inode numbers instead of names
First of all, this fixes a dumb info leak where we'd write kernel heap addresses (StringImpl*) into userspace memory when reading a watcher. Instead of trying to pass names to userspace, we now simply pass the child inode index. Nothing in userspace makes use of this yet anyway, so it's not like we're breaking anything. We'll see how this evolves.
This commit is contained in:
parent
55dd13ccac
commit
2cb32f8356
6 changed files with 19 additions and 18 deletions
|
@ -50,7 +50,7 @@ public:
|
|||
};
|
||||
|
||||
Type type { Type::Invalid };
|
||||
String string;
|
||||
unsigned inode_index { 0 };
|
||||
};
|
||||
|
||||
virtual bool can_read(const FileDescription&, size_t) const override;
|
||||
|
@ -61,8 +61,8 @@ public:
|
|||
virtual const char* class_name() const override { return "InodeWatcher"; };
|
||||
|
||||
void notify_inode_event(Badge<Inode>, Event::Type);
|
||||
void notify_child_added(Badge<Inode>, const String& child_name);
|
||||
void notify_child_removed(Badge<Inode>, const String& child_name);
|
||||
void notify_child_added(Badge<Inode>, const InodeIdentifier& child_id);
|
||||
void notify_child_removed(Badge<Inode>, const InodeIdentifier& child_id);
|
||||
|
||||
private:
|
||||
explicit InodeWatcher(Inode&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue