mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
Kernel+LibC: Pass 64-bit integers in syscalls by value
Now that support for 32-bit x86 has been removed, we don't have to worry about the top half of `off_t`/`u64` values being chopped off when we try to pass them in registers. Therefore, we no longer need the workaround of pointers to stack-allocated values to syscalls. Note that this changes the system call ABI, so statically linked programs will have to be re-linked.
This commit is contained in:
parent
87f4b0f1c2
commit
286984750e
12 changed files with 22 additions and 37 deletions
|
@ -16,14 +16,11 @@ bool g_profiling_all_threads;
|
|||
PerformanceEventBuffer* g_global_perf_events;
|
||||
u64 g_profiling_event_mask;
|
||||
|
||||
// NOTE: event_mask needs to be passed as a pointer as u64
|
||||
// does not fit into a register on 32bit architectures.
|
||||
ErrorOr<FlatPtr> Process::sys$profiling_enable(pid_t pid, Userspace<u64 const*> userspace_event_mask)
|
||||
ErrorOr<FlatPtr> Process::sys$profiling_enable(pid_t pid, u64 event_mask)
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
|
||||
TRY(require_no_promises());
|
||||
|
||||
auto const event_mask = TRY(copy_typed_from_user(userspace_event_mask));
|
||||
return profiling_enable(pid, event_mask);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue