netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pull request: sctp updates for net-next
@ 2009-06-03 14:33 Vlad Yasevich
  2009-06-04  4:45 ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Vlad Yasevich @ 2009-06-03 14:33 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: Linux SCTP Dev Mailing list

Hi David

The following changes since commit 047584ce94108012288554a5f84585d792cc7f8f:
  Haiying Wang (1):
        net/ucc_geth: Add SGMII support for UEC GETH driver

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/vxy/lksctp-dev.git net-next

Jean-Mickael Guerin (1):
      sctp: fix sack_timeout sysctl min and max types

Vlad Yasevich (1):
      sctp: support non-blocking version of the new sctp_connectx() API

Wei Yongjun (8):
      sctp: fix error cause codes of ADD-IP extension
      sctp: fix report unrecognized parameter in ACSONF-ACK
      sctp: fix the error code when ASCONF is received with invalid address
      sctp: fix a typo in net/sctp/sm_statetable.c
      sctp: fix to only enable IPv6 address support on PF_INET6 socket
      sctp: fix panic when T2-shutdown timer expire on removed transport
      sctp: fix panic when T4-rto timer expire on removed transport
      sctp: fix to choose alternate destination when retransmit ASCONF chunk

 include/linux/sctp.h       |   20 +++++++-------
 include/net/sctp/structs.h |    6 +---
 include/net/sctp/user.h    |    2 +
 net/sctp/associola.c       |   64 +++++++++++++++++++------------------------
 net/sctp/sm_make_chunk.c   |   16 +++++-----
 net/sctp/sm_sideeffect.c   |    8 +++--
 net/sctp/sm_statefuns.c    |   14 +++++++---
 net/sctp/sm_statetable.c   |    2 +-
 net/sctp/socket.c          |   42 ++++++++++++++++++++++++++++-
 net/sctp/sysctl.c          |    6 ++--
 10 files changed, 110 insertions(+), 70 deletions(-)


Please pull into net-next-2.6.

Thanks
-vlad

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pull request: sctp updates for net-next
  2009-06-03 14:33 pull request: sctp updates for net-next Vlad Yasevich
@ 2009-06-04  4:45 ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2009-06-04  4:45 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Wed, 03 Jun 2009 10:33:27 -0400

> The following changes since commit 047584ce94108012288554a5f84585d792cc7f8f:
>   Haiying Wang (1):
>         net/ucc_geth: Add SGMII support for UEC GETH driver
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/vxy/lksctp-dev.git net-next

Pulled, thanks a lot Vlad!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* pull request: SCTP updates for net-next
@ 2009-11-23 21:06 Vlad Yasevich
  2009-11-29  8:17 ` David Miller
  2009-12-04  5:00 ` Andrew Morton
  0 siblings, 2 replies; 8+ messages in thread
From: Vlad Yasevich @ 2009-11-23 21:06 UTC (permalink / raw)
  To: David Miller; +Cc: Linux SCTP Dev Mailing list, netdev

Hi David

Here is a set of SCTP patches for net-next.  Please pull.

The following changes since commit dc63d3771cc6492220f53caf5fded6090d45d9ce:
  Alexander Duyck (1):
        ixgbe: Only set/clear VFE in ixgbe_set_rx_mode

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/vxy/lksctp-dev.git net-next

Amerigo Wang (1):
      sctp: remove deprecated SCTP_GET_*_OLD stuffs

Andrei Pelinescu-Onciul (3):
      sctp: allow setting path_maxrxt independent of SPP_PMTUD_ENABLE
      sctp: limit maximum autoclose setsockopt value
      sctp: fix integer overflow when setting the autoclose timer

Neil Horman (1):
      sctp: Fix mis-ordering of user space data when multihoming in use

Vlad Yasevich (7):
      sctp: Fix malformed "Invalid Stream Identifier" error
      sctp: Select a working primary during sctp_connectx()
      sctp: Update SWS avaoidance receiver side algorithm
      sctp: Remove useless last_time_used variable
      sctp: Turn the enum socket options into defines
      sctp: Update max.burst implementation
      sctp: prevent too-fast association id reuse

