This commit is contained in:
2026-08-14 21:31:01 +02:00
parent 40cea4dedd
commit ac9d47fa16
58 changed files with 148 additions and 37 deletions
+7
View File
@@ -0,0 +1,7 @@
#pragma once
#include <kernel/usercopy.h>
bool arch_usercopy_read(void* dst, const __user void* src, size_t len, struct usercopy_region** region);
bool arch_usercopy_write(__user void* dst, const void* src, size_t len, struct usercopy_region** region);
bool arch_usercopy_strlen(const __user char* str, size_t max, size_t* len, struct usercopy_region** region);
+2 -2
View File
@@ -51,8 +51,8 @@ zn_status_t namespace_get(struct namespace* namespace, zn_handle_t handle, struc
zn_status_t namespace_del_desc(struct namespace* namespace, zn_handle_t handle);
// Clones a descriptor with optionally restricted rights.
// If cloned_rights has ZN_RIGHTS_IDENTICAL set, the clone keeps the original rights.
// Otherwise, cloned_rights must be a subset of the original descriptor's rights.
// If `cloned_rights` contains ZN_RIGHTS_IDENTICAL, the clone keeps the original rights.
// Otherwise, `cloned_rights` must be a subset of the original descriptor's rights.
zn_status_t namespace_clone_desc(
struct namespace* ns,
struct namespace_desc* desc,
+3 -1
View File
@@ -1,6 +1,8 @@
#pragma once
typedef enum {
#include <stdint.h>
typedef enum : uint32_t {
ZN_SYSCALL_LOG,
ZN_SYSCALL_ARCHCTL,
ZN_SYSCALL_PAGE_SIZE,
-4
View File
@@ -18,7 +18,3 @@ bool usercopy_write(__user void* dst, const void* src, size_t len);
// Performs a strlen() on a user string.
bool usercopy_strlen(const __user char* str, size_t max, size_t* len);
bool arch_usercopy_read(void* dst, const __user void* src, size_t len, struct usercopy_region** region);
bool arch_usercopy_write(__user void* dst, const void* src, size_t len, struct usercopy_region** region);
bool arch_usercopy_strlen(const __user char* str, size_t max, size_t* len, struct usercopy_region** region);