All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jiri Slaby <jirislaby@kernel.org>, Nathan Chancellor <nathan@kernel.org>
Cc: Kees Cook <keescook@chromium.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	linux-serial@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-hardening@vger.kernel.org, llvm@lists.linux.dev,
	patches@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH] tty: mxser: Remove __counted_by from mxser_board.ports[]
Date: Thu, 30 May 2024 09:40:13 +0200	[thread overview]
Message-ID: <2024053008-sadly-skydiver-92be@gregkh> (raw)
In-Reply-To: <d7c19866-6883-4f98-b178-a5ccf8726895@kernel.org>

On Thu, May 30, 2024 at 08:22:03AM +0200, Jiri Slaby wrote:
> >  This will be an error in a future compiler version [-Werror,-Wbounds-safety-counted-by-elt-type-unknown-size]
> >      291 |         struct mxser_port ports[] __counted_by(nports);
> >          |         ^~~~~~~~~~~~~~~~~~~~~~~~~
> >    1 error generated.
> > 
> > Remove this use of __counted_by to fix the warning/error. However,
> > rather than remove it altogether, leave it commented, as it may be
> > possible to support this in future compiler releases.
> 
> This looks like a compiler bug/deficiency.

I agree, why not just turn that option off in the compiler so that these
"warnings" will not show up?

> What does gcc say BTW?
> 
> > Cc: stable@vger.kernel.org
> > Closes: https://github.com/ClangBuiltLinux/linux/issues/2026
> > Fixes: f34907ecca71 ("mxser: Annotate struct mxser_board with __counted_by")
> 
> I would not say "Fixes" here. It only works around a broken compiler.

Agreed, don't add Fixes: for this, it's a compiler bug, not a kernel
issue.

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jiri Slaby <jirislaby@kernel.org>, Nathan Chancellor <nathan@kernel.org>
Cc: Kees Cook <keescook@chromium.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	linux-serial@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-hardening@vger.kernel.org, llvm@lists.linux.dev,
	patches@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH] tty: mxser: Remove __counted_by from mxser_board.ports[]
Date: Thu, 30 May 2024 09:40:13 +0200	[thread overview]
Message-ID: <2024053008-sadly-skydiver-92be@gregkh> (raw)
In-Reply-To: <d7c19866-6883-4f98-b178-a5ccf8726895@kernel.org>

On Thu, May 30, 2024 at 08:22:03AM +0200, Jiri Slaby wrote:
> >  This will be an error in a future compiler version [-Werror,-Wbounds-safety-counted-by-elt-type-unknown-size]
> >      291 |         struct mxser_port ports[] __counted_by(nports);
> >          |         ^~~~~~~~~~~~~~~~~~~~~~~~~
> >    1 error generated.
> > 
> > Remove this use of __counted_by to fix the warning/error. However,
> > rather than remove it altogether, leave it commented, as it may be
> > possible to support this in future compiler releases.
> 
> This looks like a compiler bug/deficiency.

I agree, why not just turn that option off in the compiler so that these
"warnings" will not show up?

> What does gcc say BTW?
> 
> > Cc: stable@vger.kernel.org
> > Closes: https://github.com/ClangBuiltLinux/linux/issues/2026
> > Fixes: f34907ecca71 ("mxser: Annotate struct mxser_board with __counted_by")
> 
> I would not say "Fixes" here. It only works around a broken compiler.

Agreed, don't add Fixes: for this, it's a compiler bug, not a kernel
issue.

thanks,

greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-05-30  7:40 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29 21:29 [PATCH] tty: mxser: Remove __counted_by from mxser_board.ports[] Nathan Chancellor
2024-05-29 21:29 ` Nathan Chancellor
2024-05-30  6:22 ` Jiri Slaby
2024-05-30  6:22   ` Jiri Slaby
2024-05-30  7:40   ` Greg Kroah-Hartman [this message]
2024-05-30  7:40     ` Greg Kroah-Hartman
2024-05-30  8:12     ` Gustavo A. R. Silva
2024-05-30  8:12       ` Gustavo A. R. Silva
2024-05-30  8:33       ` Jiri Slaby
2024-05-30  8:33         ` Jiri Slaby
2024-05-30  8:41         ` Jiri Slaby
2024-05-30  8:41           ` Jiri Slaby
2024-05-30  8:43           ` Bill Wendling
2024-05-30  8:43             ` Bill Wendling
2024-05-30  8:46             ` Gustavo A. R. Silva
2024-05-30  8:46               ` Gustavo A. R. Silva
2024-06-03  6:07               ` Jiri Slaby
2024-06-03  6:07                 ` Jiri Slaby
2024-06-03  8:26                 ` Gustavo A. R. Silva
2024-06-03  8:26                   ` Gustavo A. R. Silva
2024-06-12 20:04                   ` Gustavo A. R. Silva
2024-05-30  8:42         ` Gustavo A. R. Silva
2024-05-30  8:42           ` Gustavo A. R. Silva
2024-05-30 17:43     ` Nathan Chancellor
2024-05-30 17:43       ` Nathan Chancellor
2024-06-27 17:14 ` Kees Cook
2024-06-28  2:51   ` Gustavo A. R. Silva
2024-06-28 14:31   ` Greg Kroah-Hartman
2024-06-28 15:58 ` 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=2024053008-sadly-skydiver-92be@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=gustavoars@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=jirislaby@kernel.org \
    --cc=justinstitt@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.