All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/5]: SCTP updates
@ 2008-12-20  1:47 ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp

Hi David

The following series is set of updates for net-next.  It is primarily
new API and cleanups.  However patch 04/05 (Avoid memory overflow while
FWD-TSN chunk is received with bad stream ID) probably needs to be pushed
to stable.

Please apply.  If you want me to respin 04/05 against net-2.6, let me know.

Thanks
-vlad

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

* [PATCH net-next 0/5]: SCTP updates
@ 2008-12-20  1:47 ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp

Hi David

The following series is set of updates for net-next.  It is primarily
new API and cleanups.  However patch 04/05 (Avoid memory overflow while
FWD-TSN chunk is received with bad stream ID) probably needs to be pushed
to stable.

Please apply.  If you want me to respin 04/05 against net-2.6, let me know.

Thanks
-vlad

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

* [PATCH net-next 0/5]: SCTP updates
  2008-12-20  1:47 ` Vlad Yasevich
@ 2008-12-20  1:47   ` Vlad Yasevich
  -1 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp



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

* [PATCH net-next 0/5]: SCTP updates
@ 2008-12-20  1:47   ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp



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

* [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option into ietf API extension compliance
  2008-12-20  1:47 ` Vlad Yasevich
@ 2008-12-20  1:47   ` Vlad Yasevich
  -1 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp, Wei Yongjun, Vlad Yasevich

From: Wei Yongjun <yjwei@cn.fujitsu.com>

Brings maxseg socket option set/get into line with the latest ietf socket
extensions API draft, while maintaining backwards compatibility.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 net/sctp/socket.c |  130 +++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 107 insertions(+), 23 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index a2de585..0738843 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2778,32 +2778,77 @@ static int sctp_setsockopt_mappedv4(struct sock *sk, char __user *optval, int op
 }
 
 /*
- * 7.1.17 Set the maximum fragrmentation size (SCTP_MAXSEG)
- *
- * This socket option specifies the maximum size to put in any outgoing
- * SCTP chunk.  If a message is larger than this size it will be
+ * 8.1.16.  Get or Set the Maximum Fragmentation Size (SCTP_MAXSEG)
+ * This option will get or set the maximum size to put in any outgoing
+ * SCTP DATA chunk.  If a message is larger than this size it will be
  * fragmented by SCTP into the specified size.  Note that the underlying
  * SCTP implementation may fragment into smaller sized chunks when the
  * PMTU of the underlying association is smaller than the value set by
- * the user.
+ * the user.  The default value for this option is '0' which indicates
+ * the user is NOT limiting fragmentation and only the PMTU will effect
+ * SCTP's choice of DATA chunk size.  Note also that values set larger
+ * than the maximum size of an IP datagram will effectively let SCTP
+ * control fragmentation (i.e. the same as setting this option to 0).
+ *
+ * The following structure is used to access and modify this parameter:
+ *
+ * struct sctp_assoc_value {
+ *   sctp_assoc_t assoc_id;
+ *   uint32_t assoc_value;
+ * };
+ *
+ * assoc_id:  This parameter is ignored for one-to-one style sockets.
+ *    For one-to-many style sockets this parameter indicates which
+ *    association the user is performing an action upon.  Note that if
+ *    this field's value is zero then the endpoints default value is
+ *    changed (effecting future associations only).
+ * assoc_value:  This parameter specifies the maximum size in bytes.
  */
 static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, int optlen)
 {
+	struct sctp_assoc_value params;
 	struct sctp_association *asoc;
 	struct sctp_sock *sp = sctp_sk(sk);
 	int val;
 
-	if (optlen < sizeof(int))
+	if (optlen == sizeof(int)) {
+		printk(KERN_WARNING
+		   "SCTP: Use of int in maxseg socket option deprecated\n");
+		printk(KERN_WARNING
+		   "SCTP: Use struct sctp_assoc_value instead\n");
+		if (copy_from_user(&val, optval, optlen))
+			return -EFAULT;
+		params.assoc_id = 0;
+	} else if (optlen == sizeof(struct sctp_assoc_value)) {
+		if (copy_from_user(&params, optval, optlen))
+			return -EFAULT;
+		val = params.assoc_value;
+	} else
 		return -EINVAL;
-	if (get_user(val, (int __user *)optval))
-		return -EFAULT;
+
 	if ((val != 0) && ((val < 8) || (val > SCTP_MAX_CHUNK_LEN)))
 		return -EINVAL;
-	sp->user_frag = val;
 
-	/* Update the frag_point of the existing associations. */
-	list_for_each_entry(asoc, &(sp->ep->asocs), asocs) {
-		asoc->frag_point = sctp_frag_point(sp, asoc->pathmtu);
+	asoc = sctp_id2assoc(sk, params.assoc_id);
+	if (!asoc && params.assoc_id && sctp_style(sk, UDP))
+		return -EINVAL;
+
+	if (asoc) {
+		if (val == 0) {
+			val = asoc->pathmtu;
+			val -= sp->pf->af->net_header_len;
+			val -= sizeof(struct sctphdr) +
+					sizeof(struct sctp_data_chunk);
+		}
+
+		asoc->frag_point = val;
+	} else {
+		sp->user_frag = val;
+
+		/* Update the frag_point of the existing associations. */
+		list_for_each_entry(asoc, &(sp->ep->asocs), asocs) {
+			asoc->frag_point = sctp_frag_point(sp, asoc->pathmtu);
+		}
 	}
 
 	return 0;
@@ -5100,30 +5145,69 @@ static int sctp_getsockopt_context(struct sock *sk, int len,
 }
 
 /*
- * 7.1.17 Set the maximum fragrmentation size (SCTP_MAXSEG)
- *
- * This socket option specifies the maximum size to put in any outgoing
- * SCTP chunk.  If a message is larger than this size it will be
+ * 8.1.16.  Get or Set the Maximum Fragmentation Size (SCTP_MAXSEG)
+ * This option will get or set the maximum size to put in any outgoing
+ * SCTP DATA chunk.  If a message is larger than this size it will be
  * fragmented by SCTP into the specified size.  Note that the underlying
  * SCTP implementation may fragment into smaller sized chunks when the
  * PMTU of the underlying association is smaller than the value set by
- * the user.
+ * the user.  The default value for this option is '0' which indicates
+ * the user is NOT limiting fragmentation and only the PMTU will effect
+ * SCTP's choice of DATA chunk size.  Note also that values set larger
+ * than the maximum size of an IP datagram will effectively let SCTP
+ * control fragmentation (i.e. the same as setting this option to 0).
+ *
+ * The following structure is used to access and modify this parameter:
+ *
+ * struct sctp_assoc_value {
+ *   sctp_assoc_t assoc_id;
+ *   uint32_t assoc_value;
+ * };
+ *
+ * assoc_id:  This parameter is ignored for one-to-one style sockets.
+ *    For one-to-many style sockets this parameter indicates which
+ *    association the user is performing an action upon.  Note that if
+ *    this field's value is zero then the endpoints default value is
+ *    changed (effecting future associations only).
+ * assoc_value:  This parameter specifies the maximum size in bytes.
  */
 static int sctp_getsockopt_maxseg(struct sock *sk, int len,
 				  char __user *optval, int __user *optlen)
 {
-	int val;
+	struct sctp_assoc_value params;
+	struct sctp_association *asoc;
 
-	if (len < sizeof(int))
+	if (len == sizeof(int)) {
+		printk(KERN_WARNING
+		   "SCTP: Use of int in maxseg socket option deprecated\n");
+		printk(KERN_WARNING
+		   "SCTP: Use struct sctp_assoc_value instead\n");
+		params.assoc_id = 0;
+	} else if (len >= sizeof(struct sctp_assoc_value)) {
+		len = sizeof(struct sctp_assoc_value);
+		if (copy_from_user(&params, optval, sizeof(params)))
+			return -EFAULT;
+	} else
 		return -EINVAL;
 
-	len = sizeof(int);
+	asoc = sctp_id2assoc(sk, params.assoc_id);
+	if (!asoc && params.assoc_id && sctp_style(sk, UDP))
+		return -EINVAL;
+
+	if (asoc)
+		params.assoc_value = asoc->frag_point;
+	else
+		params.assoc_value = sctp_sk(sk)->user_frag;
 
-	val = sctp_sk(sk)->user_frag;
 	if (put_user(len, optlen))
 		return -EFAULT;
-	if (copy_to_user(optval, &val, len))
-		return -EFAULT;
+	if (len == sizeof(int)) {
+		if (copy_to_user(optval, &params.assoc_value, len))
+			return -EFAULT;
+	} else {
+		if (copy_to_user(optval, &params, len))
+			return -EFAULT;
+	}
 
 	return 0;
 }
-- 
1.5.3.5


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

* [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option into ietf API extension compliance
@ 2008-12-20  1:47   ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp, Wei Yongjun, Vlad Yasevich

From: Wei Yongjun <yjwei@cn.fujitsu.com>

Brings maxseg socket option set/get into line with the latest ietf socket
extensions API draft, while maintaining backwards compatibility.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 net/sctp/socket.c |  130 +++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 107 insertions(+), 23 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index a2de585..0738843 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2778,32 +2778,77 @@ static int sctp_setsockopt_mappedv4(struct sock *sk, char __user *optval, int op
 }
 
 /*
- * 7.1.17 Set the maximum fragrmentation size (SCTP_MAXSEG)
- *
- * This socket option specifies the maximum size to put in any outgoing
- * SCTP chunk.  If a message is larger than this size it will be
+ * 8.1.16.  Get or Set the Maximum Fragmentation Size (SCTP_MAXSEG)
+ * This option will get or set the maximum size to put in any outgoing
+ * SCTP DATA chunk.  If a message is larger than this size it will be
  * fragmented by SCTP into the specified size.  Note that the underlying
  * SCTP implementation may fragment into smaller sized chunks when the
  * PMTU of the underlying association is smaller than the value set by
- * the user.
+ * the user.  The default value for this option is '0' which indicates
+ * the user is NOT limiting fragmentation and only the PMTU will effect
+ * SCTP's choice of DATA chunk size.  Note also that values set larger
+ * than the maximum size of an IP datagram will effectively let SCTP
+ * control fragmentation (i.e. the same as setting this option to 0).
+ *
+ * The following structure is used to access and modify this parameter:
+ *
+ * struct sctp_assoc_value {
+ *   sctp_assoc_t assoc_id;
+ *   uint32_t assoc_value;
+ * };
+ *
+ * assoc_id:  This parameter is ignored for one-to-one style sockets.
+ *    For one-to-many style sockets this parameter indicates which
+ *    association the user is performing an action upon.  Note that if
+ *    this field's value is zero then the endpoints default value is
+ *    changed (effecting future associations only).
+ * assoc_value:  This parameter specifies the maximum size in bytes.
  */
 static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, int optlen)
 {
+	struct sctp_assoc_value params;
 	struct sctp_association *asoc;
 	struct sctp_sock *sp = sctp_sk(sk);
 	int val;
 
-	if (optlen < sizeof(int))
+	if (optlen = sizeof(int)) {
+		printk(KERN_WARNING
+		   "SCTP: Use of int in maxseg socket option deprecated\n");
+		printk(KERN_WARNING
+		   "SCTP: Use struct sctp_assoc_value instead\n");
+		if (copy_from_user(&val, optval, optlen))
+			return -EFAULT;
+		params.assoc_id = 0;
+	} else if (optlen = sizeof(struct sctp_assoc_value)) {
+		if (copy_from_user(&params, optval, optlen))
+			return -EFAULT;
+		val = params.assoc_value;
+	} else
 		return -EINVAL;
-	if (get_user(val, (int __user *)optval))
-		return -EFAULT;
+
 	if ((val != 0) && ((val < 8) || (val > SCTP_MAX_CHUNK_LEN)))
 		return -EINVAL;
-	sp->user_frag = val;
 
-	/* Update the frag_point of the existing associations. */
-	list_for_each_entry(asoc, &(sp->ep->asocs), asocs) {
-		asoc->frag_point = sctp_frag_point(sp, asoc->pathmtu);
+	asoc = sctp_id2assoc(sk, params.assoc_id);
+	if (!asoc && params.assoc_id && sctp_style(sk, UDP))
+		return -EINVAL;
+
+	if (asoc) {
+		if (val = 0) {
+			val = asoc->pathmtu;
+			val -= sp->pf->af->net_header_len;
+			val -= sizeof(struct sctphdr) +
+					sizeof(struct sctp_data_chunk);
+		}
+
+		asoc->frag_point = val;
+	} else {
+		sp->user_frag = val;
+
+		/* Update the frag_point of the existing associations. */
+		list_for_each_entry(asoc, &(sp->ep->asocs), asocs) {
+			asoc->frag_point = sctp_frag_point(sp, asoc->pathmtu);
+		}
 	}
 
 	return 0;
@@ -5100,30 +5145,69 @@ static int sctp_getsockopt_context(struct sock *sk, int len,
 }
 
 /*
- * 7.1.17 Set the maximum fragrmentation size (SCTP_MAXSEG)
- *
- * This socket option specifies the maximum size to put in any outgoing
- * SCTP chunk.  If a message is larger than this size it will be
+ * 8.1.16.  Get or Set the Maximum Fragmentation Size (SCTP_MAXSEG)
+ * This option will get or set the maximum size to put in any outgoing
+ * SCTP DATA chunk.  If a message is larger than this size it will be
  * fragmented by SCTP into the specified size.  Note that the underlying
  * SCTP implementation may fragment into smaller sized chunks when the
  * PMTU of the underlying association is smaller than the value set by
- * the user.
+ * the user.  The default value for this option is '0' which indicates
+ * the user is NOT limiting fragmentation and only the PMTU will effect
+ * SCTP's choice of DATA chunk size.  Note also that values set larger
+ * than the maximum size of an IP datagram will effectively let SCTP
+ * control fragmentation (i.e. the same as setting this option to 0).
+ *
+ * The following structure is used to access and modify this parameter:
+ *
+ * struct sctp_assoc_value {
+ *   sctp_assoc_t assoc_id;
+ *   uint32_t assoc_value;
+ * };
+ *
+ * assoc_id:  This parameter is ignored for one-to-one style sockets.
+ *    For one-to-many style sockets this parameter indicates which
+ *    association the user is performing an action upon.  Note that if
+ *    this field's value is zero then the endpoints default value is
+ *    changed (effecting future associations only).
+ * assoc_value:  This parameter specifies the maximum size in bytes.
  */
 static int sctp_getsockopt_maxseg(struct sock *sk, int len,
 				  char __user *optval, int __user *optlen)
 {
-	int val;
+	struct sctp_assoc_value params;
+	struct sctp_association *asoc;
 
-	if (len < sizeof(int))
+	if (len = sizeof(int)) {
+		printk(KERN_WARNING
+		   "SCTP: Use of int in maxseg socket option deprecated\n");
+		printk(KERN_WARNING
+		   "SCTP: Use struct sctp_assoc_value instead\n");
+		params.assoc_id = 0;
+	} else if (len >= sizeof(struct sctp_assoc_value)) {
+		len = sizeof(struct sctp_assoc_value);
+		if (copy_from_user(&params, optval, sizeof(params)))
+			return -EFAULT;
+	} else
 		return -EINVAL;
 
-	len = sizeof(int);
+	asoc = sctp_id2assoc(sk, params.assoc_id);
+	if (!asoc && params.assoc_id && sctp_style(sk, UDP))
+		return -EINVAL;
+
+	if (asoc)
+		params.assoc_value = asoc->frag_point;
+	else
+		params.assoc_value = sctp_sk(sk)->user_frag;
 
-	val = sctp_sk(sk)->user_frag;
 	if (put_user(len, optlen))
 		return -EFAULT;
-	if (copy_to_user(optval, &val, len))
-		return -EFAULT;
+	if (len = sizeof(int)) {
+		if (copy_to_user(optval, &params.assoc_value, len))
+			return -EFAULT;
+	} else {
+		if (copy_to_user(optval, &params, len))
+			return -EFAULT;
+	}
 
 	return 0;
 }
-- 
1.5.3.5


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

* [PATCH net-next 2/5] sctp: Fix a typo in socket.c
  2008-12-20  1:47 ` Vlad Yasevich
@ 2008-12-20  1:47   ` Vlad Yasevich
  -1 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp, Wei Yongjun, Vlad Yasevich

From: Wei Yongjun <yjwei@cn.fujitsu.com>

Just fix a typo in socket.c.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 net/sctp/socket.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 0738843..e432927 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2404,9 +2404,9 @@ static int sctp_setsockopt_delayed_ack(struct sock *sk,
 		if (params.sack_delay == 0 && params.sack_freq == 0)
 			return 0;
 	} else if (optlen == sizeof(struct sctp_assoc_value)) {
-		printk(KERN_WARNING "SCTP: Use of struct sctp_sack_info "
+		printk(KERN_WARNING "SCTP: Use of struct sctp_assoc_value "
 		       "in delayed_ack socket option deprecated\n");
-		printk(KERN_WARNING "SCTP: struct sctp_sack_info instead\n");
+		printk(KERN_WARNING "SCTP: Use struct sctp_sack_info instead\n");
 		if (copy_from_user(&params, optval, optlen))
 			return -EFAULT;
 
@@ -4221,9 +4221,9 @@ static int sctp_getsockopt_delayed_ack(struct sock *sk, int len,
 		if (copy_from_user(&params, optval, len))
 			return -EFAULT;
 	} else if (len == sizeof(struct sctp_assoc_value)) {
-		printk(KERN_WARNING "SCTP: Use of struct sctp_sack_info "
+		printk(KERN_WARNING "SCTP: Use of struct sctp_assoc_value "
 		       "in delayed_ack socket option deprecated\n");
-		printk(KERN_WARNING "SCTP: struct sctp_sack_info instead\n");
+		printk(KERN_WARNING "SCTP: Use struct sctp_sack_info instead\n");
 		if (copy_from_user(&params, optval, len))
 			return -EFAULT;
 	} else
-- 
1.5.3.5


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

* [PATCH net-next 2/5] sctp: Fix a typo in socket.c
@ 2008-12-20  1:47   ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp, Wei Yongjun, Vlad Yasevich

From: Wei Yongjun <yjwei@cn.fujitsu.com>

Just fix a typo in socket.c.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 net/sctp/socket.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 0738843..e432927 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2404,9 +2404,9 @@ static int sctp_setsockopt_delayed_ack(struct sock *sk,
 		if (params.sack_delay = 0 && params.sack_freq = 0)
 			return 0;
 	} else if (optlen = sizeof(struct sctp_assoc_value)) {
-		printk(KERN_WARNING "SCTP: Use of struct sctp_sack_info "
+		printk(KERN_WARNING "SCTP: Use of struct sctp_assoc_value "
 		       "in delayed_ack socket option deprecated\n");
-		printk(KERN_WARNING "SCTP: struct sctp_sack_info instead\n");
+		printk(KERN_WARNING "SCTP: Use struct sctp_sack_info instead\n");
 		if (copy_from_user(&params, optval, optlen))
 			return -EFAULT;
 
@@ -4221,9 +4221,9 @@ static int sctp_getsockopt_delayed_ack(struct sock *sk, int len,
 		if (copy_from_user(&params, optval, len))
 			return -EFAULT;
 	} else if (len = sizeof(struct sctp_assoc_value)) {
-		printk(KERN_WARNING "SCTP: Use of struct sctp_sack_info "
+		printk(KERN_WARNING "SCTP: Use of struct sctp_assoc_value "
 		       "in delayed_ack socket option deprecated\n");
-		printk(KERN_WARNING "SCTP: struct sctp_sack_info instead\n");
+		printk(KERN_WARNING "SCTP: Use struct sctp_sack_info instead\n");
 		if (copy_from_user(&params, optval, len))
 			return -EFAULT;
 	} else
-- 
1.5.3.5


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

* [PATCH net-next 3/5] sctp: Implement socket option SCTP_GET_ASSOC_NUMBER
  2008-12-20  1:47 ` Vlad Yasevich
@ 2008-12-20  1:47   ` Vlad Yasevich
  -1 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp, Wei Yongjun, Vlad Yasevich

From: Wei Yongjun <yjwei@cn.fujitsu.com>

Implement socket option SCTP_GET_ASSOC_NUMBER of the latest ietf socket
extensions API draft.

  8.2.5.  Get the Current Number of Associations (SCTP_GET_ASSOC_NUMBER)

   This option gets the current number of associations that are attached
   to a one-to-many style socket.  The option value is an uint32_t.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 include/net/sctp/user.h |    2 ++
 net/sctp/socket.c       |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index f205b10..b259fc5 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -118,6 +118,8 @@ enum sctp_optname {
 #define SCTP_PEER_AUTH_CHUNKS SCTP_PEER_AUTH_CHUNKS
 	SCTP_LOCAL_AUTH_CHUNKS,		/* Read only */
 #define SCTP_LOCAL_AUTH_CHUNKS SCTP_LOCAL_AUTH_CHUNKS
+	SCTP_GET_ASSOC_NUMBER,		/* Read only */
+#define SCTP_GET_ASSOC_NUMBER SCTP_GET_ASSOC_NUMBER
 
 
 	/* Internal Socket Options. Some of the sctp library functions are 
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index e432927..9f5fe23 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5460,6 +5460,38 @@ num:
 	return 0;
 }
 
+/*
+ * 8.2.5.  Get the Current Number of Associations (SCTP_GET_ASSOC_NUMBER)
+ * This option gets the current number of associations that are attached
+ * to a one-to-many style socket.  The option value is an uint32_t.
+ */
+static int sctp_getsockopt_assoc_number(struct sock *sk, int len,
+				    char __user *optval, int __user *optlen)
+{
+	struct sctp_sock *sp = sctp_sk(sk);
+	struct sctp_association *asoc;
+	u32 val = 0;
+
+	if (sctp_style(sk, TCP))
+		return -EOPNOTSUPP;
+
+	if (len < sizeof(u32))
+		return -EINVAL;
+
+	len = sizeof(u32);
+
+	list_for_each_entry(asoc, &(sp->ep->asocs), asocs) {
+		val++;
+	}
+
+	if (put_user(len, optlen))
+		return -EFAULT;
+	if (copy_to_user(optval, &val, len))
+		return -EFAULT;
+
+	return 0;
+}
+
 SCTP_STATIC int sctp_getsockopt(struct sock *sk, int level, int optname,
 				char __user *optval, int __user *optlen)
 {
@@ -5602,6 +5634,9 @@ SCTP_STATIC int sctp_getsockopt(struct sock *sk, int level, int optname,
 		retval = sctp_getsockopt_local_auth_chunks(sk, len, optval,
 							optlen);
 		break;
+	case SCTP_GET_ASSOC_NUMBER:
+		retval = sctp_getsockopt_assoc_number(sk, len, optval, optlen);
+		break;
 	default:
 		retval = -ENOPROTOOPT;
 		break;
-- 
1.5.3.5


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

* [PATCH net-next 3/5] sctp: Implement socket option SCTP_GET_ASSOC_NUMBER
@ 2008-12-20  1:47   ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp, Wei Yongjun, Vlad Yasevich

From: Wei Yongjun <yjwei@cn.fujitsu.com>

Implement socket option SCTP_GET_ASSOC_NUMBER of the latest ietf socket
extensions API draft.

  8.2.5.  Get the Current Number of Associations (SCTP_GET_ASSOC_NUMBER)

   This option gets the current number of associations that are attached
   to a one-to-many style socket.  The option value is an uint32_t.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 include/net/sctp/user.h |    2 ++
 net/sctp/socket.c       |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index f205b10..b259fc5 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -118,6 +118,8 @@ enum sctp_optname {
 #define SCTP_PEER_AUTH_CHUNKS SCTP_PEER_AUTH_CHUNKS
 	SCTP_LOCAL_AUTH_CHUNKS,		/* Read only */
 #define SCTP_LOCAL_AUTH_CHUNKS SCTP_LOCAL_AUTH_CHUNKS
+	SCTP_GET_ASSOC_NUMBER,		/* Read only */
+#define SCTP_GET_ASSOC_NUMBER SCTP_GET_ASSOC_NUMBER
 
 
 	/* Internal Socket Options. Some of the sctp library functions are 
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index e432927..9f5fe23 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5460,6 +5460,38 @@ num:
 	return 0;
 }
 
+/*
+ * 8.2.5.  Get the Current Number of Associations (SCTP_GET_ASSOC_NUMBER)
+ * This option gets the current number of associations that are attached
+ * to a one-to-many style socket.  The option value is an uint32_t.
+ */
+static int sctp_getsockopt_assoc_number(struct sock *sk, int len,
+				    char __user *optval, int __user *optlen)
+{
+	struct sctp_sock *sp = sctp_sk(sk);
+	struct sctp_association *asoc;
+	u32 val = 0;
+
+	if (sctp_style(sk, TCP))
+		return -EOPNOTSUPP;
+
+	if (len < sizeof(u32))
+		return -EINVAL;
+
+	len = sizeof(u32);
+
+	list_for_each_entry(asoc, &(sp->ep->asocs), asocs) {
+		val++;
+	}
+
+	if (put_user(len, optlen))
+		return -EFAULT;
+	if (copy_to_user(optval, &val, len))
+		return -EFAULT;
+
+	return 0;
+}
+
 SCTP_STATIC int sctp_getsockopt(struct sock *sk, int level, int optname,
 				char __user *optval, int __user *optlen)
 {
@@ -5602,6 +5634,9 @@ SCTP_STATIC int sctp_getsockopt(struct sock *sk, int level, int optname,
 		retval = sctp_getsockopt_local_auth_chunks(sk, len, optval,
 							optlen);
 		break;
+	case SCTP_GET_ASSOC_NUMBER:
+		retval = sctp_getsockopt_assoc_number(sk, len, optval, optlen);
+		break;
 	default:
 		retval = -ENOPROTOOPT;
 		break;
-- 
1.5.3.5


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

* [PATCH net-next 4/5] sctp: Avoid memory overflow while FWD-TSN chunk is received with bad stream ID
  2008-12-20  1:47 ` Vlad Yasevich
@ 2008-12-20  1:47   ` Vlad Yasevich
  -1 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp, Wei Yongjun, Vlad Yasevich

From: Wei Yongjun <yjwei@cn.fujitsu.com>

If FWD-TSN chunk is received with bad stream ID, the sctp will not do the
validity check, this may cause memory overflow when overwrite the TSN of
the stream ID.

The FORWARD-TSN chunk is like this:

FORWARD-TSN chunk
  Type                       = 192
  Flags                      = 0
  Length                     = 172
  NewTSN                     = 99
  Stream                     = 10000
  StreamSequence             = 0xFFFF

This patch fix this problem by discard the chunk if stream ID is not
less than MIS.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 net/sctp/sm_statefuns.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 9f2a3eb..1c4e5d6 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -3689,6 +3689,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(const struct sctp_endpoint *ep,
 {
 	struct sctp_chunk *chunk = arg;
 	struct sctp_fwdtsn_hdr *fwdtsn_hdr;
+	struct sctp_fwdtsn_skip *skip;
 	__u16 len;
 	__u32 tsn;
 
@@ -3718,6 +3719,12 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(const struct sctp_endpoint *ep,
 	if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0)
 		goto discard_noforce;
 
+	/* Silently discard the chunk if stream-id is not valid */
+	sctp_walk_fwdtsn(skip, chunk) {
+		if (ntohs(skip->stream) >= asoc->c.sinit_max_instreams)
+			goto discard_noforce;
+	}
+
 	sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn));
 	if (len > sizeof(struct sctp_fwdtsn_hdr))
 		sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN,
@@ -3749,6 +3756,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_fast(
 {
 	struct sctp_chunk *chunk = arg;
 	struct sctp_fwdtsn_hdr *fwdtsn_hdr;
+	struct sctp_fwdtsn_skip *skip;
 	__u16 len;
 	__u32 tsn;
 
@@ -3778,6 +3786,12 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_fast(
 	if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0)
 		goto gen_shutdown;
 
+	/* Silently discard the chunk if stream-id is not valid */
+	sctp_walk_fwdtsn(skip, chunk) {
+		if (ntohs(skip->stream) >= asoc->c.sinit_max_instreams)
+			goto gen_shutdown;
+	}
+
 	sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn));
 	if (len > sizeof(struct sctp_fwdtsn_hdr))
 		sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN,
-- 
1.5.3.5


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

* [PATCH net-next 4/5] sctp: Avoid memory overflow while FWD-TSN chunk is received with bad stream ID
@ 2008-12-20  1:47   ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp, Wei Yongjun, Vlad Yasevich

From: Wei Yongjun <yjwei@cn.fujitsu.com>

If FWD-TSN chunk is received with bad stream ID, the sctp will not do the
validity check, this may cause memory overflow when overwrite the TSN of
the stream ID.

The FORWARD-TSN chunk is like this:

FORWARD-TSN chunk
  Type                       = 192
  Flags                      = 0
  Length                     = 172
  NewTSN                     = 99
  Stream                     = 10000
  StreamSequence             = 0xFFFF

This patch fix this problem by discard the chunk if stream ID is not
less than MIS.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 net/sctp/sm_statefuns.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 9f2a3eb..1c4e5d6 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -3689,6 +3689,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(const struct sctp_endpoint *ep,
 {
 	struct sctp_chunk *chunk = arg;
 	struct sctp_fwdtsn_hdr *fwdtsn_hdr;
+	struct sctp_fwdtsn_skip *skip;
 	__u16 len;
 	__u32 tsn;
 
@@ -3718,6 +3719,12 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(const struct sctp_endpoint *ep,
 	if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0)
 		goto discard_noforce;
 
+	/* Silently discard the chunk if stream-id is not valid */
+	sctp_walk_fwdtsn(skip, chunk) {
+		if (ntohs(skip->stream) >= asoc->c.sinit_max_instreams)
+			goto discard_noforce;
+	}
+
 	sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn));
 	if (len > sizeof(struct sctp_fwdtsn_hdr))
 		sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN,
@@ -3749,6 +3756,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_fast(
 {
 	struct sctp_chunk *chunk = arg;
 	struct sctp_fwdtsn_hdr *fwdtsn_hdr;
+	struct sctp_fwdtsn_skip *skip;
 	__u16 len;
 	__u32 tsn;
 
@@ -3778,6 +3786,12 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_fast(
 	if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0)
 		goto gen_shutdown;
 
+	/* Silently discard the chunk if stream-id is not valid */
+	sctp_walk_fwdtsn(skip, chunk) {
+		if (ntohs(skip->stream) >= asoc->c.sinit_max_instreams)
+			goto gen_shutdown;
+	}
+
 	sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn));
 	if (len > sizeof(struct sctp_fwdtsn_hdr))
 		sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN,
-- 
1.5.3.5


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

* [PATCH net-next 5/5] sctp: Add validity check for SCTP_PARTIAL_DELIVERY_POINT socket option
  2008-12-20  1:47 ` Vlad Yasevich
@ 2008-12-20  1:47   ` Vlad Yasevich
  -1 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp, Wei Yongjun, Vlad Yasevich

From: Wei Yongjun <yjwei@cn.fujitsu.com>

The latest ietf socket extensions API draft said:

  8.1.21.  Set or Get the SCTP Partial Delivery Point

    Note also that the call will fail if the user attempts to set
    this value larger than the socket receive buffer size.

This patch add this validity check for SCTP_PARTIAL_DELIVERY_POINT
socket option.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 net/sctp/socket.c |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 9f5fe23..b14a8f3 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -3010,14 +3010,21 @@ static int sctp_setsockopt_fragment_interleave(struct sock *sk,
 }
 
 /*
- * 7.1.25.  Set or Get the sctp partial delivery point
+ * 8.1.21.  Set or Get the SCTP Partial Delivery Point
  *       (SCTP_PARTIAL_DELIVERY_POINT)
+ *
  * This option will set or get the SCTP partial delivery point.  This
  * point is the size of a message where the partial delivery API will be
  * invoked to help free up rwnd space for the peer.  Setting this to a
- * lower value will cause partial delivery's to happen more often.  The
+ * lower value will cause partial deliveries to happen more often.  The
  * calls argument is an integer that sets or gets the partial delivery
- * point.
+ * point.  Note also that the call will fail if the user attempts to set
+ * this value larger than the socket receive buffer size.
+ *
+ * Note that any single message having a length smaller than or equal to
+ * the SCTP partial delivery point will be delivered in one single read
+ * call as long as the user provided buffer is large enough to hold the
+ * message.
  */
 static int sctp_setsockopt_partial_delivery_point(struct sock *sk,
 						  char __user *optval,
@@ -3030,6 +3037,12 @@ static int sctp_setsockopt_partial_delivery_point(struct sock *sk,
 	if (get_user(val, (int __user *)optval))
 		return -EFAULT;
 
+	/* Note: We double the receive buffer from what the user sets
+	 * it to be, also initial rwnd is based on rcvbuf/2.
+	 */
+	if (val > (sk->sk_rcvbuf >> 1))
+		return -EINVAL;
+
 	sctp_sk(sk)->pd_point = val;
 
 	return 0; /* is this the right error code? */
-- 
1.5.3.5


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

* [PATCH net-next 5/5] sctp: Add validity check for SCTP_PARTIAL_DELIVERY_POINT socket option
@ 2008-12-20  1:47   ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-20  1:47 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp, Wei Yongjun, Vlad Yasevich

From: Wei Yongjun <yjwei@cn.fujitsu.com>

The latest ietf socket extensions API draft said:

  8.1.21.  Set or Get the SCTP Partial Delivery Point

    Note also that the call will fail if the user attempts to set
    this value larger than the socket receive buffer size.

This patch add this validity check for SCTP_PARTIAL_DELIVERY_POINT
socket option.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 net/sctp/socket.c |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 9f5fe23..b14a8f3 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -3010,14 +3010,21 @@ static int sctp_setsockopt_fragment_interleave(struct sock *sk,
 }
 
 /*
- * 7.1.25.  Set or Get the sctp partial delivery point
+ * 8.1.21.  Set or Get the SCTP Partial Delivery Point
  *       (SCTP_PARTIAL_DELIVERY_POINT)
+ *
  * This option will set or get the SCTP partial delivery point.  This
  * point is the size of a message where the partial delivery API will be
  * invoked to help free up rwnd space for the peer.  Setting this to a
- * lower value will cause partial delivery's to happen more often.  The
+ * lower value will cause partial deliveries to happen more often.  The
  * calls argument is an integer that sets or gets the partial delivery
- * point.
+ * point.  Note also that the call will fail if the user attempts to set
+ * this value larger than the socket receive buffer size.
+ *
+ * Note that any single message having a length smaller than or equal to
+ * the SCTP partial delivery point will be delivered in one single read
+ * call as long as the user provided buffer is large enough to hold the
+ * message.
  */
 static int sctp_setsockopt_partial_delivery_point(struct sock *sk,
 						  char __user *optval,
@@ -3030,6 +3037,12 @@ static int sctp_setsockopt_partial_delivery_point(struct sock *sk,
 	if (get_user(val, (int __user *)optval))
 		return -EFAULT;
 
+	/* Note: We double the receive buffer from what the user sets
+	 * it to be, also initial rwnd is based on rcvbuf/2.
+	 */
+	if (val > (sk->sk_rcvbuf >> 1))
+		return -EINVAL;
+
 	sctp_sk(sk)->pd_point = val;
 
 	return 0; /* is this the right error code? */
-- 
1.5.3.5


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

* Re: [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option into ietf API extension compliance
  2008-12-20  1:47   ` Vlad Yasevich
@ 2008-12-26  0:56     ` David Miller
  -1 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2008-12-26  0:56 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp, yjwei

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri, 19 Dec 2008 20:47:48 -0500

> From: Wei Yongjun <yjwei@cn.fujitsu.com>
> 
> Brings maxseg socket option set/get into line with the latest ietf socket
> extensions API draft, while maintaining backwards compatibility.
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>

Applied.  But I really dislike this scheme used by the compat code.
Half-way initializing a structure and then depending upon the logic in
the rest of the function to make sure the rest of the struct (the
uninitialized part) is never accessed?

Give me a break, programming, auditing, and bug fixing is hard enough
as it is without sloppy code like this.

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

* Re: [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option
@ 2008-12-26  0:56     ` David Miller
  0 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2008-12-26  0:56 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp, yjwei

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri, 19 Dec 2008 20:47:48 -0500

> From: Wei Yongjun <yjwei@cn.fujitsu.com>
> 
> Brings maxseg socket option set/get into line with the latest ietf socket
> extensions API draft, while maintaining backwards compatibility.
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>

Applied.  But I really dislike this scheme used by the compat code.
Half-way initializing a structure and then depending upon the logic in
the rest of the function to make sure the rest of the struct (the
uninitialized part) is never accessed?

Give me a break, programming, auditing, and bug fixing is hard enough
as it is without sloppy code like this.

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

* Re: [PATCH net-next 2/5] sctp: Fix a typo in socket.c
  2008-12-20  1:47   ` Vlad Yasevich
@ 2008-12-26  0:57     ` David Miller
  -1 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2008-12-26  0:57 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp, yjwei

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri, 19 Dec 2008 20:47:49 -0500

> From: Wei Yongjun <yjwei@cn.fujitsu.com>
> 
> Just fix a typo in socket.c.
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>

Applied.

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

* Re: [PATCH net-next 2/5] sctp: Fix a typo in socket.c
@ 2008-12-26  0:57     ` David Miller
  0 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2008-12-26  0:57 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp, yjwei

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri, 19 Dec 2008 20:47:49 -0500

> From: Wei Yongjun <yjwei@cn.fujitsu.com>
> 
> Just fix a typo in socket.c.
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>

Applied.

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

* Re: [PATCH net-next 3/5] sctp: Implement socket option SCTP_GET_ASSOC_NUMBER
  2008-12-20  1:47   ` Vlad Yasevich
@ 2008-12-26  0:57     ` David Miller
  -1 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2008-12-26  0:57 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp, yjwei

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri, 19 Dec 2008 20:47:50 -0500

> From: Wei Yongjun <yjwei@cn.fujitsu.com>
> 
> Implement socket option SCTP_GET_ASSOC_NUMBER of the latest ietf socket
> extensions API draft.
> 
>   8.2.5.  Get the Current Number of Associations (SCTP_GET_ASSOC_NUMBER)
> 
>    This option gets the current number of associations that are attached
>    to a one-to-many style socket.  The option value is an uint32_t.
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>

Applied.

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

* Re: [PATCH net-next 3/5] sctp: Implement socket option
@ 2008-12-26  0:57     ` David Miller
  0 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2008-12-26  0:57 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp, yjwei

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri, 19 Dec 2008 20:47:50 -0500

> From: Wei Yongjun <yjwei@cn.fujitsu.com>
> 
> Implement socket option SCTP_GET_ASSOC_NUMBER of the latest ietf socket
> extensions API draft.
> 
>   8.2.5.  Get the Current Number of Associations (SCTP_GET_ASSOC_NUMBER)
> 
>    This option gets the current number of associations that are attached
>    to a one-to-many style socket.  The option value is an uint32_t.
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>

Applied.

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

* Re: [PATCH net-next 4/5] sctp: Avoid memory overflow while FWD-TSN chunk is received with bad stream ID
  2008-12-20  1:47   ` Vlad Yasevich
@ 2008-12-26  0:58     ` David Miller
  -1 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2008-12-26  0:58 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp, yjwei

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri, 19 Dec 2008 20:47:51 -0500

> If FWD-TSN chunk is received with bad stream ID, the sctp will not do the
> validity check, this may cause memory overflow when overwrite the TSN of
> the stream ID.
> 
> The FORWARD-TSN chunk is like this:
> 
> FORWARD-TSN chunk
>   Type                       = 192
>   Flags                      = 0
>   Length                     = 172
>   NewTSN                     = 99
>   Stream                     = 10000
>   StreamSequence             = 0xFFFF
> 
> This patch fix this problem by discard the chunk if stream ID is not
> less than MIS.
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>

Applied and queued up for -stable.

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

* Re: [PATCH net-next 4/5] sctp: Avoid memory overflow while FWD-TSN
@ 2008-12-26  0:58     ` David Miller
  0 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2008-12-26  0:58 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp, yjwei

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri, 19 Dec 2008 20:47:51 -0500

> If FWD-TSN chunk is received with bad stream ID, the sctp will not do the
> validity check, this may cause memory overflow when overwrite the TSN of
> the stream ID.
> 
> The FORWARD-TSN chunk is like this:
> 
> FORWARD-TSN chunk
>   Type                       = 192
>   Flags                      = 0
>   Length                     = 172
>   NewTSN                     = 99
>   Stream                     = 10000
>   StreamSequence             = 0xFFFF
> 
> This patch fix this problem by discard the chunk if stream ID is not
> less than MIS.
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>

Applied and queued up for -stable.

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

* Re: [PATCH net-next 5/5] sctp: Add validity check for SCTP_PARTIAL_DELIVERY_POINT socket option
  2008-12-20  1:47   ` Vlad Yasevich
@ 2008-12-26  0:59     ` David Miller
  -1 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2008-12-26  0:59 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp, yjwei

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri, 19 Dec 2008 20:47:52 -0500

> The latest ietf socket extensions API draft said:
> 
>   8.1.21.  Set or Get the SCTP Partial Delivery Point
> 
>     Note also that the call will fail if the user attempts to set
>     this value larger than the socket receive buffer size.
> 
> This patch add this validity check for SCTP_PARTIAL_DELIVERY_POINT
> socket option.
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>

Also applied, thanks.

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

* Re: [PATCH net-next 5/5] sctp: Add validity check for
@ 2008-12-26  0:59     ` David Miller
  0 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2008-12-26  0:59 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp, yjwei

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri, 19 Dec 2008 20:47:52 -0500

> The latest ietf socket extensions API draft said:
> 
>   8.1.21.  Set or Get the SCTP Partial Delivery Point
> 
>     Note also that the call will fail if the user attempts to set
>     this value larger than the socket receive buffer size.
> 
> This patch add this validity check for SCTP_PARTIAL_DELIVERY_POINT
> socket option.
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>

Also applied, thanks.

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

* Re: [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option into ietf API extension compliance
  2008-12-26  0:56     ` [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option David Miller
@ 2008-12-26 17:04       ` Vlad Yasevich
  -1 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-26 17:04 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-sctp, yjwei

David Miller wrote:
> From: Vlad Yasevich <vladislav.yasevich@hp.com>
> Date: Fri, 19 Dec 2008 20:47:48 -0500
> 
>> From: Wei Yongjun <yjwei@cn.fujitsu.com>
>>
>> Brings maxseg socket option set/get into line with the latest ietf socket
>> extensions API draft, while maintaining backwards compatibility.
>>
>> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
>> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
> 
> Applied.  But I really dislike this scheme used by the compat code.
> Half-way initializing a structure and then depending upon the logic in
> the rest of the function to make sure the rest of the struct (the
> uninitialized part) is never accessed?
> 
> Give me a break, programming, auditing, and bug fixing is hard enough
> as it is without sloppy code like this.

Yes, it sucks but the since the draft keeps breaking the ABI between revisions,
it leaves us a between a rock (no support) and a hard place (crappy code).

-vlad

> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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

* Re: [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option into
@ 2008-12-26 17:04       ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2008-12-26 17:04 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-sctp, yjwei

David Miller wrote:
> From: Vlad Yasevich <vladislav.yasevich@hp.com>
> Date: Fri, 19 Dec 2008 20:47:48 -0500
> 
>> From: Wei Yongjun <yjwei@cn.fujitsu.com>
>>
>> Brings maxseg socket option set/get into line with the latest ietf socket
>> extensions API draft, while maintaining backwards compatibility.
>>
>> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
>> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
> 
> Applied.  But I really dislike this scheme used by the compat code.
> Half-way initializing a structure and then depending upon the logic in
> the rest of the function to make sure the rest of the struct (the
> uninitialized part) is never accessed?
> 
> Give me a break, programming, auditing, and bug fixing is hard enough
> as it is without sloppy code like this.

Yes, it sucks but the since the draft keeps breaking the ABI between revisions,
it leaves us a between a rock (no support) and a hard place (crappy code).

-vlad

> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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

* Re: [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option into ietf API extension compliance
  2008-12-26 17:04       ` [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option into Vlad Yasevich
@ 2008-12-26 19:15         ` David Miller
  -1 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2008-12-26 19:15 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp, yjwei

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri, 26 Dec 2008 12:04:14 -0500

> David Miller wrote:
> > From: Vlad Yasevich <vladislav.yasevich@hp.com>
> > Date: Fri, 19 Dec 2008 20:47:48 -0500
> > 
> >> From: Wei Yongjun <yjwei@cn.fujitsu.com>
> >>
> >> Brings maxseg socket option set/get into line with the latest ietf socket
> >> extensions API draft, while maintaining backwards compatibility.
> >>
> >> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> >> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
> > 
> > Applied.  But I really dislike this scheme used by the compat code.
> > Half-way initializing a structure and then depending upon the logic in
> > the rest of the function to make sure the rest of the struct (the
> > uninitialized part) is never accessed?
> > 
> > Give me a break, programming, auditing, and bug fixing is hard enough
> > as it is without sloppy code like this.
> 
> Yes, it sucks but the since the draft keeps breaking the ABI between revisions,
> it leaves us a between a rock (no support) and a hard place (crappy code).

In this specific case we could have simply memset() the on-stack
structure to zero and there would be no confusion about whether the
object is initialized in some way in all code paths.

Or, in the main initial conditional we could explicitly assign both
members of this structure in both branches.

This is not about the compatibility issues, it's about how this code
was written.



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

* Re: [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option
@ 2008-12-26 19:15         ` David Miller
  0 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2008-12-26 19:15 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, linux-sctp, yjwei

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri, 26 Dec 2008 12:04:14 -0500

> David Miller wrote:
> > From: Vlad Yasevich <vladislav.yasevich@hp.com>
> > Date: Fri, 19 Dec 2008 20:47:48 -0500
> > 
> >> From: Wei Yongjun <yjwei@cn.fujitsu.com>
> >>
> >> Brings maxseg socket option set/get into line with the latest ietf socket
> >> extensions API draft, while maintaining backwards compatibility.
> >>
> >> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> >> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
> > 
> > Applied.  But I really dislike this scheme used by the compat code.
> > Half-way initializing a structure and then depending upon the logic in
> > the rest of the function to make sure the rest of the struct (the
> > uninitialized part) is never accessed?
> > 
> > Give me a break, programming, auditing, and bug fixing is hard enough
> > as it is without sloppy code like this.
> 
> Yes, it sucks but the since the draft keeps breaking the ABI between revisions,
> it leaves us a between a rock (no support) and a hard place (crappy code).

In this specific case we could have simply memset() the on-stack
structure to zero and there would be no confusion about whether the
object is initialized in some way in all code paths.

Or, in the main initial conditional we could explicitly assign both
members of this structure in both branches.

This is not about the compatibility issues, it's about how this code
was written.



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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-10  9:37                           ` Daniel Borkmann
@ 2014-07-10 19:04                             ` Vlad Yasevich
  -1 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2014-07-10 19:04 UTC (permalink / raw)
  To: Daniel Borkmann, David Laight
  Cc: 'Neil Horman', davem, geirola, netdev, linux-sctp

On 07/10/2014 05:37 AM, Daniel Borkmann wrote:
> On 07/10/2014 11:02 AM, David Laight wrote:
>> From: Neil Horman
>> ...
>>>> No there is not direct overlap between the two.  However, as Michael pointed out,
>>>> there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
>>>> warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
>>>> Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.
>>>>
>>> Ok, so we should still consider deprecation warnings then.  Daniel, what about
>>> ratelimited warnings with pids included then?
>>
>> Can you defer any deprecation warnings for a few kernel versions?
>> This gives time for applications to be recoded.
> 
> I am fine either way, adding the warning a bit later seems fine, too.
> 
> Right now, even in-kernel users like dlm would hit it if we include
> it immediately.
> 
> Otherwise, I'll just add something like the below ...
> 
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index d95a50c..6a0e5a4 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -2205,8 +2205,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user
> *optval,
>      if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen))
>          return -EFAULT;
> 
> -    /*
> -     * At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
> +    if (sctp_sk(sk)->subscribe.sctp_data_io_event)
> +        pr_warn_ratelimited(DEPRECATED "%s (pid %d) "
> +                    "Requested SCTP_SNDRCVINFO event.\n"
> +                    "Use SCTP_RCVINFO through SCTP_RECVRCVINFO option instead.\n",
> +                    current->comm, task_pid_nr(current));
> +
> +    /* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
>       * if there is no data to be sent or retransmit, the stack will
>       * immediately send up this notification.
>       */
> 

This is OK for step 1.  Once we implement SCTP_EVENT, we can cover the rest of the events.

-vlad

>> Including argv[0] (even just the exec-time value) is much more use than the pid.
>>
>> Actually this is 'right PITA' for an application.
>> A program binary that needs to work with old and new kernels will have to
>> try the new option, and if it fails fall back to the old one, and then
>> conditionally create/inspect the cmsg data.
>> I can't actually imagine anyone bothering!
>>
>> Our sctp code is actually in a kernel module, so we can look at the kernel
>> version when (part of) the driver is compiled on the target system.
>>
>>     David
>>
>>
>>

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-10 19:04                             ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2014-07-10 19:04 UTC (permalink / raw)
  To: Daniel Borkmann, David Laight
  Cc: 'Neil Horman', davem, geirola, netdev, linux-sctp

On 07/10/2014 05:37 AM, Daniel Borkmann wrote:
> On 07/10/2014 11:02 AM, David Laight wrote:
>> From: Neil Horman
>> ...
>>>> No there is not direct overlap between the two.  However, as Michael pointed out,
>>>> there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
>>>> warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
>>>> Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.
>>>>
>>> Ok, so we should still consider deprecation warnings then.  Daniel, what about
>>> ratelimited warnings with pids included then?
>>
>> Can you defer any deprecation warnings for a few kernel versions?
>> This gives time for applications to be recoded.
> 
> I am fine either way, adding the warning a bit later seems fine, too.
> 
> Right now, even in-kernel users like dlm would hit it if we include
> it immediately.
> 
> Otherwise, I'll just add something like the below ...
> 
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index d95a50c..6a0e5a4 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -2205,8 +2205,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user
> *optval,
>      if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen))
>          return -EFAULT;
> 
> -    /*
> -     * At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
> +    if (sctp_sk(sk)->subscribe.sctp_data_io_event)
> +        pr_warn_ratelimited(DEPRECATED "%s (pid %d) "
> +                    "Requested SCTP_SNDRCVINFO event.\n"
> +                    "Use SCTP_RCVINFO through SCTP_RECVRCVINFO option instead.\n",
> +                    current->comm, task_pid_nr(current));
> +
> +    /* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
>       * if there is no data to be sent or retransmit, the stack will
>       * immediately send up this notification.
>       */
> 

This is OK for step 1.  Once we implement SCTP_EVENT, we can cover the rest of the events.

-vlad

>> Including argv[0] (even just the exec-time value) is much more use than the pid.
>>
>> Actually this is 'right PITA' for an application.
>> A program binary that needs to work with old and new kernels will have to
>> try the new option, and if it fails fall back to the old one, and then
>> conditionally create/inspect the cmsg data.
>> I can't actually imagine anyone bothering!
>>
>> Our sctp code is actually in a kernel module, so we can look at the kernel
>> version when (part of) the driver is compiled on the target system.
>>
>>     David
>>
>>
>>


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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-10  9:37                           ` Daniel Borkmann
@ 2014-07-10 10:57                             ` Neil Horman
  -1 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-10 10:57 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: David Laight, Vlad Yasevich, davem, geirola, netdev, linux-sctp

On Thu, Jul 10, 2014 at 11:37:19AM +0200, Daniel Borkmann wrote:
> On 07/10/2014 11:02 AM, David Laight wrote:
> >From: Neil Horman
> >...
> >>>No there is not direct overlap between the two.  However, as Michael pointed out,
> >>>there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
> >>>warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
> >>>Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.
> >>>
> >>Ok, so we should still consider deprecation warnings then.  Daniel, what about
> >>ratelimited warnings with pids included then?
> >
> >Can you defer any deprecation warnings for a few kernel versions?
> >This gives time for applications to be recoded.
> 
> I am fine either way, adding the warning a bit later seems fine, too.
> 
> Right now, even in-kernel users like dlm would hit it if we include
> it immediately.
> 
> Otherwise, I'll just add something like the below ...
> 
This works for me, I don't see any reason to wait, and its a pretty easy
changeover for most applications to make.

Thanks David.
Neil

> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index d95a50c..6a0e5a4 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -2205,8 +2205,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
>  	if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen))
>  		return -EFAULT;
> 
> -	/*
> -	 * At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
> +	if (sctp_sk(sk)->subscribe.sctp_data_io_event)
> +		pr_warn_ratelimited(DEPRECATED "%s (pid %d) "
> +				    "Requested SCTP_SNDRCVINFO event.\n"
> +				    "Use SCTP_RCVINFO through SCTP_RECVRCVINFO option instead.\n",
> +				    current->comm, task_pid_nr(current));
> +
> +	/* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
>  	 * if there is no data to be sent or retransmit, the stack will
>  	 * immediately send up this notification.
>  	 */
> 
> >Including argv[0] (even just the exec-time value) is much more use than the pid.
> >
> >Actually this is 'right PITA' for an application.
> >A program binary that needs to work with old and new kernels will have to
> >try the new option, and if it fails fall back to the old one, and then
> >conditionally create/inspect the cmsg data.
> >I can't actually imagine anyone bothering!
> >
> >Our sctp code is actually in a kernel module, so we can look at the kernel
> >version when (part of) the driver is compiled on the target system.
> >
> >	David
> >
> >
> >
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-10 10:57                             ` Neil Horman
  0 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-10 10:57 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: David Laight, Vlad Yasevich, davem, geirola, netdev, linux-sctp

On Thu, Jul 10, 2014 at 11:37:19AM +0200, Daniel Borkmann wrote:
> On 07/10/2014 11:02 AM, David Laight wrote:
> >From: Neil Horman
> >...
> >>>No there is not direct overlap between the two.  However, as Michael pointed out,
> >>>there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
> >>>warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
> >>>Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.
> >>>
> >>Ok, so we should still consider deprecation warnings then.  Daniel, what about
> >>ratelimited warnings with pids included then?
> >
> >Can you defer any deprecation warnings for a few kernel versions?
> >This gives time for applications to be recoded.
> 
> I am fine either way, adding the warning a bit later seems fine, too.
> 
> Right now, even in-kernel users like dlm would hit it if we include
> it immediately.
> 
> Otherwise, I'll just add something like the below ...
> 
This works for me, I don't see any reason to wait, and its a pretty easy
changeover for most applications to make.

Thanks David.
Neil

> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index d95a50c..6a0e5a4 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -2205,8 +2205,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
>  	if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen))
>  		return -EFAULT;
> 
> -	/*
> -	 * At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
> +	if (sctp_sk(sk)->subscribe.sctp_data_io_event)
> +		pr_warn_ratelimited(DEPRECATED "%s (pid %d) "
> +				    "Requested SCTP_SNDRCVINFO event.\n"
> +				    "Use SCTP_RCVINFO through SCTP_RECVRCVINFO option instead.\n",
> +				    current->comm, task_pid_nr(current));
> +
> +	/* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
>  	 * if there is no data to be sent or retransmit, the stack will
>  	 * immediately send up this notification.
>  	 */
> 
> >Including argv[0] (even just the exec-time value) is much more use than the pid.
> >
> >Actually this is 'right PITA' for an application.
> >A program binary that needs to work with old and new kernels will have to
> >try the new option, and if it fails fall back to the old one, and then
> >conditionally create/inspect the cmsg data.
> >I can't actually imagine anyone bothering!
> >
> >Our sctp code is actually in a kernel module, so we can look at the kernel
> >version when (part of) the driver is compiled on the target system.
> >
> >	David
> >
> >
> >
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-10  9:02                       ` David Laight
@ 2014-07-10 10:55                           ` Neil Horman
  2014-07-10 10:55                           ` Neil Horman
  1 sibling, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-10 10:55 UTC (permalink / raw)
  To: David Laight
  Cc: Vlad Yasevich, Daniel Borkmann, davem, geirola, netdev, linux-sctp

On Thu, Jul 10, 2014 at 09:02:23AM +0000, David Laight wrote:
> From: Neil Horman
> ...
> > > No there is not direct overlap between the two.  However, as Michael pointed out,
> > > there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
> > > warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
> > > Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.
> > >
> > Ok, so we should still consider deprecation warnings then.  Daniel, what about
> > ratelimited warnings with pids included then?
> 
> Can you defer any deprecation warnings for a few kernel versions?
> This gives time for applications to be recoded.
I'm not sure I understand the reasoning here?  Why should a deprecation warning
be delayed so you can recode your application?  What about all the people who
aren't subscribed this list?  That just furhter delays their finding out about
the deprecation.

> Including argv[0] (even just the exec-time value) is much more use than the pid.
> 
Thats fine, I think deprecation warnings usually have the form "[deprecated] pid
%d(%s)..." where %s is argv[0].

> Actually this is 'right PITA' for an application.
> A program binary that needs to work with old and new kernels will have to
> try the new option, and if it fails fall back to the old one, and then
> conditionally create/inspect the cmsg data.
> I can't actually imagine anyone bothering!
> 
A deprecation warning is just that, a warning, it doesn't cause the old
method to fail, its just a heads up to the application developer that they need
to make a change sometime in the next 5 years.  If you implement the new method
in your application, you can wait for a reasonable period of time until you are
confident that you application isn't being used on older kernels, or bump the
minimal kernel version to run your app, and cut over to the new method.

> Our sctp code is actually in a kernel module, so we can look at the kernel
> version when (part of) the driver is compiled on the target system.
> 
You can do that too if you would like.
Neil

> 	David
> 
> 
> 
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-10 10:55                           ` Neil Horman
  0 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-10 10:55 UTC (permalink / raw)
  To: David Laight
  Cc: Vlad Yasevich, Daniel Borkmann, davem, geirola, netdev, linux-sctp

On Thu, Jul 10, 2014 at 09:02:23AM +0000, David Laight wrote:
> From: Neil Horman
> ...
> > > No there is not direct overlap between the two.  However, as Michael pointed out,
> > > there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
> > > warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
> > > Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.
> > >
> > Ok, so we should still consider deprecation warnings then.  Daniel, what about
> > ratelimited warnings with pids included then?
> 
> Can you defer any deprecation warnings for a few kernel versions?
> This gives time for applications to be recoded.
I'm not sure I understand the reasoning here?  Why should a deprecation warning
be delayed so you can recode your application?  What about all the people who
aren't subscribed this list?  That just furhter delays their finding out about
the deprecation.

> Including argv[0] (even just the exec-time value) is much more use than the pid.
> 
Thats fine, I think deprecation warnings usually have the form "[deprecated] pid
%d(%s)..." where %s is argv[0].

> Actually this is 'right PITA' for an application.
> A program binary that needs to work with old and new kernels will have to
> try the new option, and if it fails fall back to the old one, and then
> conditionally create/inspect the cmsg data.
> I can't actually imagine anyone bothering!
> 
A deprecation warning is just that, a warning, it doesn't cause the old
method to fail, its just a heads up to the application developer that they need
to make a change sometime in the next 5 years.  If you implement the new method
in your application, you can wait for a reasonable period of time until you are
confident that you application isn't being used on older kernels, or bump the
minimal kernel version to run your app, and cut over to the new method.

> Our sctp code is actually in a kernel module, so we can look at the kernel
> version when (part of) the driver is compiled on the target system.
> 
You can do that too if you would like.
Neil

> 	David
> 
> 
> 
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-10  9:02                       ` David Laight
@ 2014-07-10  9:37                           ` Daniel Borkmann
  2014-07-10 10:55                           ` Neil Horman
  1 sibling, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-10  9:37 UTC (permalink / raw)
  To: David Laight
  Cc: 'Neil Horman', Vlad Yasevich, davem, geirola, netdev, linux-sctp

On 07/10/2014 11:02 AM, David Laight wrote:
> From: Neil Horman
> ...
>>> No there is not direct overlap between the two.  However, as Michael pointed out,
>>> there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
>>> warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
>>> Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.
>>>
>> Ok, so we should still consider deprecation warnings then.  Daniel, what about
>> ratelimited warnings with pids included then?
>
> Can you defer any deprecation warnings for a few kernel versions?
> This gives time for applications to be recoded.

I am fine either way, adding the warning a bit later seems fine, too.

Right now, even in-kernel users like dlm would hit it if we include
it immediately.

Otherwise, I'll just add something like the below ...

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index d95a50c..6a0e5a4 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2205,8 +2205,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
  	if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen))
  		return -EFAULT;

-	/*
-	 * At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
+	if (sctp_sk(sk)->subscribe.sctp_data_io_event)
+		pr_warn_ratelimited(DEPRECATED "%s (pid %d) "
+				    "Requested SCTP_SNDRCVINFO event.\n"
+				    "Use SCTP_RCVINFO through SCTP_RECVRCVINFO option instead.\n",
+				    current->comm, task_pid_nr(current));
+
+	/* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
  	 * if there is no data to be sent or retransmit, the stack will
  	 * immediately send up this notification.
  	 */

> Including argv[0] (even just the exec-time value) is much more use than the pid.
>
> Actually this is 'right PITA' for an application.
> A program binary that needs to work with old and new kernels will have to
> try the new option, and if it fails fall back to the old one, and then
> conditionally create/inspect the cmsg data.
> I can't actually imagine anyone bothering!
>
> Our sctp code is actually in a kernel module, so we can look at the kernel
> version when (part of) the driver is compiled on the target system.
>
> 	David
>
>
>

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-10  9:37                           ` Daniel Borkmann
  0 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-10  9:37 UTC (permalink / raw)
  To: David Laight
  Cc: 'Neil Horman', Vlad Yasevich, davem, geirola, netdev, linux-sctp

On 07/10/2014 11:02 AM, David Laight wrote:
> From: Neil Horman
> ...
>>> No there is not direct overlap between the two.  However, as Michael pointed out,
>>> there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
>>> warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
>>> Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.
>>>
>> Ok, so we should still consider deprecation warnings then.  Daniel, what about
>> ratelimited warnings with pids included then?
>
> Can you defer any deprecation warnings for a few kernel versions?
> This gives time for applications to be recoded.

I am fine either way, adding the warning a bit later seems fine, too.

Right now, even in-kernel users like dlm would hit it if we include
it immediately.

Otherwise, I'll just add something like the below ...

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index d95a50c..6a0e5a4 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2205,8 +2205,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
  	if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen))
  		return -EFAULT;

-	/*
-	 * At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
+	if (sctp_sk(sk)->subscribe.sctp_data_io_event)
+		pr_warn_ratelimited(DEPRECATED "%s (pid %d) "
+				    "Requested SCTP_SNDRCVINFO event.\n"
+				    "Use SCTP_RCVINFO through SCTP_RECVRCVINFO option instead.\n",
+				    current->comm, task_pid_nr(current));
+
+	/* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
  	 * if there is no data to be sent or retransmit, the stack will
  	 * immediately send up this notification.
  	 */

> Including argv[0] (even just the exec-time value) is much more use than the pid.
>
> Actually this is 'right PITA' for an application.
> A program binary that needs to work with old and new kernels will have to
> try the new option, and if it fails fall back to the old one, and then
> conditionally create/inspect the cmsg data.
> I can't actually imagine anyone bothering!
>
> Our sctp code is actually in a kernel module, so we can look at the kernel
> version when (part of) the driver is compiled on the target system.
>
> 	David
>
>
>

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

* RE: [PATCH net-next 0/5] SCTP updates
  2014-07-09 18:35                       ` Neil Horman
  (?)
@ 2014-07-10  9:02                       ` David Laight
  2014-07-10  9:37                           ` Daniel Borkmann
  2014-07-10 10:55                           ` Neil Horman
  -1 siblings, 2 replies; 79+ messages in thread
From: David Laight @ 2014-07-10  9:02 UTC (permalink / raw)
  To: 'Neil Horman', Vlad Yasevich
  Cc: Daniel Borkmann, davem, geirola, netdev, linux-sctp

From: Neil Horman
...
> > No there is not direct overlap between the two.  However, as Michael pointed out,
> > there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
> > warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
> > Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.
> >
> Ok, so we should still consider deprecation warnings then.  Daniel, what about
> ratelimited warnings with pids included then?

Can you defer any deprecation warnings for a few kernel versions?
This gives time for applications to be recoded.
Including argv[0] (even just the exec-time value) is much more use than the pid.

Actually this is 'right PITA' for an application.
A program binary that needs to work with old and new kernels will have to
try the new option, and if it fails fall back to the old one, and then
conditionally create/inspect the cmsg data.
I can't actually imagine anyone bothering!

Our sctp code is actually in a kernel module, so we can look at the kernel
version when (part of) the driver is compiled on the target system.

	David

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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-09 16:32                     ` Vlad Yasevich
@ 2014-07-09 18:35                       ` Neil Horman
  -1 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-09 18:35 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: Daniel Borkmann, davem, geirola, netdev, linux-sctp

On Wed, Jul 09, 2014 at 12:32:55PM -0400, Vlad Yasevich wrote:
> On 07/09/2014 11:44 AM, Neil Horman wrote:
> > On Wed, Jul 09, 2014 at 11:36:07AM -0400, Vlad Yasevich wrote:
> >> On 07/09/2014 11:13 AM, Neil Horman wrote:
> >>> On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
> >>>> On 07/09/2014 12:49 PM, Neil Horman wrote:
> >>>>> On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
> >>>>>> On 07/08/2014 04:41 PM, Neil Horman wrote:
> >>>>>>> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
> >>>>>>>> On 07/08/2014 01:14 PM, Neil Horman wrote:
> >>>>>>>> ...
> >>>>>>>>> since you're adding cmsg's from rfc6458, do you also want to add some
> >>>>>>>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> >>>>>>>>> schedule its eventual removal?
> >>>>>>>>
> >>>>>>>> Sure, we can do that. Do you want me to include it into the set?
> >>>>>>>
> >>>>>>> If you're plan is to implement 6458, then yes, I think that would be good.
> >>>>>>
> >>>>>> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
> >>>>>> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
> >>>>>> only, which is fine. What you're suggesting is to place similar ratelimited
> >>>>>> warnings (due to different possible pids on the machine) into the 'fastpath'
> >>>>>> where we get and set cmsg message headers.
> >>>>>>
> >>>>>> While that may be fine for {set,get}sockopt(2) that's called once or very few
> >>>>>> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
> >>>>>> to unnecessary spamming the klog since up to now this is the only way our
> >>>>>> users can set or receive this info. I'm not sure we want to annoy users like
> >>>>>> that ...
> >>>>>>
> >>>>> Then we wrap it in a ONCE macro so that it only triggers on the first use
> >>>>> instance.
> >>>>
> >>>> I'm not convinced about this so far. The whole point is that we also provide the
> >>>> pid just as we currently do, so that we give the user a chance to possibly pin
> >>>> point the process that needs code change to not use the deprecated API anymore.
> >>>>
> >>>>>> In how many years do you plan a removal ... I think we're stuck with uapi
> >>>>>> basically forever as we don't want to break old binaries, no? ;/
> >>>>>>
> >>>>> I thought we could remove things on a schedule if we followed the deprecation
> >>>>> process, but that may just be for sysfs.  Regardless, it would still be nice to
> >>>>> inform people they are using an older api.
> >>>>
> >>>> I think we rather might be stuck with also the deprecated stuff forever, just
> >>>> as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
> >>>> remove anything, there's actually also no point to spam the log about it, if
> >>>> everyone can/should read it from the RFC anyway.
> >>>>
> >>> So this begs the question as to why we have deprecation warnings to begin with.
> >>> At what point do we draw the line where we can change some aspect of the user
> >>> api.  I agree if the answer is never, then yeah we're stuck, but then, why
> >>> bother announcing deprecation warnings at all?
> >>
> >> I think we can deprecate user API after a significantly long period of time
> >> (like 5 or 6 years).  That's why we also have a deprecation schedule that can
> >> be updated and hopefully that's something people pay attention to.
> >>
> >> The problem here is deprecation of ancillary data and that's is a lot tougher
> >> then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
> >> I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
> >> enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
> >> spec.  Ancillary data should not have been enabled using even notification api,
> >> as it is not an event, but we now have to live with it.
> >>
> > Ugh I didn't even consider cmsg type overlap.  Thats probably it then, we can't
> > deprecate it.  Though that does call the question up as to how to differentiate
> > expectations of the data format for each cmsg, if they use the same type.  Does
> > the SCTP_RCVINFO data struct overlay the SNDRCVINFO struct exactly?  (sorry I've
> > not checked myself yet).
> 
> No there is not direct overlap between the two.  However, as Michael pointed out,
> there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
> warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
> Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.
> 
Ok, so we should still consider deprecation warnings then.  Daniel, what about
ratelimited warnings with pids included then?
Neil

> -vlad
> 
> > 
> > Neil
> > 
> >> -vlad
> >>
> >>>
> >>> Neil
> >>>
> >>> --
> >>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> >>> the body of a message to majordomo@vger.kernel.org
> >>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>>
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>
> 
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 18:35                       ` Neil Horman
  0 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-09 18:35 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: Daniel Borkmann, davem, geirola, netdev, linux-sctp

On Wed, Jul 09, 2014 at 12:32:55PM -0400, Vlad Yasevich wrote:
> On 07/09/2014 11:44 AM, Neil Horman wrote:
> > On Wed, Jul 09, 2014 at 11:36:07AM -0400, Vlad Yasevich wrote:
> >> On 07/09/2014 11:13 AM, Neil Horman wrote:
> >>> On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
> >>>> On 07/09/2014 12:49 PM, Neil Horman wrote:
> >>>>> On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
> >>>>>> On 07/08/2014 04:41 PM, Neil Horman wrote:
> >>>>>>> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
> >>>>>>>> On 07/08/2014 01:14 PM, Neil Horman wrote:
> >>>>>>>> ...
> >>>>>>>>> since you're adding cmsg's from rfc6458, do you also want to add some
> >>>>>>>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> >>>>>>>>> schedule its eventual removal?
> >>>>>>>>
> >>>>>>>> Sure, we can do that. Do you want me to include it into the set?
> >>>>>>>
> >>>>>>> If you're plan is to implement 6458, then yes, I think that would be good.
> >>>>>>
> >>>>>> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
> >>>>>> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
> >>>>>> only, which is fine. What you're suggesting is to place similar ratelimited
> >>>>>> warnings (due to different possible pids on the machine) into the 'fastpath'
> >>>>>> where we get and set cmsg message headers.
> >>>>>>
> >>>>>> While that may be fine for {set,get}sockopt(2) that's called once or very few
> >>>>>> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
> >>>>>> to unnecessary spamming the klog since up to now this is the only way our
> >>>>>> users can set or receive this info. I'm not sure we want to annoy users like
> >>>>>> that ...
> >>>>>>
> >>>>> Then we wrap it in a ONCE macro so that it only triggers on the first use
> >>>>> instance.
> >>>>
> >>>> I'm not convinced about this so far. The whole point is that we also provide the
> >>>> pid just as we currently do, so that we give the user a chance to possibly pin
> >>>> point the process that needs code change to not use the deprecated API anymore.
> >>>>
> >>>>>> In how many years do you plan a removal ... I think we're stuck with uapi
> >>>>>> basically forever as we don't want to break old binaries, no? ;/
> >>>>>>
> >>>>> I thought we could remove things on a schedule if we followed the deprecation
> >>>>> process, but that may just be for sysfs.  Regardless, it would still be nice to
> >>>>> inform people they are using an older api.
> >>>>
> >>>> I think we rather might be stuck with also the deprecated stuff forever, just
> >>>> as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
> >>>> remove anything, there's actually also no point to spam the log about it, if
> >>>> everyone can/should read it from the RFC anyway.
> >>>>
> >>> So this begs the question as to why we have deprecation warnings to begin with.
> >>> At what point do we draw the line where we can change some aspect of the user
> >>> api.  I agree if the answer is never, then yeah we're stuck, but then, why
> >>> bother announcing deprecation warnings at all?
> >>
> >> I think we can deprecate user API after a significantly long period of time
> >> (like 5 or 6 years).  That's why we also have a deprecation schedule that can
> >> be updated and hopefully that's something people pay attention to.
> >>
> >> The problem here is deprecation of ancillary data and that's is a lot tougher
> >> then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
> >> I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
> >> enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
> >> spec.  Ancillary data should not have been enabled using even notification api,
> >> as it is not an event, but we now have to live with it.
> >>
> > Ugh I didn't even consider cmsg type overlap.  Thats probably it then, we can't
> > deprecate it.  Though that does call the question up as to how to differentiate
> > expectations of the data format for each cmsg, if they use the same type.  Does
> > the SCTP_RCVINFO data struct overlay the SNDRCVINFO struct exactly?  (sorry I've
> > not checked myself yet).
> 
> No there is not direct overlap between the two.  However, as Michael pointed out,
> there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
> warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
> Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.
> 
Ok, so we should still consider deprecation warnings then.  Daniel, what about
ratelimited warnings with pids included then?
Neil

> -vlad
> 
> > 
> > Neil
> > 
> >> -vlad
> >>
> >>>
> >>> Neil
> >>>
> >>> --
> >>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> >>> the body of a message to majordomo@vger.kernel.org
> >>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>>
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>
> 
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-09 15:44                   ` Neil Horman
@ 2014-07-09 16:32                     ` Vlad Yasevich
  -1 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2014-07-09 16:32 UTC (permalink / raw)
  To: Neil Horman; +Cc: Daniel Borkmann, davem, geirola, netdev, linux-sctp

On 07/09/2014 11:44 AM, Neil Horman wrote:
> On Wed, Jul 09, 2014 at 11:36:07AM -0400, Vlad Yasevich wrote:
>> On 07/09/2014 11:13 AM, Neil Horman wrote:
>>> On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
>>>> On 07/09/2014 12:49 PM, Neil Horman wrote:
>>>>> On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
>>>>>> On 07/08/2014 04:41 PM, Neil Horman wrote:
>>>>>>> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
>>>>>>>> On 07/08/2014 01:14 PM, Neil Horman wrote:
>>>>>>>> ...
>>>>>>>>> since you're adding cmsg's from rfc6458, do you also want to add some
>>>>>>>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
>>>>>>>>> schedule its eventual removal?
>>>>>>>>
>>>>>>>> Sure, we can do that. Do you want me to include it into the set?
>>>>>>>
>>>>>>> If you're plan is to implement 6458, then yes, I think that would be good.
>>>>>>
>>>>>> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
>>>>>> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
>>>>>> only, which is fine. What you're suggesting is to place similar ratelimited
>>>>>> warnings (due to different possible pids on the machine) into the 'fastpath'
>>>>>> where we get and set cmsg message headers.
>>>>>>
>>>>>> While that may be fine for {set,get}sockopt(2) that's called once or very few
>>>>>> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
>>>>>> to unnecessary spamming the klog since up to now this is the only way our
>>>>>> users can set or receive this info. I'm not sure we want to annoy users like
>>>>>> that ...
>>>>>>
>>>>> Then we wrap it in a ONCE macro so that it only triggers on the first use
>>>>> instance.
>>>>
>>>> I'm not convinced about this so far. The whole point is that we also provide the
>>>> pid just as we currently do, so that we give the user a chance to possibly pin
>>>> point the process that needs code change to not use the deprecated API anymore.
>>>>
>>>>>> In how many years do you plan a removal ... I think we're stuck with uapi
>>>>>> basically forever as we don't want to break old binaries, no? ;/
>>>>>>
>>>>> I thought we could remove things on a schedule if we followed the deprecation
>>>>> process, but that may just be for sysfs.  Regardless, it would still be nice to
>>>>> inform people they are using an older api.
>>>>
>>>> I think we rather might be stuck with also the deprecated stuff forever, just
>>>> as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
>>>> remove anything, there's actually also no point to spam the log about it, if
>>>> everyone can/should read it from the RFC anyway.
>>>>
>>> So this begs the question as to why we have deprecation warnings to begin with.
>>> At what point do we draw the line where we can change some aspect of the user
>>> api.  I agree if the answer is never, then yeah we're stuck, but then, why
>>> bother announcing deprecation warnings at all?
>>
>> I think we can deprecate user API after a significantly long period of time
>> (like 5 or 6 years).  That's why we also have a deprecation schedule that can
>> be updated and hopefully that's something people pay attention to.
>>
>> The problem here is deprecation of ancillary data and that's is a lot tougher
>> then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
>> I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
>> enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
>> spec.  Ancillary data should not have been enabled using even notification api,
>> as it is not an event, but we now have to live with it.
>>
> Ugh I didn't even consider cmsg type overlap.  Thats probably it then, we can't
> deprecate it.  Though that does call the question up as to how to differentiate
> expectations of the data format for each cmsg, if they use the same type.  Does
> the SCTP_RCVINFO data struct overlay the SNDRCVINFO struct exactly?  (sorry I've
> not checked myself yet).

No there is not direct overlap between the two.  However, as Michael pointed out,
there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.

-vlad

> 
> Neil
> 
>> -vlad
>>
>>>
>>> Neil
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 16:32                     ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2014-07-09 16:32 UTC (permalink / raw)
  To: Neil Horman; +Cc: Daniel Borkmann, davem, geirola, netdev, linux-sctp

On 07/09/2014 11:44 AM, Neil Horman wrote:
> On Wed, Jul 09, 2014 at 11:36:07AM -0400, Vlad Yasevich wrote:
>> On 07/09/2014 11:13 AM, Neil Horman wrote:
>>> On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
>>>> On 07/09/2014 12:49 PM, Neil Horman wrote:
>>>>> On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
>>>>>> On 07/08/2014 04:41 PM, Neil Horman wrote:
>>>>>>> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
>>>>>>>> On 07/08/2014 01:14 PM, Neil Horman wrote:
>>>>>>>> ...
>>>>>>>>> since you're adding cmsg's from rfc6458, do you also want to add some
>>>>>>>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
>>>>>>>>> schedule its eventual removal?
>>>>>>>>
>>>>>>>> Sure, we can do that. Do you want me to include it into the set?
>>>>>>>
>>>>>>> If you're plan is to implement 6458, then yes, I think that would be good.
>>>>>>
>>>>>> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
>>>>>> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
>>>>>> only, which is fine. What you're suggesting is to place similar ratelimited
>>>>>> warnings (due to different possible pids on the machine) into the 'fastpath'
>>>>>> where we get and set cmsg message headers.
>>>>>>
>>>>>> While that may be fine for {set,get}sockopt(2) that's called once or very few
>>>>>> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
>>>>>> to unnecessary spamming the klog since up to now this is the only way our
>>>>>> users can set or receive this info. I'm not sure we want to annoy users like
>>>>>> that ...
>>>>>>
>>>>> Then we wrap it in a ONCE macro so that it only triggers on the first use
>>>>> instance.
>>>>
>>>> I'm not convinced about this so far. The whole point is that we also provide the
>>>> pid just as we currently do, so that we give the user a chance to possibly pin
>>>> point the process that needs code change to not use the deprecated API anymore.
>>>>
>>>>>> In how many years do you plan a removal ... I think we're stuck with uapi
>>>>>> basically forever as we don't want to break old binaries, no? ;/
>>>>>>
>>>>> I thought we could remove things on a schedule if we followed the deprecation
>>>>> process, but that may just be for sysfs.  Regardless, it would still be nice to
>>>>> inform people they are using an older api.
>>>>
>>>> I think we rather might be stuck with also the deprecated stuff forever, just
>>>> as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
>>>> remove anything, there's actually also no point to spam the log about it, if
>>>> everyone can/should read it from the RFC anyway.
>>>>
>>> So this begs the question as to why we have deprecation warnings to begin with.
>>> At what point do we draw the line where we can change some aspect of the user
>>> api.  I agree if the answer is never, then yeah we're stuck, but then, why
>>> bother announcing deprecation warnings at all?
>>
>> I think we can deprecate user API after a significantly long period of time
>> (like 5 or 6 years).  That's why we also have a deprecation schedule that can
>> be updated and hopefully that's something people pay attention to.
>>
>> The problem here is deprecation of ancillary data and that's is a lot tougher
>> then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
>> I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
>> enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
>> spec.  Ancillary data should not have been enabled using even notification api,
>> as it is not an event, but we now have to live with it.
>>
> Ugh I didn't even consider cmsg type overlap.  Thats probably it then, we can't
> deprecate it.  Though that does call the question up as to how to differentiate
> expectations of the data format for each cmsg, if they use the same type.  Does
> the SCTP_RCVINFO data struct overlay the SNDRCVINFO struct exactly?  (sorry I've
> not checked myself yet).

No there is not direct overlap between the two.  However, as Michael pointed out,
there is a new option to control SCTP_RCVINFO.  So would could add a deprecation
warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.

-vlad

> 
> Neil
> 
>> -vlad
>>
>>>
>>> Neil
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>


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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-09 16:12                       ` Michael Tuexen
@ 2014-07-09 16:30                         ` Vlad Yasevich
  -1 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2014-07-09 16:30 UTC (permalink / raw)
  To: Michael Tuexen, David Laight
  Cc: Neil Horman, Daniel Borkmann, davem, geirola, netdev, linux-sctp

On 07/09/2014 12:12 PM, Michael Tuexen wrote:
> On 09 Jul 2014, at 18:02, David Laight <David.Laight@ACULAB.COM> wrote:
> 
>> From: Neil Horman
>> ...
>>>> The problem here is deprecation of ancillary data and that's is a lot tougher
>>>> then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
>>>> I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
>>>> enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
> I don't think this is true:
> To request SCTP_SNDRCVINFO you use the SCTP_EVENTS option. See
> http://tools.ietf.org/html/rfc6458#section-6.2.1
> To request the SCTP_RCVINFO you use the SCTP_RECVRCVINFO option. See
> http://tools.ietf.org/html/rfc6458#section-8.1.29
> So the user does different things and the kernel can provide the requested
> information.

This is not very clear, but yes.  I've re-re-read the section in question after
sending out that mail and yes this does seem to be the case.

-vlad

> 
> Best regards
> Michael
>>>> spec.  Ancillary data should not have been enabled using even notification api,
>>>> as it is not an event, but we now have to live with it.
>>>>
>>> Ugh I didn't even consider cmsg type overlap.  Thats probably it then, we can't
>>> deprecate it.  Though that does call the question up as to how to differentiate
>>> expectations of the data format for each cmsg, if they use the same type.  Does
>>> the SCTP_RCVINFO data struct overlay the SNDRCVINFO struct exactly?  (sorry I've
>>> not checked myself yet).
>>
>> Not from what I remember from when I read that RFC.
>> I think the lengths are different enough to determine which is which.
>>
>> That RFC (I've forgotten the number) looks like an entire bag of poo
>> that should be ignored...
>>
>> 	David
>>
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 16:30                         ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2014-07-09 16:30 UTC (permalink / raw)
  To: Michael Tuexen, David Laight
  Cc: Neil Horman, Daniel Borkmann, davem, geirola, netdev, linux-sctp

On 07/09/2014 12:12 PM, Michael Tuexen wrote:
> On 09 Jul 2014, at 18:02, David Laight <David.Laight@ACULAB.COM> wrote:
> 
>> From: Neil Horman
>> ...
>>>> The problem here is deprecation of ancillary data and that's is a lot tougher
>>>> then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
>>>> I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
>>>> enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
> I don't think this is true:
> To request SCTP_SNDRCVINFO you use the SCTP_EVENTS option. See
> http://tools.ietf.org/html/rfc6458#section-6.2.1
> To request the SCTP_RCVINFO you use the SCTP_RECVRCVINFO option. See
> http://tools.ietf.org/html/rfc6458#section-8.1.29
> So the user does different things and the kernel can provide the requested
> information.

This is not very clear, but yes.  I've re-re-read the section in question after
sending out that mail and yes this does seem to be the case.

-vlad

> 
> Best regards
> Michael
>>>> spec.  Ancillary data should not have been enabled using even notification api,
>>>> as it is not an event, but we now have to live with it.
>>>>
>>> Ugh I didn't even consider cmsg type overlap.  Thats probably it then, we can't
>>> deprecate it.  Though that does call the question up as to how to differentiate
>>> expectations of the data format for each cmsg, if they use the same type.  Does
>>> the SCTP_RCVINFO data struct overlay the SNDRCVINFO struct exactly?  (sorry I've
>>> not checked myself yet).
>>
>> Not from what I remember from when I read that RFC.
>> I think the lengths are different enough to determine which is which.
>>
>> That RFC (I've forgotten the number) looks like an entire bag of poo
>> that should be ignored...
>>
>> 	David
>>
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 


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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-09 16:02                     ` David Laight
@ 2014-07-09 16:12                       ` Michael Tuexen
  -1 siblings, 0 replies; 79+ messages in thread
From: Michael Tuexen @ 2014-07-09 16:12 UTC (permalink / raw)
  To: David Laight
  Cc: Neil Horman, Vlad Yasevich, Daniel Borkmann, davem, geirola,
	netdev, linux-sctp

On 09 Jul 2014, at 18:02, David Laight <David.Laight@ACULAB.COM> wrote:

> From: Neil Horman
> ...
>>> The problem here is deprecation of ancillary data and that's is a lot tougher
>>> then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
>>> I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
>>> enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
I don't think this is true:
To request SCTP_SNDRCVINFO you use the SCTP_EVENTS option. See
http://tools.ietf.org/html/rfc6458#section-6.2.1
To request the SCTP_RCVINFO you use the SCTP_RECVRCVINFO option. See
http://tools.ietf.org/html/rfc6458#section-8.1.29
So the user does different things and the kernel can provide the requested
information.

Best regards
Michael
>>> spec.  Ancillary data should not have been enabled using even notification api,
>>> as it is not an event, but we now have to live with it.
>>> 
>> Ugh I didn't even consider cmsg type overlap.  Thats probably it then, we can't
>> deprecate it.  Though that does call the question up as to how to differentiate
>> expectations of the data format for each cmsg, if they use the same type.  Does
>> the SCTP_RCVINFO data struct overlay the SNDRCVINFO struct exactly?  (sorry I've
>> not checked myself yet).
> 
> Not from what I remember from when I read that RFC.
> I think the lengths are different enough to determine which is which.
> 
> That RFC (I've forgotten the number) looks like an entire bag of poo
> that should be ignored...
> 
> 	David
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 16:12                       ` Michael Tuexen
  0 siblings, 0 replies; 79+ messages in thread
From: Michael Tuexen @ 2014-07-09 16:12 UTC (permalink / raw)
  To: David Laight
  Cc: Neil Horman, Vlad Yasevich, Daniel Borkmann, davem, geirola,
	netdev, linux-sctp

On 09 Jul 2014, at 18:02, David Laight <David.Laight@ACULAB.COM> wrote:

> From: Neil Horman
> ...
>>> The problem here is deprecation of ancillary data and that's is a lot tougher
>>> then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
>>> I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
>>> enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
I don't think this is true:
To request SCTP_SNDRCVINFO you use the SCTP_EVENTS option. See
http://tools.ietf.org/html/rfc6458#section-6.2.1
To request the SCTP_RCVINFO you use the SCTP_RECVRCVINFO option. See
http://tools.ietf.org/html/rfc6458#section-8.1.29
So the user does different things and the kernel can provide the requested
information.

Best regards
Michael
>>> spec.  Ancillary data should not have been enabled using even notification api,
>>> as it is not an event, but we now have to live with it.
>>> 
>> Ugh I didn't even consider cmsg type overlap.  Thats probably it then, we can't
>> deprecate it.  Though that does call the question up as to how to differentiate
>> expectations of the data format for each cmsg, if they use the same type.  Does
>> the SCTP_RCVINFO data struct overlay the SNDRCVINFO struct exactly?  (sorry I've
>> not checked myself yet).
> 
> Not from what I remember from when I read that RFC.
> I think the lengths are different enough to determine which is which.
> 
> That RFC (I've forgotten the number) looks like an entire bag of poo
> that should be ignored...
> 
> 	David
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-09 15:36                 ` Vlad Yasevich
@ 2014-07-09 16:10                   ` Daniel Borkmann
  -1 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-09 16:10 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: Neil Horman, davem, geirola, netdev, linux-sctp

On 07/09/2014 05:36 PM, Vlad Yasevich wrote:
...
> The problem here is deprecation of ancillary data and that's is a lot tougher
> then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
> I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
> enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
> spec.  Ancillary data should not have been enabled using even notification api,
> as it is not an event, but we now have to live with it.

Then the set could stay as is from my side.

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 16:10                   ` Daniel Borkmann
  0 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-09 16:10 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: Neil Horman, davem, geirola, netdev, linux-sctp

On 07/09/2014 05:36 PM, Vlad Yasevich wrote:
...
> The problem here is deprecation of ancillary data and that's is a lot tougher
> then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
> I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
> enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
> spec.  Ancillary data should not have been enabled using even notification api,
> as it is not an event, but we now have to live with it.

Then the set could stay as is from my side.

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

* RE: [PATCH net-next 0/5] SCTP updates
  2014-07-09 15:44                   ` Neil Horman
@ 2014-07-09 16:02                     ` David Laight
  -1 siblings, 0 replies; 79+ messages in thread
From: David Laight @ 2014-07-09 16:02 UTC (permalink / raw)
  To: 'Neil Horman', Vlad Yasevich
  Cc: Daniel Borkmann, davem, geirola, netdev, linux-sctp

From: Neil Horman
...
> > The problem here is deprecation of ancillary data and that's is a lot tougher
> > then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
> > I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
> > enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
> > spec.  Ancillary data should not have been enabled using even notification api,
> > as it is not an event, but we now have to live with it.
> >
> Ugh I didn't even consider cmsg type overlap.  Thats probably it then, we can't
> deprecate it.  Though that does call the question up as to how to differentiate
> expectations of the data format for each cmsg, if they use the same type.  Does
> the SCTP_RCVINFO data struct overlay the SNDRCVINFO struct exactly?  (sorry I've
> not checked myself yet).

Not from what I remember from when I read that RFC.
I think the lengths are different enough to determine which is which.

That RFC (I've forgotten the number) looks like an entire bag of poo
that should be ignored...

	David

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

* RE: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 16:02                     ` David Laight
  0 siblings, 0 replies; 79+ messages in thread
From: David Laight @ 2014-07-09 16:02 UTC (permalink / raw)
  To: 'Neil Horman', Vlad Yasevich
  Cc: Daniel Borkmann, davem, geirola, netdev, linux-sctp

From: Neil Horman
...
> > The problem here is deprecation of ancillary data and that's is a lot tougher
> > then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
> > I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
> > enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
> > spec.  Ancillary data should not have been enabled using even notification api,
> > as it is not an event, but we now have to live with it.
> >
> Ugh I didn't even consider cmsg type overlap.  Thats probably it then, we can't
> deprecate it.  Though that does call the question up as to how to differentiate
> expectations of the data format for each cmsg, if they use the same type.  Does
> the SCTP_RCVINFO data struct overlay the SNDRCVINFO struct exactly?  (sorry I've
> not checked myself yet).

Not from what I remember from when I read that RFC.
I think the lengths are different enough to determine which is which.

That RFC (I've forgotten the number) looks like an entire bag of poo
that should be ignored...

	David




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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-09 15:36                 ` Vlad Yasevich
@ 2014-07-09 15:44                   ` Neil Horman
  -1 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-09 15:44 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: Daniel Borkmann, davem, geirola, netdev, linux-sctp

On Wed, Jul 09, 2014 at 11:36:07AM -0400, Vlad Yasevich wrote:
> On 07/09/2014 11:13 AM, Neil Horman wrote:
> > On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
> >> On 07/09/2014 12:49 PM, Neil Horman wrote:
> >>> On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
> >>>> On 07/08/2014 04:41 PM, Neil Horman wrote:
> >>>>> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
> >>>>>> On 07/08/2014 01:14 PM, Neil Horman wrote:
> >>>>>> ...
> >>>>>>> since you're adding cmsg's from rfc6458, do you also want to add some
> >>>>>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> >>>>>>> schedule its eventual removal?
> >>>>>>
> >>>>>> Sure, we can do that. Do you want me to include it into the set?
> >>>>>
> >>>>> If you're plan is to implement 6458, then yes, I think that would be good.
> >>>>
> >>>> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
> >>>> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
> >>>> only, which is fine. What you're suggesting is to place similar ratelimited
> >>>> warnings (due to different possible pids on the machine) into the 'fastpath'
> >>>> where we get and set cmsg message headers.
> >>>>
> >>>> While that may be fine for {set,get}sockopt(2) that's called once or very few
> >>>> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
> >>>> to unnecessary spamming the klog since up to now this is the only way our
> >>>> users can set or receive this info. I'm not sure we want to annoy users like
> >>>> that ...
> >>>>
> >>> Then we wrap it in a ONCE macro so that it only triggers on the first use
> >>> instance.
> >>
> >> I'm not convinced about this so far. The whole point is that we also provide the
> >> pid just as we currently do, so that we give the user a chance to possibly pin
> >> point the process that needs code change to not use the deprecated API anymore.
> >>
> >>>> In how many years do you plan a removal ... I think we're stuck with uapi
> >>>> basically forever as we don't want to break old binaries, no? ;/
> >>>>
> >>> I thought we could remove things on a schedule if we followed the deprecation
> >>> process, but that may just be for sysfs.  Regardless, it would still be nice to
> >>> inform people they are using an older api.
> >>
> >> I think we rather might be stuck with also the deprecated stuff forever, just
> >> as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
> >> remove anything, there's actually also no point to spam the log about it, if
> >> everyone can/should read it from the RFC anyway.
> >>
> > So this begs the question as to why we have deprecation warnings to begin with.
> > At what point do we draw the line where we can change some aspect of the user
> > api.  I agree if the answer is never, then yeah we're stuck, but then, why
> > bother announcing deprecation warnings at all?
> 
> I think we can deprecate user API after a significantly long period of time
> (like 5 or 6 years).  That's why we also have a deprecation schedule that can
> be updated and hopefully that's something people pay attention to.
> 
> The problem here is deprecation of ancillary data and that's is a lot tougher
> then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
> I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
> enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
> spec.  Ancillary data should not have been enabled using even notification api,
> as it is not an event, but we now have to live with it.
> 
Ugh I didn't even consider cmsg type overlap.  Thats probably it then, we can't
deprecate it.  Though that does call the question up as to how to differentiate
expectations of the data format for each cmsg, if they use the same type.  Does
the SCTP_RCVINFO data struct overlay the SNDRCVINFO struct exactly?  (sorry I've
not checked myself yet).

Neil

> -vlad
> 
> > 
> > Neil
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 15:44                   ` Neil Horman
  0 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-09 15:44 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: Daniel Borkmann, davem, geirola, netdev, linux-sctp

On Wed, Jul 09, 2014 at 11:36:07AM -0400, Vlad Yasevich wrote:
> On 07/09/2014 11:13 AM, Neil Horman wrote:
> > On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
> >> On 07/09/2014 12:49 PM, Neil Horman wrote:
> >>> On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
> >>>> On 07/08/2014 04:41 PM, Neil Horman wrote:
> >>>>> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
> >>>>>> On 07/08/2014 01:14 PM, Neil Horman wrote:
> >>>>>> ...
> >>>>>>> since you're adding cmsg's from rfc6458, do you also want to add some
> >>>>>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> >>>>>>> schedule its eventual removal?
> >>>>>>
> >>>>>> Sure, we can do that. Do you want me to include it into the set?
> >>>>>
> >>>>> If you're plan is to implement 6458, then yes, I think that would be good.
> >>>>
> >>>> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
> >>>> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
> >>>> only, which is fine. What you're suggesting is to place similar ratelimited
> >>>> warnings (due to different possible pids on the machine) into the 'fastpath'
> >>>> where we get and set cmsg message headers.
> >>>>
> >>>> While that may be fine for {set,get}sockopt(2) that's called once or very few
> >>>> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
> >>>> to unnecessary spamming the klog since up to now this is the only way our
> >>>> users can set or receive this info. I'm not sure we want to annoy users like
> >>>> that ...
> >>>>
> >>> Then we wrap it in a ONCE macro so that it only triggers on the first use
> >>> instance.
> >>
> >> I'm not convinced about this so far. The whole point is that we also provide the
> >> pid just as we currently do, so that we give the user a chance to possibly pin
> >> point the process that needs code change to not use the deprecated API anymore.
> >>
> >>>> In how many years do you plan a removal ... I think we're stuck with uapi
> >>>> basically forever as we don't want to break old binaries, no? ;/
> >>>>
> >>> I thought we could remove things on a schedule if we followed the deprecation
> >>> process, but that may just be for sysfs.  Regardless, it would still be nice to
> >>> inform people they are using an older api.
> >>
> >> I think we rather might be stuck with also the deprecated stuff forever, just
> >> as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
> >> remove anything, there's actually also no point to spam the log about it, if
> >> everyone can/should read it from the RFC anyway.
> >>
> > So this begs the question as to why we have deprecation warnings to begin with.
> > At what point do we draw the line where we can change some aspect of the user
> > api.  I agree if the answer is never, then yeah we're stuck, but then, why
> > bother announcing deprecation warnings at all?
> 
> I think we can deprecate user API after a significantly long period of time
> (like 5 or 6 years).  That's why we also have a deprecation schedule that can
> be updated and hopefully that's something people pay attention to.
> 
> The problem here is deprecation of ancillary data and that's is a lot tougher
> then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
> I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
> enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
> spec.  Ancillary data should not have been enabled using even notification api,
> as it is not an event, but we now have to live with it.
> 
Ugh I didn't even consider cmsg type overlap.  Thats probably it then, we can't
deprecate it.  Though that does call the question up as to how to differentiate
expectations of the data format for each cmsg, if they use the same type.  Does
the SCTP_RCVINFO data struct overlay the SNDRCVINFO struct exactly?  (sorry I've
not checked myself yet).

Neil

> -vlad
> 
> > 
> > Neil
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-09 15:25                 ` Daniel Borkmann
@ 2014-07-09 15:41                   ` Neil Horman
  -1 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-09 15:41 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

On Wed, Jul 09, 2014 at 05:25:15PM +0200, Daniel Borkmann wrote:
> On 07/09/2014 05:13 PM, Neil Horman wrote:
> >On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
> >>On 07/09/2014 12:49 PM, Neil Horman wrote:
> >>>On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
> >>>>On 07/08/2014 04:41 PM, Neil Horman wrote:
> >>>>>On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
> >>>>>>On 07/08/2014 01:14 PM, Neil Horman wrote:
> >>>>>>...
> >>>>>>>since you're adding cmsg's from rfc6458, do you also want to add some
> >>>>>>>deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> >>>>>>>schedule its eventual removal?
> >>>>>>
> >>>>>>Sure, we can do that. Do you want me to include it into the set?
> >>>>>
> >>>>>If you're plan is to implement 6458, then yes, I think that would be good.
> >>>>
> >>>>Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
> >>>>warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
> >>>>only, which is fine. What you're suggesting is to place similar ratelimited
> >>>>warnings (due to different possible pids on the machine) into the 'fastpath'
> >>>>where we get and set cmsg message headers.
> >>>>
> >>>>While that may be fine for {set,get}sockopt(2) that's called once or very few
> >>>>times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
> >>>>to unnecessary spamming the klog since up to now this is the only way our
> >>>>users can set or receive this info. I'm not sure we want to annoy users like
> >>>>that ...
> >>>>
> >>>Then we wrap it in a ONCE macro so that it only triggers on the first use
> >>>instance.
> >>
> >>I'm not convinced about this so far. The whole point is that we also provide the
> >>pid just as we currently do, so that we give the user a chance to possibly pin
> >>point the process that needs code change to not use the deprecated API anymore.
> >>
> >>>>In how many years do you plan a removal ... I think we're stuck with uapi
> >>>>basically forever as we don't want to break old binaries, no? ;/
> >>>>
> >>>I thought we could remove things on a schedule if we followed the deprecation
> >>>process, but that may just be for sysfs.  Regardless, it would still be nice to
> >>>inform people they are using an older api.
> >>
> >>I think we rather might be stuck with also the deprecated stuff forever, just
> >>as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
> >>remove anything, there's actually also no point to spam the log about it, if
> >>everyone can/should read it from the RFC anyway.
> >>
> >So this begs the question as to why we have deprecation warnings to begin with.
> >At what point do we draw the line where we can change some aspect of the user
> >api.  I agree if the answer is never, then yeah we're stuck, but then, why
> >bother announcing deprecation warnings at all?
> 
> That's a good question, not sure when this was decided, Vlad? ;)
Well, I did the deprecation warnings in SCTP a while ago, after we all discussed
them, and there are lots of deprecation warnings spread out through the kernel
that would adversely affect user space api if they were actually removed.  I
added the ones in the get/setsockopt paths under the impression that eventually
they could be removed.  If they can't ever be removed though, it really calls
into question the use of a deprecation warning.

Neil

> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 15:41                   ` Neil Horman
  0 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-09 15:41 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

On Wed, Jul 09, 2014 at 05:25:15PM +0200, Daniel Borkmann wrote:
> On 07/09/2014 05:13 PM, Neil Horman wrote:
> >On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
> >>On 07/09/2014 12:49 PM, Neil Horman wrote:
> >>>On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
> >>>>On 07/08/2014 04:41 PM, Neil Horman wrote:
> >>>>>On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
> >>>>>>On 07/08/2014 01:14 PM, Neil Horman wrote:
> >>>>>>...
> >>>>>>>since you're adding cmsg's from rfc6458, do you also want to add some
> >>>>>>>deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> >>>>>>>schedule its eventual removal?
> >>>>>>
> >>>>>>Sure, we can do that. Do you want me to include it into the set?
> >>>>>
> >>>>>If you're plan is to implement 6458, then yes, I think that would be good.
> >>>>
> >>>>Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
> >>>>warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
> >>>>only, which is fine. What you're suggesting is to place similar ratelimited
> >>>>warnings (due to different possible pids on the machine) into the 'fastpath'
> >>>>where we get and set cmsg message headers.
> >>>>
> >>>>While that may be fine for {set,get}sockopt(2) that's called once or very few
> >>>>times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
> >>>>to unnecessary spamming the klog since up to now this is the only way our
> >>>>users can set or receive this info. I'm not sure we want to annoy users like
> >>>>that ...
> >>>>
> >>>Then we wrap it in a ONCE macro so that it only triggers on the first use
> >>>instance.
> >>
> >>I'm not convinced about this so far. The whole point is that we also provide the
> >>pid just as we currently do, so that we give the user a chance to possibly pin
> >>point the process that needs code change to not use the deprecated API anymore.
> >>
> >>>>In how many years do you plan a removal ... I think we're stuck with uapi
> >>>>basically forever as we don't want to break old binaries, no? ;/
> >>>>
> >>>I thought we could remove things on a schedule if we followed the deprecation
> >>>process, but that may just be for sysfs.  Regardless, it would still be nice to
> >>>inform people they are using an older api.
> >>
> >>I think we rather might be stuck with also the deprecated stuff forever, just
> >>as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
> >>remove anything, there's actually also no point to spam the log about it, if
> >>everyone can/should read it from the RFC anyway.
> >>
> >So this begs the question as to why we have deprecation warnings to begin with.
> >At what point do we draw the line where we can change some aspect of the user
> >api.  I agree if the answer is never, then yeah we're stuck, but then, why
> >bother announcing deprecation warnings at all?
> 
> That's a good question, not sure when this was decided, Vlad? ;)
Well, I did the deprecation warnings in SCTP a while ago, after we all discussed
them, and there are lots of deprecation warnings spread out through the kernel
that would adversely affect user space api if they were actually removed.  I
added the ones in the get/setsockopt paths under the impression that eventually
they could be removed.  If they can't ever be removed though, it really calls
into question the use of a deprecation warning.

Neil

> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-09 15:13               ` Neil Horman
@ 2014-07-09 15:36                 ` Vlad Yasevich
  -1 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2014-07-09 15:36 UTC (permalink / raw)
  To: Neil Horman, Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

On 07/09/2014 11:13 AM, Neil Horman wrote:
> On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
>> On 07/09/2014 12:49 PM, Neil Horman wrote:
>>> On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
>>>> On 07/08/2014 04:41 PM, Neil Horman wrote:
>>>>> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
>>>>>> On 07/08/2014 01:14 PM, Neil Horman wrote:
>>>>>> ...
>>>>>>> since you're adding cmsg's from rfc6458, do you also want to add some
>>>>>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
>>>>>>> schedule its eventual removal?
>>>>>>
>>>>>> Sure, we can do that. Do you want me to include it into the set?
>>>>>
>>>>> If you're plan is to implement 6458, then yes, I think that would be good.
>>>>
>>>> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
>>>> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
>>>> only, which is fine. What you're suggesting is to place similar ratelimited
>>>> warnings (due to different possible pids on the machine) into the 'fastpath'
>>>> where we get and set cmsg message headers.
>>>>
>>>> While that may be fine for {set,get}sockopt(2) that's called once or very few
>>>> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
>>>> to unnecessary spamming the klog since up to now this is the only way our
>>>> users can set or receive this info. I'm not sure we want to annoy users like
>>>> that ...
>>>>
>>> Then we wrap it in a ONCE macro so that it only triggers on the first use
>>> instance.
>>
>> I'm not convinced about this so far. The whole point is that we also provide the
>> pid just as we currently do, so that we give the user a chance to possibly pin
>> point the process that needs code change to not use the deprecated API anymore.
>>
>>>> In how many years do you plan a removal ... I think we're stuck with uapi
>>>> basically forever as we don't want to break old binaries, no? ;/
>>>>
>>> I thought we could remove things on a schedule if we followed the deprecation
>>> process, but that may just be for sysfs.  Regardless, it would still be nice to
>>> inform people they are using an older api.
>>
>> I think we rather might be stuck with also the deprecated stuff forever, just
>> as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
>> remove anything, there's actually also no point to spam the log about it, if
>> everyone can/should read it from the RFC anyway.
>>
> So this begs the question as to why we have deprecation warnings to begin with.
> At what point do we draw the line where we can change some aspect of the user
> api.  I agree if the answer is never, then yeah we're stuck, but then, why
> bother announcing deprecation warnings at all?

I think we can deprecate user API after a significantly long period of time
(like 5 or 6 years).  That's why we also have a deprecation schedule that can
be updated and hopefully that's something people pay attention to.

The problem here is deprecation of ancillary data and that's is a lot tougher
then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
spec.  Ancillary data should not have been enabled using even notification api,
as it is not an event, but we now have to live with it.

-vlad

> 
> Neil
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 15:36                 ` Vlad Yasevich
  0 siblings, 0 replies; 79+ messages in thread
From: Vlad Yasevich @ 2014-07-09 15:36 UTC (permalink / raw)
  To: Neil Horman, Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

On 07/09/2014 11:13 AM, Neil Horman wrote:
> On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
>> On 07/09/2014 12:49 PM, Neil Horman wrote:
>>> On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
>>>> On 07/08/2014 04:41 PM, Neil Horman wrote:
>>>>> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
>>>>>> On 07/08/2014 01:14 PM, Neil Horman wrote:
>>>>>> ...
>>>>>>> since you're adding cmsg's from rfc6458, do you also want to add some
>>>>>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
>>>>>>> schedule its eventual removal?
>>>>>>
>>>>>> Sure, we can do that. Do you want me to include it into the set?
>>>>>
>>>>> If you're plan is to implement 6458, then yes, I think that would be good.
>>>>
>>>> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
>>>> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
>>>> only, which is fine. What you're suggesting is to place similar ratelimited
>>>> warnings (due to different possible pids on the machine) into the 'fastpath'
>>>> where we get and set cmsg message headers.
>>>>
>>>> While that may be fine for {set,get}sockopt(2) that's called once or very few
>>>> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
>>>> to unnecessary spamming the klog since up to now this is the only way our
>>>> users can set or receive this info. I'm not sure we want to annoy users like
>>>> that ...
>>>>
>>> Then we wrap it in a ONCE macro so that it only triggers on the first use
>>> instance.
>>
>> I'm not convinced about this so far. The whole point is that we also provide the
>> pid just as we currently do, so that we give the user a chance to possibly pin
>> point the process that needs code change to not use the deprecated API anymore.
>>
>>>> In how many years do you plan a removal ... I think we're stuck with uapi
>>>> basically forever as we don't want to break old binaries, no? ;/
>>>>
>>> I thought we could remove things on a schedule if we followed the deprecation
>>> process, but that may just be for sysfs.  Regardless, it would still be nice to
>>> inform people they are using an older api.
>>
>> I think we rather might be stuck with also the deprecated stuff forever, just
>> as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
>> remove anything, there's actually also no point to spam the log about it, if
>> everyone can/should read it from the RFC anyway.
>>
> So this begs the question as to why we have deprecation warnings to begin with.
> At what point do we draw the line where we can change some aspect of the user
> api.  I agree if the answer is never, then yeah we're stuck, but then, why
> bother announcing deprecation warnings at all?

I think we can deprecate user API after a significantly long period of time
(like 5 or 6 years).  That's why we also have a deprecation schedule that can
be updated and hopefully that's something people pay attention to.

The problem here is deprecation of ancillary data and that's is a lot tougher
then socket options.  In this particular case (SCTP_SNDRCVINFO vs SCTP_RCVINFO),
I don't think there is any way to deprecate the SCTP_SNDRCVINFO since the event
enabling it is the same as the one for SCTP_RCVINFO.  This was a mistake in the
spec.  Ancillary data should not have been enabled using even notification api,
as it is not an event, but we now have to live with it.

-vlad

> 
> Neil
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-09 15:13               ` Neil Horman
@ 2014-07-09 15:25                 ` Daniel Borkmann
  -1 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-09 15:25 UTC (permalink / raw)
  To: Neil Horman; +Cc: davem, geirola, netdev, linux-sctp

On 07/09/2014 05:13 PM, Neil Horman wrote:
> On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
>> On 07/09/2014 12:49 PM, Neil Horman wrote:
>>> On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
>>>> On 07/08/2014 04:41 PM, Neil Horman wrote:
>>>>> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
>>>>>> On 07/08/2014 01:14 PM, Neil Horman wrote:
>>>>>> ...
>>>>>>> since you're adding cmsg's from rfc6458, do you also want to add some
>>>>>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
>>>>>>> schedule its eventual removal?
>>>>>>
>>>>>> Sure, we can do that. Do you want me to include it into the set?
>>>>>
>>>>> If you're plan is to implement 6458, then yes, I think that would be good.
>>>>
>>>> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
>>>> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
>>>> only, which is fine. What you're suggesting is to place similar ratelimited
>>>> warnings (due to different possible pids on the machine) into the 'fastpath'
>>>> where we get and set cmsg message headers.
>>>>
>>>> While that may be fine for {set,get}sockopt(2) that's called once or very few
>>>> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
>>>> to unnecessary spamming the klog since up to now this is the only way our
>>>> users can set or receive this info. I'm not sure we want to annoy users like
>>>> that ...
>>>>
>>> Then we wrap it in a ONCE macro so that it only triggers on the first use
>>> instance.
>>
>> I'm not convinced about this so far. The whole point is that we also provide the
>> pid just as we currently do, so that we give the user a chance to possibly pin
>> point the process that needs code change to not use the deprecated API anymore.
>>
>>>> In how many years do you plan a removal ... I think we're stuck with uapi
>>>> basically forever as we don't want to break old binaries, no? ;/
>>>>
>>> I thought we could remove things on a schedule if we followed the deprecation
>>> process, but that may just be for sysfs.  Regardless, it would still be nice to
>>> inform people they are using an older api.
>>
>> I think we rather might be stuck with also the deprecated stuff forever, just
>> as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
>> remove anything, there's actually also no point to spam the log about it, if
>> everyone can/should read it from the RFC anyway.
>>
> So this begs the question as to why we have deprecation warnings to begin with.
> At what point do we draw the line where we can change some aspect of the user
> api.  I agree if the answer is never, then yeah we're stuck, but then, why
> bother announcing deprecation warnings at all?

That's a good question, not sure when this was decided, Vlad? ;)

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 15:25                 ` Daniel Borkmann
  0 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-09 15:25 UTC (permalink / raw)
  To: Neil Horman; +Cc: davem, geirola, netdev, linux-sctp

On 07/09/2014 05:13 PM, Neil Horman wrote:
> On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
>> On 07/09/2014 12:49 PM, Neil Horman wrote:
>>> On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
>>>> On 07/08/2014 04:41 PM, Neil Horman wrote:
>>>>> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
>>>>>> On 07/08/2014 01:14 PM, Neil Horman wrote:
>>>>>> ...
>>>>>>> since you're adding cmsg's from rfc6458, do you also want to add some
>>>>>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
>>>>>>> schedule its eventual removal?
>>>>>>
>>>>>> Sure, we can do that. Do you want me to include it into the set?
>>>>>
>>>>> If you're plan is to implement 6458, then yes, I think that would be good.
>>>>
>>>> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
>>>> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
>>>> only, which is fine. What you're suggesting is to place similar ratelimited
>>>> warnings (due to different possible pids on the machine) into the 'fastpath'
>>>> where we get and set cmsg message headers.
>>>>
>>>> While that may be fine for {set,get}sockopt(2) that's called once or very few
>>>> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
>>>> to unnecessary spamming the klog since up to now this is the only way our
>>>> users can set or receive this info. I'm not sure we want to annoy users like
>>>> that ...
>>>>
>>> Then we wrap it in a ONCE macro so that it only triggers on the first use
>>> instance.
>>
>> I'm not convinced about this so far. The whole point is that we also provide the
>> pid just as we currently do, so that we give the user a chance to possibly pin
>> point the process that needs code change to not use the deprecated API anymore.
>>
>>>> In how many years do you plan a removal ... I think we're stuck with uapi
>>>> basically forever as we don't want to break old binaries, no? ;/
>>>>
>>> I thought we could remove things on a schedule if we followed the deprecation
>>> process, but that may just be for sysfs.  Regardless, it would still be nice to
>>> inform people they are using an older api.
>>
>> I think we rather might be stuck with also the deprecated stuff forever, just
>> as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
>> remove anything, there's actually also no point to spam the log about it, if
>> everyone can/should read it from the RFC anyway.
>>
> So this begs the question as to why we have deprecation warnings to begin with.
> At what point do we draw the line where we can change some aspect of the user
> api.  I agree if the answer is never, then yeah we're stuck, but then, why
> bother announcing deprecation warnings at all?

That's a good question, not sure when this was decided, Vlad? ;)

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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-09 13:28             ` Daniel Borkmann
@ 2014-07-09 15:13               ` Neil Horman
  -1 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-09 15:13 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
> On 07/09/2014 12:49 PM, Neil Horman wrote:
> >On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
> >>On 07/08/2014 04:41 PM, Neil Horman wrote:
> >>>On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
> >>>>On 07/08/2014 01:14 PM, Neil Horman wrote:
> >>>>...
> >>>>>since you're adding cmsg's from rfc6458, do you also want to add some
> >>>>>deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> >>>>>schedule its eventual removal?
> >>>>
> >>>>Sure, we can do that. Do you want me to include it into the set?
> >>>
> >>>If you're plan is to implement 6458, then yes, I think that would be good.
> >>
> >>Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
> >>warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
> >>only, which is fine. What you're suggesting is to place similar ratelimited
> >>warnings (due to different possible pids on the machine) into the 'fastpath'
> >>where we get and set cmsg message headers.
> >>
> >>While that may be fine for {set,get}sockopt(2) that's called once or very few
> >>times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
> >>to unnecessary spamming the klog since up to now this is the only way our
> >>users can set or receive this info. I'm not sure we want to annoy users like
> >>that ...
> >>
> >Then we wrap it in a ONCE macro so that it only triggers on the first use
> >instance.
> 
> I'm not convinced about this so far. The whole point is that we also provide the
> pid just as we currently do, so that we give the user a chance to possibly pin
> point the process that needs code change to not use the deprecated API anymore.
> 
> >>In how many years do you plan a removal ... I think we're stuck with uapi
> >>basically forever as we don't want to break old binaries, no? ;/
> >>
> >I thought we could remove things on a schedule if we followed the deprecation
> >process, but that may just be for sysfs.  Regardless, it would still be nice to
> >inform people they are using an older api.
> 
> I think we rather might be stuck with also the deprecated stuff forever, just
> as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
> remove anything, there's actually also no point to spam the log about it, if
> everyone can/should read it from the RFC anyway.
> 
So this begs the question as to why we have deprecation warnings to begin with.
At what point do we draw the line where we can change some aspect of the user
api.  I agree if the answer is never, then yeah we're stuck, but then, why
bother announcing deprecation warnings at all?

Neil

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 15:13               ` Neil Horman
  0 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-09 15:13 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

On Wed, Jul 09, 2014 at 03:28:03PM +0200, Daniel Borkmann wrote:
> On 07/09/2014 12:49 PM, Neil Horman wrote:
> >On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
> >>On 07/08/2014 04:41 PM, Neil Horman wrote:
> >>>On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
> >>>>On 07/08/2014 01:14 PM, Neil Horman wrote:
> >>>>...
> >>>>>since you're adding cmsg's from rfc6458, do you also want to add some
> >>>>>deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> >>>>>schedule its eventual removal?
> >>>>
> >>>>Sure, we can do that. Do you want me to include it into the set?
> >>>
> >>>If you're plan is to implement 6458, then yes, I think that would be good.
> >>
> >>Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
> >>warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
> >>only, which is fine. What you're suggesting is to place similar ratelimited
> >>warnings (due to different possible pids on the machine) into the 'fastpath'
> >>where we get and set cmsg message headers.
> >>
> >>While that may be fine for {set,get}sockopt(2) that's called once or very few
> >>times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
> >>to unnecessary spamming the klog since up to now this is the only way our
> >>users can set or receive this info. I'm not sure we want to annoy users like
> >>that ...
> >>
> >Then we wrap it in a ONCE macro so that it only triggers on the first use
> >instance.
> 
> I'm not convinced about this so far. The whole point is that we also provide the
> pid just as we currently do, so that we give the user a chance to possibly pin
> point the process that needs code change to not use the deprecated API anymore.
> 
> >>In how many years do you plan a removal ... I think we're stuck with uapi
> >>basically forever as we don't want to break old binaries, no? ;/
> >>
> >I thought we could remove things on a schedule if we followed the deprecation
> >process, but that may just be for sysfs.  Regardless, it would still be nice to
> >inform people they are using an older api.
> 
> I think we rather might be stuck with also the deprecated stuff forever, just
> as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
> remove anything, there's actually also no point to spam the log about it, if
> everyone can/should read it from the RFC anyway.
> 
So this begs the question as to why we have deprecation warnings to begin with.
At what point do we draw the line where we can change some aspect of the user
api.  I agree if the answer is never, then yeah we're stuck, but then, why
bother announcing deprecation warnings at all?

Neil


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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-09 10:49           ` Neil Horman
@ 2014-07-09 13:28             ` Daniel Borkmann
  -1 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-09 13:28 UTC (permalink / raw)
  To: Neil Horman; +Cc: davem, geirola, netdev, linux-sctp

On 07/09/2014 12:49 PM, Neil Horman wrote:
> On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
>> On 07/08/2014 04:41 PM, Neil Horman wrote:
>>> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
>>>> On 07/08/2014 01:14 PM, Neil Horman wrote:
>>>> ...
>>>>> since you're adding cmsg's from rfc6458, do you also want to add some
>>>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
>>>>> schedule its eventual removal?
>>>>
>>>> Sure, we can do that. Do you want me to include it into the set?
>>>
>>> If you're plan is to implement 6458, then yes, I think that would be good.
>>
>> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
>> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
>> only, which is fine. What you're suggesting is to place similar ratelimited
>> warnings (due to different possible pids on the machine) into the 'fastpath'
>> where we get and set cmsg message headers.
>>
>> While that may be fine for {set,get}sockopt(2) that's called once or very few
>> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
>> to unnecessary spamming the klog since up to now this is the only way our
>> users can set or receive this info. I'm not sure we want to annoy users like
>> that ...
>>
> Then we wrap it in a ONCE macro so that it only triggers on the first use
> instance.

I'm not convinced about this so far. The whole point is that we also provide the
pid just as we currently do, so that we give the user a chance to possibly pin
point the process that needs code change to not use the deprecated API anymore.

>> In how many years do you plan a removal ... I think we're stuck with uapi
>> basically forever as we don't want to break old binaries, no? ;/
>>
> I thought we could remove things on a schedule if we followed the deprecation
> process, but that may just be for sysfs.  Regardless, it would still be nice to
> inform people they are using an older api.

I think we rather might be stuck with also the deprecated stuff forever, just
as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
remove anything, there's actually also no point to spam the log about it, if
everyone can/should read it from the RFC anyway.

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 13:28             ` Daniel Borkmann
  0 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-09 13:28 UTC (permalink / raw)
  To: Neil Horman; +Cc: davem, geirola, netdev, linux-sctp

On 07/09/2014 12:49 PM, Neil Horman wrote:
> On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
>> On 07/08/2014 04:41 PM, Neil Horman wrote:
>>> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
>>>> On 07/08/2014 01:14 PM, Neil Horman wrote:
>>>> ...
>>>>> since you're adding cmsg's from rfc6458, do you also want to add some
>>>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
>>>>> schedule its eventual removal?
>>>>
>>>> Sure, we can do that. Do you want me to include it into the set?
>>>
>>> If you're plan is to implement 6458, then yes, I think that would be good.
>>
>> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
>> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
>> only, which is fine. What you're suggesting is to place similar ratelimited
>> warnings (due to different possible pids on the machine) into the 'fastpath'
>> where we get and set cmsg message headers.
>>
>> While that may be fine for {set,get}sockopt(2) that's called once or very few
>> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
>> to unnecessary spamming the klog since up to now this is the only way our
>> users can set or receive this info. I'm not sure we want to annoy users like
>> that ...
>>
> Then we wrap it in a ONCE macro so that it only triggers on the first use
> instance.

I'm not convinced about this so far. The whole point is that we also provide the
pid just as we currently do, so that we give the user a chance to possibly pin
point the process that needs code change to not use the deprecated API anymore.

>> In how many years do you plan a removal ... I think we're stuck with uapi
>> basically forever as we don't want to break old binaries, no? ;/
>>
> I thought we could remove things on a schedule if we followed the deprecation
> process, but that may just be for sysfs.  Regardless, it would still be nice to
> inform people they are using an older api.

I think we rather might be stuck with also the deprecated stuff forever, just
as AF_PACKET still has to carry around the old spkt stuff. :( So if we don't
remove anything, there's actually also no point to spam the log about it, if
everyone can/should read it from the RFC anyway.

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

* RE: [PATCH net-next 0/5] SCTP updates
  2014-07-09 10:49           ` Neil Horman
@ 2014-07-09 11:12             ` David Laight
  -1 siblings, 0 replies; 79+ messages in thread
From: David Laight @ 2014-07-09 11:12 UTC (permalink / raw)
  To: 'Neil Horman', Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

From: Neil Horman
> > In how many years do you plan a removal ... I think we're stuck with uapi
> > basically forever as we don't want to break old binaries, no? ;/
> >
> I thought we could remove things on a schedule if we followed the deprecation
> process, but that may just be for sysfs.  Regardless, it would still be nice to
> inform people they are using an older api.

The issue here is that it is an application API, not a system programming one.
I'd guess that most sysfs stuff is only used by programs that are released
as part of a Linux distribution - and thus code that is likely to be
release with a matching kernel.

These sccp structures are much more likely to be used by 'proper' 3rd party
applications, targeted at multiple kernel versions - possibly in binary form.
We compile applications on the oldest linux version we think our customers
are using - otherwise we'd have to release multiple copies.

So I don't think they can be deprecated (with warnings from the kernel) for
a long time, perhaps 5 or 10 years!

The first stage would be (somehow) to generate warnings when applications
are compiled. Only when that has been in place for some time would it
make sense to generate kernel warnings.

		David

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

* RE: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 11:12             ` David Laight
  0 siblings, 0 replies; 79+ messages in thread
From: David Laight @ 2014-07-09 11:12 UTC (permalink / raw)
  To: 'Neil Horman', Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

From: Neil Horman
> > In how many years do you plan a removal ... I think we're stuck with uapi
> > basically forever as we don't want to break old binaries, no? ;/
> >
> I thought we could remove things on a schedule if we followed the deprecation
> process, but that may just be for sysfs.  Regardless, it would still be nice to
> inform people they are using an older api.

The issue here is that it is an application API, not a system programming one.
I'd guess that most sysfs stuff is only used by programs that are released
as part of a Linux distribution - and thus code that is likely to be
release with a matching kernel.

These sccp structures are much more likely to be used by 'proper' 3rd party
applications, targeted at multiple kernel versions - possibly in binary form.
We compile applications on the oldest linux version we think our customers
are using - otherwise we'd have to release multiple copies.

So I don't think they can be deprecated (with warnings from the kernel) for
a long time, perhaps 5 or 10 years!

The first stage would be (somehow) to generate warnings when applications
are compiled. Only when that has been in place for some time would it
make sense to generate kernel warnings.

		David




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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-09  9:57         ` Daniel Borkmann
@ 2014-07-09 10:49           ` Neil Horman
  -1 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-09 10:49 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
> On 07/08/2014 04:41 PM, Neil Horman wrote:
> >On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
> >>On 07/08/2014 01:14 PM, Neil Horman wrote:
> >>...
> >>>since you're adding cmsg's from rfc6458, do you also want to add some
> >>>deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> >>>schedule its eventual removal?
> >>
> >>Sure, we can do that. Do you want me to include it into the set?
> >
> >If you're plan is to implement 6458, then yes, I think that would be good.
> 
> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
> only, which is fine. What you're suggesting is to place similar ratelimited
> warnings (due to different possible pids on the machine) into the 'fastpath'
> where we get and set cmsg message headers.
> 
> While that may be fine for {set,get}sockopt(2) that's called once or very few
> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
> to unnecessary spamming the klog since up to now this is the only way our
> users can set or receive this info. I'm not sure we want to annoy users like
> that ...
> 
Then we wrap it in a ONCE macro so that it only triggers on the first use
instance.

> In how many years do you plan a removal ... I think we're stuck with uapi
> basically forever as we don't want to break old binaries, no? ;/
> 
I thought we could remove things on a schedule if we followed the deprecation
process, but that may just be for sysfs.  Regardless, it would still be nice to
inform people they are using an older api.

Neil

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09 10:49           ` Neil Horman
  0 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-09 10:49 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

On Wed, Jul 09, 2014 at 11:57:37AM +0200, Daniel Borkmann wrote:
> On 07/08/2014 04:41 PM, Neil Horman wrote:
> >On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
> >>On 07/08/2014 01:14 PM, Neil Horman wrote:
> >>...
> >>>since you're adding cmsg's from rfc6458, do you also want to add some
> >>>deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> >>>schedule its eventual removal?
> >>
> >>Sure, we can do that. Do you want me to include it into the set?
> >
> >If you're plan is to implement 6458, then yes, I think that would be good.
> 
> Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
> warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
> only, which is fine. What you're suggesting is to place similar ratelimited
> warnings (due to different possible pids on the machine) into the 'fastpath'
> where we get and set cmsg message headers.
> 
> While that may be fine for {set,get}sockopt(2) that's called once or very few
> times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
> to unnecessary spamming the klog since up to now this is the only way our
> users can set or receive this info. I'm not sure we want to annoy users like
> that ...
> 
Then we wrap it in a ONCE macro so that it only triggers on the first use
instance.

> In how many years do you plan a removal ... I think we're stuck with uapi
> basically forever as we don't want to break old binaries, no? ;/
> 
I thought we could remove things on a schedule if we followed the deprecation
process, but that may just be for sysfs.  Regardless, it would still be nice to
inform people they are using an older api.

Neil


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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-08 14:41       ` Neil Horman
@ 2014-07-09  9:57         ` Daniel Borkmann
  -1 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-09  9:57 UTC (permalink / raw)
  To: Neil Horman; +Cc: davem, geirola, netdev, linux-sctp

On 07/08/2014 04:41 PM, Neil Horman wrote:
> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
>> On 07/08/2014 01:14 PM, Neil Horman wrote:
>> ...
>>> since you're adding cmsg's from rfc6458, do you also want to add some
>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
>>> schedule its eventual removal?
>>
>> Sure, we can do that. Do you want me to include it into the set?
>
> If you're plan is to implement 6458, then yes, I think that would be good.

Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
only, which is fine. What you're suggesting is to place similar ratelimited
warnings (due to different possible pids on the machine) into the 'fastpath'
where we get and set cmsg message headers.

While that may be fine for {set,get}sockopt(2) that's called once or very few
times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
to unnecessary spamming the klog since up to now this is the only way our
users can set or receive this info. I'm not sure we want to annoy users like
that ...

In how many years do you plan a removal ... I think we're stuck with uapi
basically forever as we don't want to break old binaries, no? ;/

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09  9:57         ` Daniel Borkmann
  0 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-09  9:57 UTC (permalink / raw)
  To: Neil Horman; +Cc: davem, geirola, netdev, linux-sctp

On 07/08/2014 04:41 PM, Neil Horman wrote:
> On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
>> On 07/08/2014 01:14 PM, Neil Horman wrote:
>> ...
>>> since you're adding cmsg's from rfc6458, do you also want to add some
>>> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
>>> schedule its eventual removal?
>>
>> Sure, we can do that. Do you want me to include it into the set?
>
> If you're plan is to implement 6458, then yes, I think that would be good.

Looking a bit closer at it, all our pr_warn_ratelimited(DEPRECATED ...)
warnings in SCTP are being done in 'slowpath' {set,get}sockopt(2) operations
only, which is fine. What you're suggesting is to place similar ratelimited
warnings (due to different possible pids on the machine) into the 'fastpath'
where we get and set cmsg message headers.

While that may be fine for {set,get}sockopt(2) that's called once or very few
times, I'm not sure this is a good idea in SCTP_SNDRCVINFO as it will yield
to unnecessary spamming the klog since up to now this is the only way our
users can set or receive this info. I'm not sure we want to annoy users like
that ...

In how many years do you plan a removal ... I think we're stuck with uapi
basically forever as we don't want to break old binaries, no? ;/

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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-08 21:40   ` David Miller
@ 2014-07-09  7:59     ` Daniel Borkmann
  -1 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-09  7:59 UTC (permalink / raw)
  To: David Miller; +Cc: geirola, netdev, linux-sctp

On 07/08/2014 11:40 PM, David Miller wrote:
> From: Daniel Borkmann <dborkman@redhat.com>
> Date: Fri,  4 Jul 2014 23:05:03 +0200
>
>> This set improves the SCTP socket API to be more in line with
>> RFC6458, Geir and myself have finalized it eventually. While
>> at it, the first patch also fixes two possible information
>> leaks that should go to net tree as well. For more details, I
>> refer you to the patches themselves.
>>
>> Thanks a lot.
>
> Where are we with this series?  Will there be another respin?

I'll add a 6th patch into the series to address Neil's feedback
and will respin with the rest unchanged. I'll try to get to that
by today. Thanks.

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-09  7:59     ` Daniel Borkmann
  0 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-09  7:59 UTC (permalink / raw)
  To: David Miller; +Cc: geirola, netdev, linux-sctp

On 07/08/2014 11:40 PM, David Miller wrote:
> From: Daniel Borkmann <dborkman@redhat.com>
> Date: Fri,  4 Jul 2014 23:05:03 +0200
>
>> This set improves the SCTP socket API to be more in line with
>> RFC6458, Geir and myself have finalized it eventually. While
>> at it, the first patch also fixes two possible information
>> leaks that should go to net tree as well. For more details, I
>> refer you to the patches themselves.
>>
>> Thanks a lot.
>
> Where are we with this series?  Will there be another respin?

I'll add a 6th patch into the series to address Neil's feedback
and will respin with the rest unchanged. I'll try to get to that
by today. Thanks.

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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-04 21:05 ` Daniel Borkmann
@ 2014-07-08 21:40   ` David Miller
  -1 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2014-07-08 21:40 UTC (permalink / raw)
  To: dborkman; +Cc: geirola, netdev, linux-sctp

From: Daniel Borkmann <dborkman@redhat.com>
Date: Fri,  4 Jul 2014 23:05:03 +0200

> This set improves the SCTP socket API to be more in line with
> RFC6458, Geir and myself have finalized it eventually. While
> at it, the first patch also fixes two possible information
> leaks that should go to net tree as well. For more details, I
> refer you to the patches themselves.
> 
> Thanks a lot.

Where are we with this series?  Will there be another respin?

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-08 21:40   ` David Miller
  0 siblings, 0 replies; 79+ messages in thread
From: David Miller @ 2014-07-08 21:40 UTC (permalink / raw)
  To: dborkman; +Cc: geirola, netdev, linux-sctp

From: Daniel Borkmann <dborkman@redhat.com>
Date: Fri,  4 Jul 2014 23:05:03 +0200

> This set improves the SCTP socket API to be more in line with
> RFC6458, Geir and myself have finalized it eventually. While
> at it, the first patch also fixes two possible information
> leaks that should go to net tree as well. For more details, I
> refer you to the patches themselves.
> 
> Thanks a lot.

Where are we with this series?  Will there be another respin?

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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-08 14:05     ` Daniel Borkmann
@ 2014-07-08 14:41       ` Neil Horman
  -1 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-08 14:41 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
> On 07/08/2014 01:14 PM, Neil Horman wrote:
> ...
> >since you're adding cmsg's from rfc6458, do you also want to add some
> >deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> >schedule its eventual removal?
> 
> Sure, we can do that. Do you want me to include it into the set?
> 

If you're plan is to implement 6458, then yes, I think that would be good.
Neil

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-08 14:41       ` Neil Horman
  0 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-08 14:41 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

On Tue, Jul 08, 2014 at 04:05:26PM +0200, Daniel Borkmann wrote:
> On 07/08/2014 01:14 PM, Neil Horman wrote:
> ...
> >since you're adding cmsg's from rfc6458, do you also want to add some
> >deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> >schedule its eventual removal?
> 
> Sure, we can do that. Do you want me to include it into the set?
> 

If you're plan is to implement 6458, then yes, I think that would be good.
Neil


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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-08 11:14   ` Neil Horman
@ 2014-07-08 14:05     ` Daniel Borkmann
  -1 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-08 14:05 UTC (permalink / raw)
  To: Neil Horman; +Cc: davem, geirola, netdev, linux-sctp

On 07/08/2014 01:14 PM, Neil Horman wrote:
...
> since you're adding cmsg's from rfc6458, do you also want to add some
> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> schedule its eventual removal?

Sure, we can do that. Do you want me to include it into the set?

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-08 14:05     ` Daniel Borkmann
  0 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-08 14:05 UTC (permalink / raw)
  To: Neil Horman; +Cc: davem, geirola, netdev, linux-sctp

On 07/08/2014 01:14 PM, Neil Horman wrote:
...
> since you're adding cmsg's from rfc6458, do you also want to add some
> deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
> schedule its eventual removal?

Sure, we can do that. Do you want me to include it into the set?

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

* Re: [PATCH net-next 0/5] SCTP updates
  2014-07-04 21:05 ` Daniel Borkmann
@ 2014-07-08 11:14   ` Neil Horman
  -1 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-08 11:14 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

On Fri, Jul 04, 2014 at 11:05:03PM +0200, Daniel Borkmann wrote:
> This set improves the SCTP socket API to be more in line with
> RFC6458, Geir and myself have finalized it eventually. While
> at it, the first patch also fixes two possible information
> leaks that should go to net tree as well. For more details, I
> refer you to the patches themselves.
> 
> Thanks a lot.
> 
> Daniel Borkmann (1):
>   net: sctp: fix information leaks in ulpevent layer
> 
> Geir Ola Vaagland (4):
>   net: sctp: implement rfc6458, 5.3.4. SCTP_SNDINFO cmsg support
>   net: sctp: implement rfc6458, 5.3.5. SCTP_RCVINFO cmsg support
>   net: sctp: implement rfc6458, 5.3.6. SCTP_NXTINFO cmsg support
>   net: sctp: implement rfc6458, 8.1.31. SCTP_DEFAULT_SNDINFO support
> 
>  include/net/sctp/sctp.h     |   1 +
>  include/net/sctp/structs.h  |   7 +-
>  include/net/sctp/ulpevent.h |  14 +--
>  include/uapi/linux/sctp.h   | 102 ++++++++++++----
>  net/sctp/socket.c           | 285 ++++++++++++++++++++++++++++++++++++++------
>  net/sctp/ulpevent.c         | 185 ++++++++++++----------------
>  6 files changed, 423 insertions(+), 171 deletions(-)
> 
> -- 
> 1.7.11.7
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

since you're adding cmsg's from rfc6458, do you also want to add some
deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
schedule its eventual removal?

Neil

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

* Re: [PATCH net-next 0/5] SCTP updates
@ 2014-07-08 11:14   ` Neil Horman
  0 siblings, 0 replies; 79+ messages in thread
From: Neil Horman @ 2014-07-08 11:14 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: davem, geirola, netdev, linux-sctp

On Fri, Jul 04, 2014 at 11:05:03PM +0200, Daniel Borkmann wrote:
> This set improves the SCTP socket API to be more in line with
> RFC6458, Geir and myself have finalized it eventually. While
> at it, the first patch also fixes two possible information
> leaks that should go to net tree as well. For more details, I
> refer you to the patches themselves.
> 
> Thanks a lot.
> 
> Daniel Borkmann (1):
>   net: sctp: fix information leaks in ulpevent layer
> 
> Geir Ola Vaagland (4):
>   net: sctp: implement rfc6458, 5.3.4. SCTP_SNDINFO cmsg support
>   net: sctp: implement rfc6458, 5.3.5. SCTP_RCVINFO cmsg support
>   net: sctp: implement rfc6458, 5.3.6. SCTP_NXTINFO cmsg support
>   net: sctp: implement rfc6458, 8.1.31. SCTP_DEFAULT_SNDINFO support
> 
>  include/net/sctp/sctp.h     |   1 +
>  include/net/sctp/structs.h  |   7 +-
>  include/net/sctp/ulpevent.h |  14 +--
>  include/uapi/linux/sctp.h   | 102 ++++++++++++----
>  net/sctp/socket.c           | 285 ++++++++++++++++++++++++++++++++++++++------
>  net/sctp/ulpevent.c         | 185 ++++++++++++----------------
>  6 files changed, 423 insertions(+), 171 deletions(-)
> 
> -- 
> 1.7.11.7
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

since you're adding cmsg's from rfc6458, do you also want to add some
deprecation warnings around the use of SCTP_SNDRCVINFO too, so we can start to
schedule its eventual removal?

Neil


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

* [PATCH net-next 0/5] SCTP updates
@ 2014-07-04 21:05 ` Daniel Borkmann
  0 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-04 21:05 UTC (permalink / raw)
  To: davem; +Cc: geirola, netdev, linux-sctp

This set improves the SCTP socket API to be more in line with
RFC6458, Geir and myself have finalized it eventually. While
at it, the first patch also fixes two possible information
leaks that should go to net tree as well. For more details, I
refer you to the patches themselves.

Thanks a lot.

Daniel Borkmann (1):
  net: sctp: fix information leaks in ulpevent layer

Geir Ola Vaagland (4):
  net: sctp: implement rfc6458, 5.3.4. SCTP_SNDINFO cmsg support
  net: sctp: implement rfc6458, 5.3.5. SCTP_RCVINFO cmsg support
  net: sctp: implement rfc6458, 5.3.6. SCTP_NXTINFO cmsg support
  net: sctp: implement rfc6458, 8.1.31. SCTP_DEFAULT_SNDINFO support

 include/net/sctp/sctp.h     |   1 +
 include/net/sctp/structs.h  |   7 +-
 include/net/sctp/ulpevent.h |  14 +--
 include/uapi/linux/sctp.h   | 102 ++++++++++++----
 net/sctp/socket.c           | 285 ++++++++++++++++++++++++++++++++++++++------
 net/sctp/ulpevent.c         | 185 ++++++++++++----------------
 6 files changed, 423 insertions(+), 171 deletions(-)

-- 
1.7.11.7

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

* [PATCH net-next 0/5] SCTP updates
@ 2014-07-04 21:05 ` Daniel Borkmann
  0 siblings, 0 replies; 79+ messages in thread
From: Daniel Borkmann @ 2014-07-04 21:05 UTC (permalink / raw)
  To: davem; +Cc: geirola, netdev, linux-sctp

This set improves the SCTP socket API to be more in line with
RFC6458, Geir and myself have finalized it eventually. While
at it, the first patch also fixes two possible information
leaks that should go to net tree as well. For more details, I
refer you to the patches themselves.

Thanks a lot.

Daniel Borkmann (1):
  net: sctp: fix information leaks in ulpevent layer

Geir Ola Vaagland (4):
  net: sctp: implement rfc6458, 5.3.4. SCTP_SNDINFO cmsg support
  net: sctp: implement rfc6458, 5.3.5. SCTP_RCVINFO cmsg support
  net: sctp: implement rfc6458, 5.3.6. SCTP_NXTINFO cmsg support
  net: sctp: implement rfc6458, 8.1.31. SCTP_DEFAULT_SNDINFO support

 include/net/sctp/sctp.h     |   1 +
 include/net/sctp/structs.h  |   7 +-
 include/net/sctp/ulpevent.h |  14 +--
 include/uapi/linux/sctp.h   | 102 ++++++++++++----
 net/sctp/socket.c           | 285 ++++++++++++++++++++++++++++++++++++++------
 net/sctp/ulpevent.c         | 185 ++++++++++++----------------
 6 files changed, 423 insertions(+), 171 deletions(-)

-- 
1.7.11.7


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

end of thread, other threads:[~2014-07-10 19:04 UTC | newest]

Thread overview: 79+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-20  1:47 [PATCH net-next 0/5]: SCTP updates Vlad Yasevich
2008-12-20  1:47 ` Vlad Yasevich
2008-12-20  1:47 ` Vlad Yasevich
2008-12-20  1:47   ` Vlad Yasevich
2008-12-20  1:47 ` [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option into ietf API extension compliance Vlad Yasevich
2008-12-20  1:47   ` Vlad Yasevich
2008-12-26  0:56   ` David Miller
2008-12-26  0:56     ` [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option David Miller
2008-12-26 17:04     ` [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option into ietf API extension compliance Vlad Yasevich
2008-12-26 17:04       ` [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option into Vlad Yasevich
2008-12-26 19:15       ` [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option into ietf API extension compliance David Miller
2008-12-26 19:15         ` [PATCH net-next 1/5] sctp: Bring SCTP_MAXSEG socket option David Miller
2008-12-20  1:47 ` [PATCH net-next 2/5] sctp: Fix a typo in socket.c Vlad Yasevich
2008-12-20  1:47   ` Vlad Yasevich
2008-12-26  0:57   ` David Miller
2008-12-26  0:57     ` David Miller
2008-12-20  1:47 ` [PATCH net-next 3/5] sctp: Implement socket option SCTP_GET_ASSOC_NUMBER Vlad Yasevich
2008-12-20  1:47   ` Vlad Yasevich
2008-12-26  0:57   ` David Miller
2008-12-26  0:57     ` [PATCH net-next 3/5] sctp: Implement socket option David Miller
2008-12-20  1:47 ` [PATCH net-next 4/5] sctp: Avoid memory overflow while FWD-TSN chunk is received with bad stream ID Vlad Yasevich
2008-12-20  1:47   ` Vlad Yasevich
2008-12-26  0:58   ` David Miller
2008-12-26  0:58     ` [PATCH net-next 4/5] sctp: Avoid memory overflow while FWD-TSN David Miller
2008-12-20  1:47 ` [PATCH net-next 5/5] sctp: Add validity check for SCTP_PARTIAL_DELIVERY_POINT socket option Vlad Yasevich
2008-12-20  1:47   ` Vlad Yasevich
2008-12-26  0:59   ` David Miller
2008-12-26  0:59     ` [PATCH net-next 5/5] sctp: Add validity check for David Miller
2014-07-04 21:05 [PATCH net-next 0/5] SCTP updates Daniel Borkmann
2014-07-04 21:05 ` Daniel Borkmann
2014-07-08 11:14 ` Neil Horman
2014-07-08 11:14   ` Neil Horman
2014-07-08 14:05   ` Daniel Borkmann
2014-07-08 14:05     ` Daniel Borkmann
2014-07-08 14:41     ` Neil Horman
2014-07-08 14:41       ` Neil Horman
2014-07-09  9:57       ` Daniel Borkmann
2014-07-09  9:57         ` Daniel Borkmann
2014-07-09 10:49         ` Neil Horman
2014-07-09 10:49           ` Neil Horman
2014-07-09 11:12           ` David Laight
2014-07-09 11:12             ` David Laight
2014-07-09 13:28           ` Daniel Borkmann
2014-07-09 13:28             ` Daniel Borkmann
2014-07-09 15:13             ` Neil Horman
2014-07-09 15:13               ` Neil Horman
2014-07-09 15:25               ` Daniel Borkmann
2014-07-09 15:25                 ` Daniel Borkmann
2014-07-09 15:41                 ` Neil Horman
2014-07-09 15:41                   ` Neil Horman
2014-07-09 15:36               ` Vlad Yasevich
2014-07-09 15:36                 ` Vlad Yasevich
2014-07-09 15:44                 ` Neil Horman
2014-07-09 15:44                   ` Neil Horman
2014-07-09 16:02                   ` David Laight
2014-07-09 16:02                     ` David Laight
2014-07-09 16:12                     ` Michael Tuexen
2014-07-09 16:12                       ` Michael Tuexen
2014-07-09 16:30                       ` Vlad Yasevich
2014-07-09 16:30                         ` Vlad Yasevich
2014-07-09 16:32                   ` Vlad Yasevich
2014-07-09 16:32                     ` Vlad Yasevich
2014-07-09 18:35                     ` Neil Horman
2014-07-09 18:35                       ` Neil Horman
2014-07-10  9:02                       ` David Laight
2014-07-10  9:37                         ` Daniel Borkmann
2014-07-10  9:37                           ` Daniel Borkmann
2014-07-10 10:57                           ` Neil Horman
2014-07-10 10:57                             ` Neil Horman
2014-07-10 19:04                           ` Vlad Yasevich
2014-07-10 19:04                             ` Vlad Yasevich
2014-07-10 10:55                         ` Neil Horman
2014-07-10 10:55                           ` Neil Horman
2014-07-09 16:10                 ` Daniel Borkmann
2014-07-09 16:10                   ` Daniel Borkmann
2014-07-08 21:40 ` David Miller
2014-07-08 21:40   ` David Miller
2014-07-09  7:59   ` Daniel Borkmann
2014-07-09  7:59     ` Daniel Borkmann

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.