1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +00:00

Kernel: Remove SmapDisablers in open(), openat() and set_thread_name()

This patch introduces a helpful copy_string_from_user() function
that takes a bounded null-terminated string from userspace memory
and copies it into a String object.
This commit is contained in:
Andreas Kling 2020-01-05 21:51:06 +01:00
parent c4a1ea34c2
commit 80cbb72f2f
3 changed files with 37 additions and 33 deletions

View file

@ -2,6 +2,12 @@
#include <AK/Types.h>
namespace AK {
class String;
}
AK::String copy_string_from_user(const char*, size_t);
extern "C" {
static_assert(sizeof(size_t) == 4);