Re: [PATCH] libbpf: Replace strncpy() with strnlen()+memcpy() in skel_map_create()

From: Alexei Starovoitov

Date: Wed Mar 25 2026 - 12:18:47 EST


On Tue, Mar 24, 2026 at 9:10 PM Kees Cook <kees@xxxxxxxxxx> wrote:
>
> On Tue, Mar 24, 2026 at 09:31:09AM -0700, Alexei Starovoitov wrote:
> > And please keep ignoring it.
> > It's not broken. Don't fix it.
>
> Okay. I'm confused, though: what's your plan for when strncpy is removed
> from the kernel?

when it gets to the point to be actually removed then we will deal with it.
Until then it's a witch-hunt.
memcpy(,, strnlen()) is no better than strncpy.