From: Pavel Machek
> Sent: 07 February 2024 17:52
> > > Using sizeof(dst) is the overwhelmingly common case for strscpy().
> > > Instead of requiring this everywhere, allow a 2-argument version to be
> > > used that will use the sizeof() internally.
> >
> > Yeah, this is definitely the case. I have
From: Pavel Machek
> Sent: 07 February 2024 17:52
>
> > > Using sizeof(dst) is the overwhelmingly common case for strscpy().
> > > Instead of requiring this everywhere, allow a 2-argument version to be
> > > used that will use the sizeof() internally.
> >
> > Yeah, this is definitely the case. I h
Hi!
> > Using sizeof(dst) is the overwhelmingly common case for strscpy().
> > Instead of requiring this everywhere, allow a 2-argument version to be
> > used that will use the sizeof() internally.
>
> Yeah, this is definitely the case. I have a ton of patches replacing
> strncpy with strscpy [1]
From: Kees Cook
> Sent: 29 January 2024 20:29
>
> Using sizeof(dst) is the overwhelmingly common case for strscpy().
> Instead of requiring this everywhere, allow a 2-argument version to be
> used that will use the sizeof() internally.
You may want to (try to) add a check that the first argument
On Tue, Jan 30, 2024 at 1:27 AM Andy Shevchenko
wrote:
> On Tue, Jan 30, 2024 at 12:03 AM Kees Cook wrote:
> > On Mon, Jan 29, 2024 at 09:55:25PM +, Justin Stitt wrote:
> > > On Mon, Jan 29, 2024 at 12:29:04PM -0800, Kees Cook wrote:
...
> > > BTW, this hack for function overloading is insa
On Tue, Jan 30, 2024 at 12:03 AM Kees Cook wrote:
> On Mon, Jan 29, 2024 at 09:55:25PM +, Justin Stitt wrote:
> > On Mon, Jan 29, 2024 at 12:29:04PM -0800, Kees Cook wrote:
...
> > BTW, this hack for function overloading is insane. Never really looked into
> > it before.
>
> It very much is.
On Mon, Jan 29, 2024 at 09:55:25PM +, Justin Stitt wrote:
> Hi,
>
> On Mon, Jan 29, 2024 at 12:29:04PM -0800, Kees Cook wrote:
> > Using sizeof(dst) is the overwhelmingly common case for strscpy().
> > Instead of requiring this everywhere, allow a 2-argument version to be
> > used that will us
Hi,
On Mon, Jan 29, 2024 at 12:29:04PM -0800, Kees Cook wrote:
> Using sizeof(dst) is the overwhelmingly common case for strscpy().
> Instead of requiring this everywhere, allow a 2-argument version to be
> used that will use the sizeof() internally.
Yeah, this is definitely the case. I have a to
Using sizeof(dst) is the overwhelmingly common case for strscpy().
Instead of requiring this everywhere, allow a 2-argument version to be
used that will use the sizeof() internally.
Cc: Rasmus Villemoes
Cc: Andy Shevchenko
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Kees Cook
---
What do