linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Justin Stitt <justinstitt@google.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	 Kees Cook <keescook@chromium.org>,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	 linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] binfmt: replace deprecated strncpy with strscpy_pad
Date: Thu, 21 Mar 2024 12:57:21 -0700	[thread overview]
Message-ID: <CAFhGd8r_Z2m4akKTBvxy7s8Nwc1HLUE+uKu31mAya5QQyhBhig@mail.gmail.com> (raw)
In-Reply-To: <871q83eepl.fsf@email.froward.int.ebiederm.org>

Hi,

On Thu, Mar 21, 2024 at 9:23 AM Eric W. Biederman <ebiederm@xmission.com> wrote:
>
> I am perplexed.  Why not use get_task_comm fill_psinfo like binfmt_elf
> does?
>
> It seems very silly to copy half the function without locking and then
> not copy it's locking as well.
>
> Given that the more highly tested binfmt_elf uses get_task_comm I can't
> imagine a reason why binfmt_elf_fdpic can't use it as well.

I am not sure why the original opted for strncpy over get_task_comm
but I made the replacement without being aware of the literally
identical code present in binfmt_elf.c

I'll send a v2.

>
> Eric

Thanks
Justin

      reply	other threads:[~2024-03-21 19:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21  0:10 [PATCH] binfmt: replace deprecated strncpy with strscpy_pad Justin Stitt
2024-03-21 16:23 ` Eric W. Biederman
2024-03-21 19:57   ` Justin Stitt [this message]

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=CAFhGd8r_Z2m4akKTBvxy7s8Nwc1HLUE+uKu31mAya5QQyhBhig@mail.gmail.com \
    --to=justinstitt@google.com \
    --cc=brauner@kernel.org \
    --cc=ebiederm@xmission.com \
    --cc=jack@suse.cz \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).