All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eugene Syromiatnikov <esyr@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: jk@codeconstruct.com.au, netdev@vger.kernel.org, kuba@kernel.org,
	matt@codeconstruct.com.au
Subject: Re: [PATCH net-next v5] mctp: Implement extended addressing
Date: Mon, 25 Oct 2021 17:34:18 +0200	[thread overview]
Message-ID: <20211025153418.GA6853@asgard.redhat.com> (raw)
In-Reply-To: <20211025.161549.899716517054473254.davem@davemloft.net>

On Mon, Oct 25, 2021 at 04:15:49PM +0100, David Miller wrote:
> From: Jeremy Kerr <jk@codeconstruct.com.au>
> Date: Mon, 25 Oct 2021 11:27:57 +0800
> 
> > @@ -152,10 +155,16 @@ struct mctp_sk_key {
> >  
> >  struct mctp_skb_cb {
> >  	unsigned int	magic;
> > -	unsigned int	net;
> > +	int		net;
> > +	int		ifindex; /* extended/direct addressing if set */
> > +	unsigned char	halen;
> >  	mctp_eid_t	src;
> > +	unsigned char	haddr[];
> >  };
> >  
> putting a variably sized type in the skb control blocxk is not a good idea.
> Overruns will be silent, nothing in the typing protects you from udsing more space
> han exists in skb->cb.
> 
> Plrease find another way, thank you.

haddr[MAX_ADDR_LEN]?  It is defined to 32 bytes.


  reply	other threads:[~2021-10-25 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25  3:27 [PATCH net-next v5] mctp: Implement extended addressing Jeremy Kerr
2021-10-25 15:15 ` David Miller
2021-10-25 15:34   ` Eugene Syromiatnikov [this message]
2021-10-26  1:55   ` Jeremy Kerr

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=20211025153418.GA6853@asgard.redhat.com \
    --to=esyr@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jk@codeconstruct.com.au \
    --cc=kuba@kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=netdev@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.