summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-06-29 11:02:43 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-29 20:03:36 +0200
commit90e3aa35efa09aff3ce48112f886de1e1091af3f (patch)
treeedfcf61bdd598ad80870b556a71082d49c248eff
parent449d34a154f39da20ca6eb350e6211a8950a2d62 (diff)
downloadserenity-90e3aa35efa09aff3ce48112f886de1e1091af3f.zip
Kernel: Fix correct argument order for userspace entry point
-rw-r--r--Kernel/Syscalls/execve.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp
index 037d7508a2..7539a82b9d 100644
--- a/Kernel/Syscalls/execve.cpp
+++ b/Kernel/Syscalls/execve.cpp
@@ -144,8 +144,8 @@ static KResultOr<FlatPtr> make_userspace_context_for_main_thread([[maybe_unused]
push_on_new_stack(argv);
push_on_new_stack(argv_entries.size());
#else
- regs.rdi = argv;
- regs.rsi = argv_entries.size();
+ regs.rdi = argv_entries.size();
+ regs.rsi = argv;
regs.rdx = envp;
#endif
push_on_new_stack(0); // return address