Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-15 Thread Marcelo Ricardo Leitner
On Tue, Aug 15, 2017 at 08:37:49AM -0700, Eric Dumazet wrote: > On Tue, 2017-08-15 at 12:05 -0300, Marcelo Ricardo Leitner wrote: > > > Ok, but I should see a difference in the generated code, right? > > Depends on the compiler. Have you tried older versions ? > This was with gcc 6.4.1, fc25

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-15 Thread Marcelo Ricardo Leitner
On Tue, Aug 15, 2017 at 08:37:49AM -0700, Eric Dumazet wrote: > On Tue, 2017-08-15 at 12:05 -0300, Marcelo Ricardo Leitner wrote: > > > Ok, but I should see a difference in the generated code, right? > > Depends on the compiler. Have you tried older versions ? > This was with gcc 6.4.1, fc25

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-15 Thread Eric Dumazet
On Tue, 2017-08-15 at 12:05 -0300, Marcelo Ricardo Leitner wrote: > Ok, but I should see a difference in the generated code, right? Depends on the compiler. Have you tried older versions ? One argument is that following struct member definition eases code review. (It is easier to catch a field

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-15 Thread Eric Dumazet
On Tue, 2017-08-15 at 12:05 -0300, Marcelo Ricardo Leitner wrote: > Ok, but I should see a difference in the generated code, right? Depends on the compiler. Have you tried older versions ? One argument is that following struct member definition eases code review. (It is easier to catch a field

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-15 Thread Marcelo Ricardo Leitner
On Mon, Aug 14, 2017 at 07:40:51PM -0700, David Miller wrote: > From: Marcelo Ricardo Leitner > Date: Mon, 14 Aug 2017 22:58:14 -0300 > > > On Tue, Aug 15, 2017 at 10:43:59AM +0900, 吉藤英明 wrote: > >> > diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c > >> > index

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-15 Thread Marcelo Ricardo Leitner
On Mon, Aug 14, 2017 at 07:40:51PM -0700, David Miller wrote: > From: Marcelo Ricardo Leitner > Date: Mon, 14 Aug 2017 22:58:14 -0300 > > > On Tue, Aug 15, 2017 at 10:43:59AM +0900, 吉藤英明 wrote: > >> > diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c > >> > index 2a186b201ad2..a15d691829c6 100644 >

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-14 Thread David Miller
From: Marcelo Ricardo Leitner Date: Mon, 14 Aug 2017 22:58:14 -0300 > On Tue, Aug 15, 2017 at 10:43:59AM +0900, 吉藤英明 wrote: >> > diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c >> > index 2a186b201ad2..a15d691829c6 100644 >> > --- a/net/sctp/ipv6.c >> > +++

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-14 Thread David Miller
From: Marcelo Ricardo Leitner Date: Mon, 14 Aug 2017 22:58:14 -0300 > On Tue, Aug 15, 2017 at 10:43:59AM +0900, 吉藤英明 wrote: >> > diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c >> > index 2a186b201ad2..a15d691829c6 100644 >> > --- a/net/sctp/ipv6.c >> > +++ b/net/sctp/ipv6.c >> > @@ -513,6 +513,8

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-14 Thread Marcelo Ricardo Leitner
On Tue, Aug 15, 2017 at 10:43:59AM +0900, 吉藤英明 wrote: > Hi, > > 2017-08-15 3:43 GMT+09:00 Alexander Potapenko : > > KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and > > sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below). > > Make sure all fields

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-14 Thread Marcelo Ricardo Leitner
On Tue, Aug 15, 2017 at 10:43:59AM +0900, 吉藤英明 wrote: > Hi, > > 2017-08-15 3:43 GMT+09:00 Alexander Potapenko : > > KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and > > sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below). > > Make sure all fields of an IPv6 address

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-14 Thread 吉藤英明
Hi, 2017-08-15 3:43 GMT+09:00 Alexander Potapenko : > KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and > sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below). > Make sure all fields of an IPv6 address are initialized, which > guarantees that the

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-14 Thread 吉藤英明
Hi, 2017-08-15 3:43 GMT+09:00 Alexander Potapenko : > KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and > sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below). > Make sure all fields of an IPv6 address are initialized, which > guarantees that the IPv4 fields are also

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-14 Thread Marcelo Ricardo Leitner
On Mon, Aug 14, 2017 at 08:43:04PM +0200, Alexander Potapenko wrote: > KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and > sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below). > Make sure all fields of an IPv6 address are initialized, which > guarantees that the IPv4

Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-14 Thread Marcelo Ricardo Leitner
On Mon, Aug 14, 2017 at 08:43:04PM +0200, Alexander Potapenko wrote: > KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and > sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below). > Make sure all fields of an IPv6 address are initialized, which > guarantees that the IPv4

[PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-14 Thread Alexander Potapenko
KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below). Make sure all fields of an IPv6 address are initialized, which guarantees that the IPv4 fields are also initialized.

[PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-14 Thread Alexander Potapenko
KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below). Make sure all fields of an IPv6 address are initialized, which guarantees that the IPv4 fields are also initialized.