[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023061434-scenic-observer-d1d4@gregkh>
Date: Wed, 14 Jun 2023 08:10:42 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: Kees Cook <keescook@...omium.org>,
kernel test robot <oliver.sang@...el.com>,
kernel test robot <lkp@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Jó Ágila Bitsch <jgilab@...il.com>,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] usb: ch9: Replace 1-element array with flexible array
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@...el.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@...uxfoundation.org>
> > Cc: kernel test robot <lkp@...el.com>
> > Cc: "Gustavo A. R. Silva" <gustavoars@...nel.org>
> > Cc: Dan Williams <dan.j.williams@...el.com>
> > Cc: "Jó Ágila Bitsch" <jgilab@...il.com>
> > Signed-off-by: Kees Cook <keescook@...omium.org>
>
> Reviewed-by: Gustavo A. R. Silva <gustavoars@...nel.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
Powered by blists - more mailing lists