Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3064C20F3 for ; Wed, 31 May 2023 06:26:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 6F1F661CECF8; Wed, 31 May 2023 08:26:27 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id OMHGyQ5Lvv4L; Wed, 31 May 2023 08:26:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 21F3561A7038; Wed, 31 May 2023 08:26:27 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6iJ5euobrcBa; Wed, 31 May 2023 08:26:27 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id E70AC616B2CF; Wed, 31 May 2023 08:26:26 +0200 (CEST) Date: Wed, 31 May 2023 08:26:26 +0200 (CEST) From: Richard Weinberger To: Johannes Berg , Azeem Shaikh Cc: Kees Cook , kernel test robot , Maxim Krasnyansky , oe-kbuild-all , linux-hardening , linux-kernel , anton ivanov , linux-um Message-ID: <959209724.158062.1685514386841.JavaMail.zimbra@nod.at> In-Reply-To: <8033fb8f9677cf9aae411e97eb554d251ca03011.camel@sipsolutions.net> References: <20230530164004.986750-1-azeemshaikh38@gmail.com> <202305311135.zGMT1gYR-lkp@intel.com> <09A0C6FA-669F-4B73-9620-43AEA17E5D0C@kernel.org> <8033fb8f9677cf9aae411e97eb554d251ca03011.camel@sipsolutions.net> Subject: Re: [PATCH] uml: Replace all non-returning strlcpy with strscpy Precedence: bulk X-Mailing-List: oe-kbuild-all@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: Replace all non-returning strlcpy with strscpy Thread-Index: hWem4mJ9JdjGKB725Dk79ubQ3raPHg== ----- Urspr=C3=BCngliche Mail ----- >> Ah, yeah, this is another "not actually in the kernel" cases. Let's igno= re this >> strlcpy for now. >>=20 >=20 > 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); =20 /* Copied from linux/compiler-gcc.h since we can't include it directly */ #define barrier() __asm__ __volatile__("": : :"memory") Thanks, //richard