From: Ingo Molnar <mingo@kernel.org>
To: Kees Cook <keescook@chromium.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Justin Stitt <justinstitt@google.com>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: [PATCH] x86/tdx: refactor deprecated strncpy
Date: Fri, 29 Sep 2023 23:14:14 +0200 [thread overview]
Message-ID: <ZRc+JqO7XvyHg/nB@gmail.com> (raw)
In-Reply-To: <169601242377.3008066.9973846266706309040.b4-ty@chromium.org>
* Kees Cook <keescook@chromium.org> wrote:
> On Mon, 11 Sep 2023 18:27:25 +0000, Justin Stitt wrote:
> > `strncpy` is deprecated and we should prefer more robust string apis.
> >
> > In this case, `message.str` is not expected to be NUL-terminated as it
> > is simply a buffer of characters residing in a union which allows for
> > named fields representing 8 bytes each. There is only one caller of
> > `tdx_panic()` and they use a 59-length string for `msg`:
> > | const char *msg = "TD misconfiguration: SEPT_VE_DISABLE attribute must be set.";
> >
> > [...]
>
> This appears to be trivially correct, so I can take it via my tree.
>
> Applied to for-next/hardening, thanks!
>
> [1/1] x86/tdx: refactor deprecated strncpy
> https://git.kernel.org/kees/c/e32c46753312
Please don't apply - Dave had some reservations, plus after the
change the comment would be now out of sync with the code ...
Also, we generally carry such patches in the x86 tree.
Thanks,
Ingo
next prev parent reply other threads:[~2023-09-29 21:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 18:27 [PATCH] x86/tdx: refactor deprecated strncpy Justin Stitt
2023-09-11 18:51 ` Dave Hansen
2023-09-11 22:01 ` Justin Stitt
2023-09-15 3:07 ` Kees Cook
2023-09-29 18:33 ` Kees Cook
2023-09-29 21:14 ` Ingo Molnar [this message]
2023-09-29 21:51 ` Kees Cook
2023-09-29 21:27 ` Dave Hansen
2023-09-29 21:50 ` Kees Cook
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=ZRc+JqO7XvyHg/nB@gmail.com \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=justinstitt@google.com \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=ndesaulniers@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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