[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <959209724.158062.1685514386841.JavaMail.zimbra@nod.at>
Date: Wed, 31 May 2023 08:26:26 +0200 (CEST)
From: Richard Weinberger <richard@....at>
To: Johannes Berg <johannes@...solutions.net>,
Azeem Shaikh <azeemshaikh38@...il.com>
Cc: Kees Cook <kees@...nel.org>, kernel test robot <lkp@...el.com>,
Maxim Krasnyansky <maxk@....qualcomm.com>,
oe-kbuild-all <oe-kbuild-all@...ts.linux.dev>,
linux-hardening <linux-hardening@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
anton ivanov <anton.ivanov@...bridgegreys.com>,
linux-um <linux-um@...ts.infradead.org>
Subject: Re: [PATCH] uml: Replace all non-returning strlcpy with strscpy
----- Ursprüngliche Mail -----
>> Ah, yeah, this is another "not actually in the kernel" cases. Let's ignore this
>> strlcpy for now.
>>
>
> Well, strlcpy() isn't part of libc either, so all this would need is to
> add it to user.h just like strlcpy() is now?
I think so.
Azeem, can you please test your changes with this fixup applied?
diff --git a/arch/um/include/shared/user.h b/arch/um/include/shared/user.h
index bda66e5a9d4e3..e5d3fbbafe4d2 100644
--- a/arch/um/include/shared/user.h
+++ b/arch/um/include/shared/user.h
@@ -52,6 +52,7 @@ static inline int printk(const char *fmt, ...)
extern int in_aton(char *str);
extern size_t strlcpy(char *, const char *, size_t);
extern size_t strlcat(char *, const char *, size_t);
+extern ssize_t strscpy(char *, const char *, size_t);
/* Copied from linux/compiler-gcc.h since we can't include it directly */
#define barrier() __asm__ __volatile__("": : :"memory")
Thanks,
//richard
Powered by blists - more mailing lists