Wei Yongjun (3):
      sctp: implement definition for SACK-IMMEDIATELY extension
      sctp: implement the receiver side for SACK-IMMEDIATELY extension
      sctp: implement the sender side for SACK-IMMEDIATELY extension

 Documentation/feature-removal-schedule.txt |   12 -
 include/linux/sctp.h                       |    1 +
 include/net/sctp/constants.h               |    4 +
 include/net/sctp/sm.h                      |    3 +-
 include/net/sctp/structs.h                 |   16 +-
 include/net/sctp/user.h                    |  132 ++++--------
 net/sctp/associola.c                       |   27 ++-
 net/sctp/chunk.c                           |   15 ++-
 net/sctp/output.c                          |   50 +---
 net/sctp/outqueue.c                        |   22 ++
 net/sctp/protocol.c                        |    3 +
 net/sctp/sm_make_chunk.c                   |   13 +-
 net/sctp/sm_sideeffect.c                   |    5 +-
 net/sctp/sm_statefuns.c                    |   26 ++-
 net/sctp/socket.c                          |  335 +---------------------------
 net/sctp/sysctl.c                          |   13 +
 net/sctp/transport.c                       |   45 ++++-
 17 files changed, 223 insertions(+), 499 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pull request: SCTP updates for net-next
  2009-11-23 21:06 pull request: SCTP " Vlad Yasevich
@ 2009-11-29  8:17 ` David Miller
  2009-12-04  5:00 ` Andrew Morton
  1 sibling, 0 replies; 8+ messages in thread
From: David Miller @ 2009-11-29  8:17 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: linux-sctp, netdev

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Mon, 23 Nov 2009 16:06:50 -0500

> Hi David
> 
> Here is a set of SCTP patches for net-next.  Please pull.
> 
> The following changes since commit dc63d3771cc6492220f53caf5fded6090d45d9ce:
>   Alexander Duyck (1):
>         ixgbe: Only set/clear VFE in ixgbe_set_rx_mode
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/vxy/lksctp-dev.git net-next

