mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <netdev@vger.kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] xfrm: convert alg_key to flexible array member
Date: Thu, 23 Jun 2022 12:49:48 +0200	[thread overview]
Message-ID: <20220623104948.GD566407@gauss3.secunet.de> (raw)
In-Reply-To: <20220602104515.GI91220@gauss3.secunet.de>

On Thu, Jun 02, 2022 at 12:45:15PM +0200, Steffen Klassert wrote:
> On Tue, May 24, 2022 at 01:47:40PM -0700, Stephen Hemminger wrote:
> > Iproute2 build generates a warning when built with gcc-12.
> > This is because the alg_key in xfrm.h API has zero size
> > array element instead of flexible array.
> > 
> >     CC       xfrm_state.o
> > In function ‘xfrm_algo_parse’,
> >     inlined from ‘xfrm_state_modify.constprop’ at xfrm_state.c:573:5:
> > xfrm_state.c:162:32: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
> >   162 |                         buf[j] = val;
> >       |                         ~~~~~~~^~~~~
> > 
> > This patch convert the alg_key into flexible array member.
> > There are other zero size arrays here that should be converted as
> > well.
> > 
> > This patch is RFC only since it is only compile tested and
> > passes trivial iproute2 tests.
> > 
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> 
> I've put this today to our test systems and it showed no problems,
> so we can integrate it after the merge window.

This is now applied to ipsec-next, thanks!

      reply	other threads:[~2022-06-23 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24 20:47 Stephen Hemminger
2022-05-25  0:15 ` Herbert Xu
2022-06-02 10:45 ` Steffen Klassert
2022-06-23 10:49   ` Steffen Klassert [this message]

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=20220623104948.GD566407@gauss3.secunet.de \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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®