From 9c1b546b160b262e3dc123c7ce654b2b53b6f511 Mon Sep 17 00:00:00 2001 From: Felix Kopp Date: Thu, 7 Jan 2021 12:48:47 +0100 Subject: [PATCH] user: i can't do this anymore Living as a sheep herder on a lonely island is becoming an increasingly appealing option the more i am exposed to my stupidity and inability to memorize the return values of basic libc functions that i even implemented myself two fucking months ago. --- kernel/userspace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/userspace.c b/kernel/userspace.c index 527239c..4d664ae 100644 --- a/kernel/userspace.c +++ b/kernel/userspace.c @@ -16,13 +16,13 @@ size_t copy_from_user(void *dest, __user const void *src, size_t len) { void *tmp = memcpy(dest, src, len); - return (size_t)tmp - (size_t)dest; + return len; } size_t copy_to_user(__user void *dest, const void *src, size_t len) { void *tmp = memcpy(dest, src, len); - return (size_t)tmp - (size_t)dest; + return len; } /*