Pulled, thanks a lot Vlad.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pull request: SCTP updates for net-next
  2009-11-23 21:06 pull request: SCTP " Vlad Yasevich
  2009-11-29  8:17 ` David Miller
@ 2009-12-04  5:00 ` Andrew Morton
  2009-12-04 16:23   ` Vlad Yasevich
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2009-12-04  5:00 UTC (permalink / raw)
  To: Vlad Yasevich
  Cc: David Miller, Linux SCTP Dev Mailing list, netdev,
	Andrei Pelinescu-Onciul

On Mon, 23 Nov 2009 16:06:50 -0500 Vlad Yasevich <vladislav.yasevich@hp.com> wrote:

> Andrei Pelinescu-Onciul (3):
>       sctp: allow setting path_maxrxt independent of SPP_PMTUD_ENABLE
>       sctp: limit maximum autoclose setsockopt value
>       sctp: fix integer overflow when setting the autoclose timer

Problems with this one:

: commit f6778aab6ccc4b510b4dcfa770d9949b696b4545
: Author:     Andrei Pelinescu-Onciul <andrei@iptel.org>
: AuthorDate: Mon Nov 23 15:54:01 2009 -0500
: Commit:     Vlad Yasevich <vladislav.yasevich@hp.com>
: CommitDate: Mon Nov 23 15:54:01 2009 -0500
: 
:     sctp: limit maximum autoclose setsockopt value
:     
:     To avoid overflowing the maximum timer interval when transforming
:     the  autoclose interval from seconds to jiffies, limit the maximum
:     autoclose value to MAX_SCHEDULE_TIMEOUT/HZ.
:     
:     Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
:     Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
: 
: diff --git a/net/sctp/socket.c b/net/sctp/socket.c
: index d2681a6..71513b3 100644
: --- a/net/sctp/socket.c
: +++ b/net/sctp/socket.c
: @@ -2086,6 +2086,9 @@ static int sctp_setsockopt_autoclose(struct sock *sk, char __user *optval,
:  		return -EINVAL;
:  	if (copy_from_user(&sp->autoclose, optval, optlen))
:  		return -EFAULT;
: +	/* make sure it won't exceed MAX_SCHEDULE_TIMEOUT */
: +	if (sp->autoclose > (MAX_SCHEDULE_TIMEOUT / HZ) )
: +		sp->autoclose = MAX_SCHEDULE_TIMEOUT / HZ ;
:  
:  	return 0;
:  }

a) it has two coding-style errors in two lines.  Please go away, add
   scripts/checkpatch.pl to your patch development tools and then continue
   reading.

b) have you done that yet?

c) it generates this on 64-bit:

net/sctp/socket.c: In function 'sctp_setsockopt_autoclose':
net/sctp/socket.c:2090: warning: comparison is always false due to limited range of data type

   but that's proving somewhat hard to fix in a nice way.

d) I'm not sure that we should fix it anyway.  Is it really a good
   idea to take an incorrect, invalid setting from userspace, to
   silently modify that setting and to not inform userspace?

   Bear in mind that MAX_SCHEDULE_TIMEOUT has different values on
   32- and 64-bit kernels.  So the same source code will have different
   behaviour depending on what type of kernel it is executed on.

   I think.

   It also means that kernel behaviour will differ as CONFIG_HZ is
   altered, in some way which I can't be bothered working out.


Overall, it would be way simpler and saner to clamp this value to some
explicit time period, IMO.

<pulls number out of thin air>

--- a/net/sctp/socket.c~a
+++ a/net/sctp/socket.c
@@ -2086,9 +2086,8 @@ static int sctp_setsockopt_autoclose(str
 		return -EINVAL;
 	if (copy_from_user(&sp->autoclose, optval, optlen))
 		return -EFAULT;
-	/* make sure it won't exceed MAX_SCHEDULE_TIMEOUT */
-	if (sp->autoclose > (MAX_SCHEDULE_TIMEOUT / HZ) )
-		sp->autoclose = MAX_SCHEDULE_TIMEOUT / HZ ;
+	/* make sure it won't exceed one hour */
+	sp->autoclose = min_t(u32, sp->autoclose, 60 * 60);
 
 	return 0;
 }
_




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pull request: SCTP updates for net-next
  2009-12-04  5:00 ` Andrew Morton
