mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
Kernel: Add jail semantics to methods iterating over thread lists
We should consider whether the selected Thread is within the same jail or not. Therefore let's make it clear to callers with jail semantics if a called method checks if the desired Thread object is within the same jail. As for Thread::for_each_* methods, currently nothing in the kernel codebase needs iteration with consideration for jails, so the old Thread::for_each* were simply renamed to include "ignoring_jails" suffix in their names.
This commit is contained in:
@@ -41,7 +41,7 @@ ErrorOr<NonnullRefPtr<Inode>> Process::lookup_as_directory(ProcFS& procfs, Strin
|
||||
ErrorOr<void> Process::procfs_get_thread_stack(ThreadID thread_id, KBufferBuilder& builder) const
|
||||
{
|
||||
auto array = TRY(JsonArraySerializer<>::try_create(builder));
|
||||
auto thread = Thread::from_tid(thread_id);
|
||||
auto thread = Thread::from_tid_in_same_jail(thread_id);
|
||||
if (!thread)
|
||||
return ESRCH;
|
||||
auto current_process_credentials = Process::current().credentials();
|
||||
|
||||
Reference in New Issue
Block a user