mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 15:44:57 +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:
parent
3a55a1b592
commit
cbaa3465a8
7 changed files with 36 additions and 17 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue