From 394ee169ea6eb4dd5c8fa778d1c2769e26e52f01 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 3 Apr 2021 14:04:23 +0200 Subject: Enabled SMAP/SMEP protections --- libs/libc/inc/str.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'libs/libc/inc/str.h') diff --git a/libs/libc/inc/str.h b/libs/libc/inc/str.h index e77eeee..b00750b 100644 --- a/libs/libc/inc/str.h +++ b/libs/libc/inc/str.h @@ -7,14 +7,28 @@ u32 strlen(const char *s) NONNULL; u32 strlcpy(char *dst, const char *src, u32 size) NONNULL; -char *strchr(char *s, int c) NONNULL; -char *strrchr(char *s, int c) NONNULL; +char *strchr(char *s, char c) NONNULL; +char *strrchr(char *s, char c) NONNULL; u32 strlcat(char *dst, const char *src, u32 size) NONNULL; -int strcmp(const char *s1, const char *s2) NONNULL; -int strncmp(const char *s1, const char *s2, u32 n) NONNULL; +s32 strcmp(const char *s1, const char *s2) NONNULL; +s32 strncmp(const char *s1, const char *s2, u32 n) NONNULL; char *strinv(char *s) NONNULL; char *strdup(const char *s) NONNULL; +#ifdef KERNEL + +u32 strlen_user(const char *s) NONNULL; +u32 strlcpy_user(char *dst, const char *src, u32 size) NONNULL; +char *strchr_user(char *s, char c) NONNULL; +char *strrchr_user(char *s, char c) NONNULL; +u32 strlcat_user(char *dst, const char *src, u32 size) NONNULL; +s32 strcmp_user(const char *s1, const char *s2) NONNULL; +s32 strncmp_user(const char *s1, const char *s2, u32 n) NONNULL; +char *strinv_user(char *s) NONNULL; +char *strdup_user(const char *s) NONNULL; + +#endif + const char *strerror(u32 err); #endif -- cgit v1.2.3