Browse Source

Kernel: Use Userspace<T> for the module_load syscall

Brian Gianforcaro 4 years ago
parent
commit
c4927ceb08
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Kernel/Process.h
  2. 1 1
      Kernel/Syscalls/module.cpp

+ 1 - 1
Kernel/Process.h

@@ -325,7 +325,7 @@ public:
     int sys$realpath(Userspace<const Syscall::SC_realpath_params*>);
     int sys$realpath(Userspace<const Syscall::SC_realpath_params*>);
     ssize_t sys$getrandom(Userspace<void*>, size_t, unsigned int);
     ssize_t sys$getrandom(Userspace<void*>, size_t, unsigned int);
     int sys$setkeymap(Userspace<const Syscall::SC_setkeymap_params*>);
     int sys$setkeymap(Userspace<const Syscall::SC_setkeymap_params*>);
-    int sys$module_load(const char* path, size_t path_length);
+    int sys$module_load(Userspace<const char*> path, size_t path_length);
     int sys$module_unload(const char* name, size_t name_length);
     int sys$module_unload(const char* name, size_t name_length);
     int sys$profiling_enable(pid_t);
     int sys$profiling_enable(pid_t);
     int sys$profiling_disable(pid_t);
     int sys$profiling_disable(pid_t);

+ 1 - 1
Kernel/Syscalls/module.cpp

@@ -35,7 +35,7 @@ namespace Kernel {
 
 
 extern HashMap<String, OwnPtr<Module>>* g_modules;
 extern HashMap<String, OwnPtr<Module>>* g_modules;
 
 
-int Process::sys$module_load(const char* user_path, size_t path_length)
+int Process::sys$module_load(Userspace<const char*> user_path, size_t path_length)
 {
 {
     if (!is_superuser())
     if (!is_superuser())
         return -EPERM;
         return -EPERM;