[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWOKEYvGKRUmii5CqtaM-RAM_4SZC5gds=00+KUYyu+MA@mail.gmail.com>
Date: Mon, 5 Feb 2024 13:50:14 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Kees Cook <keescook@...omium.org>
Cc: Andy Shevchenko <andy@...nel.org>, Richard Weinberger <richard@....at>, linux-um@...ts.infradead.org,
Justin Stitt <justinstitt@...gle.com>, Anton Ivanov <anton.ivanov@...bridgegreys.com>,
Johannes Berg <johannes@...solutions.net>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>, Jason Wang <jasowang@...hat.com>,
kernel test robot <lkp@...el.com>, Nathan Chancellor <nathan@...nel.org>,
Azeem Shaikh <azeemshaikh38@...il.com>, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2 4/4] um: Convert strscpy() usage to 2-argument style
Hi Kees,
On Mon, Feb 5, 2024 at 1:36 PM Kees Cook <keescook@...omium.org> wrote:
> The ARCH=um build has its own idea about strscpy()'s definition. Adjust
> the callers to remove the redundant sizeof() arguments ahead of treewide
> changes, since it needs a manual adjustment for the newly named
> sized_strscpy() export.
>
> Cc: Richard Weinberger <richard@....at>
> Cc: linux-um@...ts.infradead.org
> Signed-off-by: Kees Cook <keescook@...omium.org>
Thanks for your patch!
> --- a/arch/um/include/shared/user.h
> +++ b/arch/um/include/shared/user.h
> @@ -52,7 +52,7 @@ static inline int printk(const char *fmt, ...)
> extern int in_aton(char *str);
> extern size_t strlcat(char *, const char *, size_t);
> extern size_t sized_strscpy(char *, const char *, size_t);
> -#define strscpy(dst, src, size) sized_strscpy(dst, src, size)
> +#define strscpy(dst, src) sized_strscpy(dst, src, sizeof(dst))
(dst), (src)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists