summaryrefslogtreecommitdiff
path: root/kernel/includes
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2023-11-23 17:01:55 +0100
committerAnton Kling <anton@kling.gg>2023-11-23 17:01:55 +0100
commit6757803629574fe46e9047be8567e0c7e0522973 (patch)
treecf31247efa27997b0b43bfed559ffbb42bfb8f3e /kernel/includes
parentb8da260dd01175529feb57d5a73570f469decb08 (diff)
Kernel/LibC: Add randomfill() syscall.
This syscall aims to fill the given buffer with cryptographically secure random data. If the syscall returns and does not cause a page fault it will **always** have filled the buffer with random data and never gives back any error value.
Diffstat (limited to 'kernel/includes')
-rw-r--r--kernel/includes/syscalls.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/includes/syscalls.h b/kernel/includes/syscalls.h
index 6642fea..ee7efec 100644
--- a/kernel/includes/syscalls.h
+++ b/kernel/includes/syscalls.h
@@ -16,6 +16,8 @@ typedef struct SYS_ACCEPT_PARAMS {
int syscall_accept(SYS_ACCEPT_PARAMS *args);
+void syscall_randomfill(void *buffer, u32 size);
+
typedef struct SYS_BIND_PARAMS {
int sockfd;
const struct sockaddr *addr;