@ 2009-12-04 16:23   ` Vlad Yasevich
  2009-12-04 20:52     ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Vlad Yasevich @ 2009-12-04 16:23 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Miller, Linux SCTP Dev Mailing list, netdev,
	Andrei Pelinescu-Onciul


Andrew Morton wrote:
> On Mon, 23 Nov 2009 16:06:50 -0500 Vlad Yasevich <vladislav.yasevich@hp.com> wrote:
> 
>> Andrei Pelinescu-Onciul (3):
>>       sctp: allow setting path_maxrxt independent of SPP_PMTUD_ENABLE
>>       sctp: limit maximum autoclose setsockopt value
>>       sctp: fix integer overflow when setting the autoclose timer
> 
> Problems with this one:
> 
> : commit f6778aab6ccc4b510b4dcfa770d9949b696b4545
> : Author:     Andrei Pelinescu-Onciul <andrei@iptel.org>
> : AuthorDate: Mon Nov 23 15:54:01 2009 -0500
> : Commit:     Vlad Yasevich <vladislav.yasevich@hp.com>
> : CommitDate: Mon Nov 23 15:54:01 2009 -0500
> : 
> :     sctp: limit maximum autoclose setsockopt value
> :     
> :     To avoid overflowing the maximum timer interval when transforming
> :     the  autoclose interval from seconds to jiffies, limit the maximum
> :     autoclose value to MAX_SCHEDULE_TIMEOUT/HZ.
> :     
> :     Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
> :     Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
> : 
> : diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> : index d2681a6..71513b3 100644
> : --- a/net/sctp/socket.c
> : +++ b/net/sctp/socket.c
> : @@ -2086,6 +2086,9 @@ static int sctp_setsockopt_autoclose(struct sock *sk, char __user *optval,
> :  		return -EINVAL;
> :  	if (copy_from_user(&sp->autoclose, optval, optlen))
> :  		return -EFAULT;
> : +	/* make sure it won't exceed MAX_SCHEDULE_TIMEOUT */
> : +	if (sp->autoclose > (MAX_SCHEDULE_TIMEOUT / HZ) )
> : +		sp->autoclose = MAX_SCHEDULE_TIMEOUT / HZ ;
> :  
> :  	return 0;
> :  }
> 
> a) it has two coding-style errors in two lines.  Please go away, add
>    scripts/checkpatch.pl to your patch development tools and then continue
>    reading.
> 
> b) have you done that yet?

Gack, totally missed those spaces in the email client.  Will use checkpatch from
now on.

> 
> c) it generates this on 64-bit:
> 
> net/sctp/socket.c: In function 'sctp_setsockopt_autoclose':
> net/sctp/socket.c:2090: warning: comparison is always false due to limited range of data type
> 
>    but that's proving somewhat hard to fix in a nice way.

There was a patch that fixed it.  I saw that you pulled it into -mm tree.

> 
> d) I'm not sure that we should fix it anyway.  Is it really a good
>    idea to take an incorrect, invalid setting from userspace, to
>    silently modify that setting and to not inform userspace?
> 

We do it with other options, that's not an issue.  At the values where
we change it, it becomes somewhat moot point.

>    Bear in mind that MAX_SCHEDULE_TIMEOUT has different values on
>    32- and 64-bit kernels.  So the same source code will have different
>    behaviour depending on what type of kernel it is executed on.
> 
>    I think.
> 
>    It also means that kernel behaviour will differ as CONFIG_HZ is
>    altered, in some way which I can't be bothered working out.
> 

This is actually OK.  It allows the longest possible timeout depending
on configuration.  I've actually tested this in a harness and it works
very well with different HZ values (to bad the harness in not 64 bit aware. :( )

> 
> Overall, it would be way simpler and saner to clamp this value to some
> explicit time period, IMO.
> 
> <pulls number out of thin air>
> 
> --- a/net/sctp/socket.c~a
> +++ a/net/sctp/socket.c
> @@ -2086,9 +2086,8 @@ static int sctp_setsockopt_autoclose(str
>  		return -EINVAL;
>  	if (copy_from_user(&sp->autoclose, optval, optlen))
>  		return -EFAULT;
> -	/* make sure it won't exceed MAX_SCHEDULE_TIMEOUT */
> -	if (sp->autoclose > (MAX_SCHEDULE_TIMEOUT / HZ) )
> -		sp->autoclose = MAX_SCHEDULE_TIMEOUT / HZ ;
> +	/* make sure it won't exceed one hour */
> +	sp->autoclose = min_t(u32, sp->autoclose, 60 * 60);
>  

But that may not be long enough.  The spec doesn't impose limits
and it's really up to the application to decide how long it wants
to keep idle connections open.  Thus any limits shorter the maximum
supported by kernel are really artificial and may not be sufficient.

Thanks
-vlad

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pull request: SCTP updates for net-next
  2009-12-04 16:23   ` Vlad Yasevich
@ 2009-12-04 20:52     ` Andrew Morton
  2009-12-07 15:05       ` Vlad Yasevich
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2009-12-04 20:52 UTC (permalink / raw)
  To: Vlad Yasevich
  Cc: David Miller, Linux SCTP Dev Mailing list, netdev,
	Andrei Pelinescu-Onciul

On Fri, 04 Dec 2009 11:23:14 -0500
Vlad Yasevich <vladislav.yasevich@hp.com> wrote:

