diff --git a/Kernel/Syscalls/ftruncate.cpp b/Kernel/Syscalls/ftruncate.cpp index feaf027a992..f02af95b8ab 100644 --- a/Kernel/Syscalls/ftruncate.cpp +++ b/Kernel/Syscalls/ftruncate.cpp @@ -9,6 +9,8 @@ namespace Kernel { +// NOTE: The length is passed by pointer because off_t is 64bit, +// hence it can't be passed by register on 32bit platforms. ErrorOr Process::sys$ftruncate(int fd, Userspace userspace_length) { VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) diff --git a/Kernel/Syscalls/read.cpp b/Kernel/Syscalls/read.cpp index 2f9e21e98a8..cd70a06e102 100644 --- a/Kernel/Syscalls/read.cpp +++ b/Kernel/Syscalls/read.cpp @@ -86,6 +86,8 @@ ErrorOr Process::sys$read(int fd, Userspace buffer, size_t size) return TRY(description->read(user_buffer, size)); } +// NOTE: The offset is passed by pointer because off_t is 64bit, +// hence it can't be passed by register on 32bit platforms. ErrorOr Process::sys$pread(int fd, Userspace buffer, size_t size, Userspace userspace_offset) { VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)