mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +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:
parent
c4a1ea34c2
commit
80cbb72f2f
3 changed files with 37 additions and 33 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue