From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: Kees Cook <keescook@chromium.org>
Cc: Justin Stitt <justinstitt@google.com>,
Kalle Valo <kvalo@kernel.org>, <ath10k@lists.infradead.org>,
<linux-wireless@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-hardening@vger.kernel.org>
Subject: Re: [PATCH] ath10k: replace deprecated strncpy with strtomem_pad
Date: Mon, 23 Oct 2023 16:40:54 -0700 [thread overview]
Message-ID: <2f407e7c-9bc7-4915-a043-5a7cec2cb2b1@quicinc.com> (raw)
In-Reply-To: <202310181626.C5BE0C21F@keescook>
On 10/18/2023 4:35 PM, Kees Cook wrote:
> On Fri, Oct 13, 2023 at 05:58:03PM -0700, Jeff Johnson wrote:
>>> Let's also mark ath10k_vif.u.ap.ssid as __nonstring.
>>
>> what criteria is used to determine whether or not to use __nonstring?
>> doesn't the use of u8 vs char already communicate that distinction?
>> just want to know what other u8 arrays might require this.
>> FWIW the documentation referenced by the __nonstring macro explicitly refers
>> to "type array of char, signed char, or unsigned char"
>
> The use of __nonstring is for byte arrays that are _not_ expected to be
> %NUL terminated. Unfortunately "char" vs "u8" isn't distinguished by the
> compiler. All byte arrays are treated as C strings unless __nonstring is
> used.
So is the plan to annotate every single binary blob array in the kernel
as __nonstring? I suspect those outnumber string arrays.
next prev parent reply other threads:[~2023-10-23 23:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 20:33 Justin Stitt
2023-10-14 0:58 ` Jeff Johnson
2023-10-18 23:35 ` Kees Cook
2023-10-23 23:40 ` Jeff Johnson [this message]
2023-10-24 13:03 ` Kalle Valo
2023-10-24 14:11 ` Jeff Johnson
2023-10-24 21:43 ` Kees Cook
2023-10-24 23:25 ` Jeff Johnson
2023-10-24 23:40 ` 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=2f407e7c-9bc7-4915-a043-5a7cec2cb2b1@quicinc.com \
--to=quic_jjohnson@quicinc.com \
--cc=ath10k@lists.infradead.org \
--cc=justinstitt@google.com \
--cc=keescook@chromium.org \
--cc=kvalo@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.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
all inboxes | Powered by JetHome®