> > 
> > Overall, it would be way simpler and saner to clamp this value to some
> > explicit time period, IMO.
> > 
> > <pulls number out of thin air>
> > 
> > --- a/net/sctp/socket.c~a
> > +++ a/net/sctp/socket.c
> > @@ -2086,9 +2086,8 @@ static int sctp_setsockopt_autoclose(str
> >  		return -EINVAL;
> >  	if (copy_from_user(&sp->autoclose, optval, optlen))
> >  		return -EFAULT;
> > -	/* make sure it won't exceed MAX_SCHEDULE_TIMEOUT */
> > -	if (sp->autoclose > (MAX_SCHEDULE_TIMEOUT / HZ) )
> > -		sp->autoclose = MAX_SCHEDULE_TIMEOUT / HZ ;
> > +	/* make sure it won't exceed one hour */
> > +	sp->autoclose = min_t(u32, sp->autoclose, 60 * 60);
> >  
> 
> But that may not be long enough.  The spec doesn't impose limits
> and it's really up to the application to decide how long it wants
> to keep idle connections open.  Thus any limits shorter the maximum
> supported by kernel are really artificial and may not be sufficient.

Could make ->autoclose a u64?  That fixes any 32bit-vs-64bit
inconsistencies and allows for an effectively infinite period.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pull request: SCTP updates for net-next
  2009-12-04 20:52     ` Andrew Morton
@ 2009-12-07 15:05       ` Vlad Yasevich
  0 siblings, 0 replies; 8+ messages in thread
From: Vlad Yasevich @ 2009-12-07 15:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Miller, Linux SCTP Dev Mailing list, netdev,
	Andrei Pelinescu-Onciul



Andrew Morton wrote:
> On Fri, 04 Dec 2009 11:23:14 -0500
> Vlad Yasevich <vladislav.yasevich@hp.com> wrote:
> 
>>> Overall, it would be way simpler and saner to clamp this value to some
>>> explicit time period, IMO.
>>>
>>> <pulls number out of thin air>
>>>
>>> --- a/net/sctp/socket.c~a
>>> +++ a/net/sctp/socket.c
>>> @@ -2086,9 +2086,8 @@ static int sctp_setsockopt_autoclose(str
>>>  		return -EINVAL;
>>>  	if (copy_from_user(&sp->autoclose, optval, optlen))
>>>  		return -EFAULT;
>>> -	/* make sure it won't exceed MAX_SCHEDULE_TIMEOUT */
>>> -	if (sp->autoclose > (MAX_SCHEDULE_TIMEOUT / HZ) )
>>> -		sp->autoclose = MAX_SCHEDULE_TIMEOUT / HZ ;
>>> +	/* make sure it won't exceed one hour */
>>> +	sp->autoclose = min_t(u32, sp->autoclose, 60 * 60);
>>>  
>> But that may not be long enough.  The spec doesn't impose limits
>> and it's really up to the application to decide how long it wants
>> to keep idle connections open.  Thus any limits shorter the maximum
>> supported by kernel are really artificial and may not be sufficient.
> 
> Could make ->autoclose a u64?  That fixes any 32bit-vs-64bit
> inconsistencies and allows for an effectively infinite period.
> 

That's isn't going to help much since the timer intervals are unsigned longs,
and would overflow on 32 bit systems.  We would still need the limiting value to
prevent that overflow, but would be able to drop the cast.  Additionally, the
API provides only for a 32 bit integer, thus we would waste 32 bit of space.

I don't think that's worth it.  The last patch from Andrei fixed the warning
with a cast to u32.  It seems like the simplest solution.

-vlad

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-12-07 15:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-03 14:33 pull request: sctp updates for net-next Vlad Yasevich
2009-06-04  4:45 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2009-11-23 21:06 pull request: SCTP " Vlad Yasevich
2009-11-29  8:17 ` David Miller
2009-12-04  5:00 ` Andrew Morton
2009-12-04 16:23   ` Vlad Yasevich
2009-12-04 20:52     ` Andrew Morton
2009-12-07 15:05       ` Vlad Yasevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).