aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers/keyboard.c
diff options
context:
space:
mode:
authorMarvin Borner2021-04-03 14:04:23 +0200
committerMarvin Borner2021-04-03 14:04:23 +0200
commit394ee169ea6eb4dd5c8fa778d1c2769e26e52f01 (patch)
tree70440fb0d9eeb09e1aeec7eba6f2319d34b4918c /kernel/drivers/keyboard.c
parentce98400f8a9ebd4e62e76b9e292b7598d0d66cc0 (diff)
Enabled SMAP/SMEP protections
Diffstat (limited to 'kernel/drivers/keyboard.c')
-rw-r--r--kernel/drivers/keyboard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/drivers/keyboard.c b/kernel/drivers/keyboard.c
index b917e4e..95b8a21 100644
--- a/kernel/drivers/keyboard.c
+++ b/kernel/drivers/keyboard.c
@@ -68,7 +68,7 @@ static res keyboard_read(void *buf, u32 offset, u32 count, struct device *dev)
return -EINVAL;
struct event_keyboard *e = stack_pop(queue);
- memcpy(buf, (u8 *)e + offset, MIN(count, sizeof(*e)));
+ memcpy_user(buf, (u8 *)e + offset, MIN(count, sizeof(*e)));
free(e);
return MIN(count, sizeof(*e));
}