From: Jens Axboe <axboe@kernel.dk>
To: Justin Stitt <justinstitt@google.com>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org,
Kees Cook <keescook@chromium.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Nathan Chancellor <nathan@kernel.org>
Subject: Re: [PATCH v3] null_blk: replace strncpy with strscpy
Date: Tue, 03 Oct 2023 18:23:28 -0600 [thread overview]
Message-ID: <169637900876.2061762.14731877442734988774.b4-ty@kernel.dk> (raw)
In-Reply-To: <20230919-strncpy-drivers-block-null_blk-main-c-v3-1-10cf0a87a2c3@google.com>
On Tue, 19 Sep 2023 05:30:35 +0000, Justin Stitt wrote:
> `strncpy` is deprecated for use on NUL-terminated destination strings [1].
>
> We should favor a more robust and less ambiguous interface.
>
> We expect that both `nullb->disk_name` and `disk->disk_name` be
> NUL-terminated:
> | snprintf(nullb->disk_name, sizeof(nullb->disk_name),
> | "%s", config_item_name(&dev->group.cg_item));
> ...
> | pr_info("disk %s created\n", nullb->disk_name);
>
> [...]
Applied, thanks!
[1/1] null_blk: replace strncpy with strscpy
commit: e1f2760ba3478fa3f8c48db8e91fbe3df8bea2f8
Best regards,
--
Jens Axboe
prev parent reply other threads:[~2023-10-04 0:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-19 5:30 [PATCH v3] null_blk: replace strncpy with strscpy Justin Stitt
2023-09-20 15:38 ` Kees Cook
2023-10-04 0:00 ` Kees Cook
2023-10-04 0:23 ` Jens Axboe [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=169637900876.2061762.14731877442734988774.b4-ty@kernel.dk \
--to=axboe@kernel.dk \
--cc=justinstitt@google.com \
--cc=keescook@chromium.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
/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