LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [PATCH] libipvs: fix some buffer sizes

To: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>
Subject: Re: [PATCH] libipvs: fix some buffer sizes
Cc: Julian Anastasov <ja@xxxxxx>, lvs-devel@xxxxxxxxxxxxxxx, lvs-users@xxxxxxxxxxxxxxxxxxxxxx
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Fri, 25 May 2018 11:34:19 +0200
On Fri, May 25, 2018 at 09:29:35AM +0200, Jesper Dangaard Brouer wrote:
> 
> On Thu, 24 May 2018 23:37:45 +0300 Julian Anastasov <ja@xxxxxx> wrote:
> 
> > Size or length? Here is the answer:
> > 
> > - IP_VS_SCHEDNAME_MAXLEN and IP_VS_IFNAME_MAXLEN are sizes
> > because they are used in kernel structures exported to user
> > space for the old setsockopt interface. We can not change
> > these structures in the kernel.
> > 
> > - IP_VS_PENAME_MAXLEN and IP_VS_PEDATA_MAXLEN are max lengths
> > because they are not exported to the old interface.
> > 
> > As result:
> > - buffers should have space for NUL terminator
> > - strncpy should use sizeof(buffer) - 1 as max length
> > 
> > As we change the libipvs structures, their users should be
> > recompiled.
> > 
> > Signed-off-by: Julian Anastasov <ja@xxxxxx>
> 
> This all looks fine to me.  I'll give other people a little time to
> review and ACK, before I apply this.
> 
> (To Julian) did you find this by manual review, or did you use some tool
> to find these?

Acked-by: Simon Horman <horms@xxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>