aboutsummaryrefslogtreecommitdiff
path: root/libs/libc/inc/mem.h
diff options
context:
space:
mode:
authorMarvin Borner2021-04-03 14:04:23 +0200
committerMarvin Borner2021-04-03 14:04:23 +0200
commit394ee169ea6eb4dd5c8fa778d1c2769e26e52f01 (patch)
tree70440fb0d9eeb09e1aeec7eba6f2319d34b4918c /libs/libc/inc/mem.h
parentce98400f8a9ebd4e62e76b9e292b7598d0d66cc0 (diff)
Enabled SMAP/SMEP protections
Diffstat (limited to 'libs/libc/inc/mem.h')
-rw-r--r--libs/libc/inc/mem.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/libs/libc/inc/mem.h b/libs/libc/inc/mem.h
index 960ee86..7318c25 100644
--- a/libs/libc/inc/mem.h
+++ b/libs/libc/inc/mem.h
@@ -21,7 +21,15 @@ void *zalloc(u32 size);
void *memcpy(void *dest, const void *src, u32 n) NONNULL;
void *memset(void *dest, u32 val, u32 n) NONNULL;
void *memchr(void *src, char c, u32 n) NONNULL;
-int memcmp(const void *s1, const void *s2, u32 n) NONNULL;
-int mememp(const u8 *buf, u32 n) NONNULL;
+s32 memcmp(const void *s1, const void *s2, u32 n) NONNULL;
+u8 mememp(const u8 *buf, u32 n) NONNULL;
+
+#ifdef KERNEL
+void *memcpy_user(void *dest, const void *src, u32 n) NONNULL;
+void *memset_user(void *dest, u32 val, u32 n) NONNULL;
+void *memchr_user(void *src, char c, u32 n) NONNULL;
+s32 memcmp_user(const void *s1, const void *s2, u32 n) NONNULL;
+u8 mememp_user(const u8 *buf, u32 n) NONNULL;
+#endif
#endif