From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: "Kees Cook" <keescook@chromium.org>,
"kernel test robot" <oliver.sang@intel.com>,
"kernel test robot" <lkp@intel.com>,
"Dan Williams" <dan.j.williams@intel.com>,
"Jó Ágila Bitsch" <jgilab@gmail.com>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] usb: ch9: Replace 1-element array with flexible array
Date: Wed, 14 Jun 2023 08:10:42 +0200 [thread overview]
Message-ID: <2023061434-scenic-observer-d1d4@gregkh> (raw)
In-Reply-To: <ZIjzGCMWrar3kf1L@work>
On Tue, Jun 13, 2023 at 04:52:08PM -0600, Gustavo A. R. Silva wrote:
> On Tue, Jun 13, 2023 at 02:04:04PM -0700, Kees Cook wrote:
> > With "-fstrict-flex-arrays=3" enabled, UBSAN_BOUNDS no longer pretends
> > 1-element arrays are unbounded. Walking wData will trigger a warning,
> > so make it a proper flexible array. Add a union to keep the struct size
> > identical for userspace in case anything was depending on the old size.
> >
> > Reported-by: kernel test robot <oliver.sang@intel.com>
> > Closes: https://lore.kernel.org/oe-lkp/202306102333.8f5a7443-oliver.sang@intel.com
> > Fixes: df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3")
>
> I always have mixed feelings about a 'Fixes' tag applied to a commit
> like this (one that enables a compiler option that avoids the introduction
> of buggy code), when we are addressing the potentially buggy code that
> the option is inteded to prevent. (thinkingface)
Yeah, the original code here is not incorrect, it's that you added a new
build warning, so this is more like an "update" :)
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: kernel test robot <lkp@intel.com>
> > Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Cc: "Jó Ágila Bitsch" <jgilab@gmail.com>
> > Signed-off-by: Kees Cook <keescook@chromium.org>
>
> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Odd that checkpatch.pl doesn't cc: the usb lists for this file. I'll go
update the MAINTAINERS file with this location...
thanks,
greg k-h
next prev parent reply other threads:[~2023-06-14 6:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-13 21:04 [PATCH] usb: ch9: Replace 1-element array with flexible array Kees Cook
2023-06-13 22:52 ` Gustavo A. R. Silva
2023-06-14 6:10 ` Greg Kroah-Hartman [this message]
2023-06-14 17:47 ` 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=2023061434-scenic-observer-d1d4@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=dan.j.williams@intel.com \
--cc=gustavoars@kernel.org \
--cc=jgilab@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oliver.sang@intel.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