All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Johannes Berg <johannes@sipsolutions.net>,
	 Azeem Shaikh <azeemshaikh38@gmail.com>
Cc: Kees Cook <kees@kernel.org>, kernel test robot <lkp@intel.com>,
	 Maxim Krasnyansky <maxk@qti.qualcomm.com>,
	 oe-kbuild-all <oe-kbuild-all@lists.linux.dev>,
	 linux-hardening <linux-hardening@vger.kernel.org>,
	 linux-kernel <linux-kernel@vger.kernel.org>,
	 anton ivanov <anton.ivanov@cambridgegreys.com>,
	 linux-um <linux-um@lists.infradead.org>
Subject: Re: [PATCH] uml: Replace all non-returning strlcpy with strscpy
Date: Wed, 31 May 2023 08:26:26 +0200 (CEST)	[thread overview]
Message-ID: <959209724.158062.1685514386841.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <8033fb8f9677cf9aae411e97eb554d251ca03011.camel@sipsolutions.net>

----- 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

WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard@nod.at>
To: Johannes Berg <johannes@sipsolutions.net>,
	 Azeem Shaikh <azeemshaikh38@gmail.com>
Cc: Kees Cook <kees@kernel.org>, kernel test robot <lkp@intel.com>,
	 Maxim Krasnyansky <maxk@qti.qualcomm.com>,
	 oe-kbuild-all <oe-kbuild-all@lists.linux.dev>,
	 linux-hardening <linux-hardening@vger.kernel.org>,
	 linux-kernel <linux-kernel@vger.kernel.org>,
	 anton ivanov <anton.ivanov@cambridgegreys.com>,
	 linux-um <linux-um@lists.infradead.org>
Subject: Re: [PATCH] uml: Replace all non-returning strlcpy with strscpy
Date: Wed, 31 May 2023 08:26:26 +0200 (CEST)	[thread overview]
Message-ID: <959209724.158062.1685514386841.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <8033fb8f9677cf9aae411e97eb554d251ca03011.camel@sipsolutions.net>

----- 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

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um

  reply	other threads:[~2023-05-31  6:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 16:40 [PATCH] uml: Replace all non-returning strlcpy with strscpy Azeem Shaikh
2023-05-30 16:40 ` Azeem Shaikh
2023-05-30 23:21 ` Kees Cook
2023-05-31  3:18 ` kernel test robot
2023-05-31  3:18   ` kernel test robot
2023-05-31  4:41   ` Kees Cook
2023-05-31  4:41     ` Kees Cook
2023-05-31  6:18     ` Johannes Berg
2023-05-31  6:18       ` Johannes Berg
2023-05-31  6:26       ` Richard Weinberger [this message]
2023-05-31  6:26         ` Richard Weinberger
2023-05-31  6:23     ` Richard Weinberger
2023-05-31  6:23       ` Richard Weinberger
2023-05-31  8:05       ` Geert Uytterhoeven
2023-05-31  8:05         ` Geert Uytterhoeven
2023-05-31 14:48         ` Azeem Shaikh
2023-05-31 14:48           ` Azeem Shaikh
2023-06-05 20:07           ` Richard Weinberger
2023-06-05 20:07             ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=959209724.158062.1685514386841.JavaMail.zimbra@nod.at \
    --to=richard@nod.at \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=azeemshaikh38@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=lkp@intel.com \
    --cc=maxk@qti.qualcomm.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.