All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sctp: Change defaults on cookie hmac selection
@ 2012-12-14 18:51 ` Neil Horman
  0 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2012-12-14 18:51 UTC (permalink / raw)
  To: netdev
  Cc: Neil Horman, David Miller, Linus Torvalds, Vlad Yasevich, linux-sctp

Recently I posted commit 3c68198e75 which made selection of the cookie hmac
algorithm selectable.  This is all well and good, but Linus noted that it
changes the default config:
http://marc.info/?l=linux-netdev&m=135536629004808&w=2

I've modified the sctp Kconfig file to reflect the recommended way of making
this choice, using the thermal driver example specified, and brought the
defaults back into line with the way they were prior to my origional patch

Tested by myself (allbeit fairly quickly).  All configuration combinations seems
to work soundly.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: David Miller <davem@davemloft.net>
CC: Linus Torvalds <torvalds@linux-foundation.org>
CC: Vlad Yasevich <vyasevich@gmail.com>
CC: linux-sctp@vger.kernel.org
---
 net/sctp/Kconfig | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
index a9edd2e..7cd47be 100644
--- a/net/sctp/Kconfig
+++ b/net/sctp/Kconfig
@@ -66,12 +66,31 @@ config SCTP_DBG_OBJCNT
 	  'cat /proc/net/sctp/sctp_dbg_objcnt'
 
 	  If unsure, say N
+choice
+	prompt "Default SCTP cookie HMAC encoding"
+	default SCTP_COOKIE_HMAC_MD5
+	help
+	  This option sets the default sctp cookie hmac algorithm
+	  when in doubt select 'md5'
+
+config SCTP_DEFAULT_COOKIE_HMAC_MD5
+	bool "Enable optional MD5 hmac cookie generation"
+	help
+	  Enable optional MD5 hmac based SCTP cookie generation
+	select SCTP_COOKIE_HMAC_MD5
+
+config SCTP_DEFAULT_COOKIE_HMAC_SHA1
+	bool "Enable optional SHA1 hmac cookie generation"
+	help
+	  Enable optional SHA1 hmac based SCTP cookie generation
+	select SCTP_COOKIE_HMAC_SHA1
+
+endchoice
 
 config SCTP_COOKIE_HMAC_MD5
 	bool "Enable optional MD5 hmac cookie generation"
 	help
 	  Enable optional MD5 hmac based SCTP cookie generation
-	default y
 	select CRYPTO_HMAC if SCTP_COOKIE_HMAC_MD5
 	select CRYPTO_MD5 if SCTP_COOKIE_HMAC_MD5
 
@@ -79,7 +98,6 @@ config SCTP_COOKIE_HMAC_SHA1
 	bool "Enable optional SHA1 hmac cookie generation"
 	help
 	  Enable optional SHA1 hmac based SCTP cookie generation
-	default y
 	select CRYPTO_HMAC if SCTP_COOKIE_HMAC_SHA1
 	select CRYPTO_SHA1 if SCTP_COOKIE_HMAC_SHA1
 
-- 
1.7.11.7

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

* [PATCH] sctp: Change defaults on cookie hmac selection
@ 2012-12-14 18:51 ` Neil Horman
  0 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2012-12-14 18:51 UTC (permalink / raw)
  To: netdev
  Cc: Neil Horman, David Miller, Linus Torvalds, Vlad Yasevich, linux-sctp

Recently I posted commit 3c68198e75 which made selection of the cookie hmac
algorithm selectable.  This is all well and good, but Linus noted that it
changes the default config:
http://marc.info/?l=linux-netdev&m\x135536629004808&w=2

I've modified the sctp Kconfig file to reflect the recommended way of making
this choice, using the thermal driver example specified, and brought the
defaults back into line with the way they were prior to my origional patch

Tested by myself (allbeit fairly quickly).  All configuration combinations seems
to work soundly.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: David Miller <davem@davemloft.net>
CC: Linus Torvalds <torvalds@linux-foundation.org>
CC: Vlad Yasevich <vyasevich@gmail.com>
CC: linux-sctp@vger.kernel.org
---
 net/sctp/Kconfig | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
index a9edd2e..7cd47be 100644
--- a/net/sctp/Kconfig
+++ b/net/sctp/Kconfig
@@ -66,12 +66,31 @@ config SCTP_DBG_OBJCNT
 	  'cat /proc/net/sctp/sctp_dbg_objcnt'
 
 	  If unsure, say N
+choice
+	prompt "Default SCTP cookie HMAC encoding"
+	default SCTP_COOKIE_HMAC_MD5
+	help
+	  This option sets the default sctp cookie hmac algorithm
+	  when in doubt select 'md5'
+
+config SCTP_DEFAULT_COOKIE_HMAC_MD5
+	bool "Enable optional MD5 hmac cookie generation"
+	help
+	  Enable optional MD5 hmac based SCTP cookie generation
+	select SCTP_COOKIE_HMAC_MD5
+
+config SCTP_DEFAULT_COOKIE_HMAC_SHA1
+	bool "Enable optional SHA1 hmac cookie generation"
+	help
+	  Enable optional SHA1 hmac based SCTP cookie generation
+	select SCTP_COOKIE_HMAC_SHA1
+
+endchoice
 
 config SCTP_COOKIE_HMAC_MD5
 	bool "Enable optional MD5 hmac cookie generation"
 	help
 	  Enable optional MD5 hmac based SCTP cookie generation
-	default y
 	select CRYPTO_HMAC if SCTP_COOKIE_HMAC_MD5
 	select CRYPTO_MD5 if SCTP_COOKIE_HMAC_MD5
 
@@ -79,7 +98,6 @@ config SCTP_COOKIE_HMAC_SHA1
 	bool "Enable optional SHA1 hmac cookie generation"
 	help
 	  Enable optional SHA1 hmac based SCTP cookie generation
-	default y
 	select CRYPTO_HMAC if SCTP_COOKIE_HMAC_SHA1
 	select CRYPTO_SHA1 if SCTP_COOKIE_HMAC_SHA1
 
-- 
1.7.11.7


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

* Re: [PATCH] sctp: Change defaults on cookie hmac selection
  2012-12-14 18:51 ` Neil Horman
@ 2012-12-14 20:01   ` Vlad Yasevich
  -1 siblings, 0 replies; 46+ messages in thread
From: Vlad Yasevich @ 2012-12-14 20:01 UTC (permalink / raw)
  To: Neil Horman; +Cc: netdev, David Miller, Linus Torvalds, linux-sctp

On 12/14/2012 01:51 PM, Neil Horman wrote:
> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
> algorithm selectable.  This is all well and good, but Linus noted that it
> changes the default config:
> http://marc.info/?l=linux-netdev&m=135536629004808&w=2
>
> I've modified the sctp Kconfig file to reflect the recommended way of making
> this choice, using the thermal driver example specified, and brought the
> defaults back into line with the way they were prior to my origional patch
>
> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> to work soundly.
>

Just tried it and like how it looks.

Acked-by: Vlad Yasevich <vyasevich@gmail.com>

> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: David Miller <davem@davemloft.net>
> CC: Linus Torvalds <torvalds@linux-foundation.org>
> CC: Vlad Yasevich <vyasevich@gmail.com>
> CC: linux-sctp@vger.kernel.org
> ---
>   net/sctp/Kconfig | 22 ++++++++++++++++++++--
>   1 file changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
> index a9edd2e..7cd47be 100644
> --- a/net/sctp/Kconfig
> +++ b/net/sctp/Kconfig
> @@ -66,12 +66,31 @@ config SCTP_DBG_OBJCNT
>   	  'cat /proc/net/sctp/sctp_dbg_objcnt'
>
>   	  If unsure, say N
> +choice
> +	prompt "Default SCTP cookie HMAC encoding"
> +	default SCTP_COOKIE_HMAC_MD5
> +	help
> +	  This option sets the default sctp cookie hmac algorithm
> +	  when in doubt select 'md5'
> +
> +config SCTP_DEFAULT_COOKIE_HMAC_MD5
> +	bool "Enable optional MD5 hmac cookie generation"
> +	help
> +	  Enable optional MD5 hmac based SCTP cookie generation
> +	select SCTP_COOKIE_HMAC_MD5
> +
> +config SCTP_DEFAULT_COOKIE_HMAC_SHA1
> +	bool "Enable optional SHA1 hmac cookie generation"
> +	help
> +	  Enable optional SHA1 hmac based SCTP cookie generation
> +	select SCTP_COOKIE_HMAC_SHA1
> +
> +endchoice
>
>   config SCTP_COOKIE_HMAC_MD5
>   	bool "Enable optional MD5 hmac cookie generation"
>   	help
>   	  Enable optional MD5 hmac based SCTP cookie generation
> -	default y
>   	select CRYPTO_HMAC if SCTP_COOKIE_HMAC_MD5
>   	select CRYPTO_MD5 if SCTP_COOKIE_HMAC_MD5
>
> @@ -79,7 +98,6 @@ config SCTP_COOKIE_HMAC_SHA1
>   	bool "Enable optional SHA1 hmac cookie generation"
>   	help
>   	  Enable optional SHA1 hmac based SCTP cookie generation
> -	default y
>   	select CRYPTO_HMAC if SCTP_COOKIE_HMAC_SHA1
>   	select CRYPTO_SHA1 if SCTP_COOKIE_HMAC_SHA1
>
>

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

* Re: [PATCH] sctp: Change defaults on cookie hmac selection
@ 2012-12-14 20:01   ` Vlad Yasevich
  0 siblings, 0 replies; 46+ messages in thread
From: Vlad Yasevich @ 2012-12-14 20:01 UTC (permalink / raw)
  To: Neil Horman; +Cc: netdev, David Miller, Linus Torvalds, linux-sctp

On 12/14/2012 01:51 PM, Neil Horman wrote:
> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
> algorithm selectable.  This is all well and good, but Linus noted that it
> changes the default config:
> http://marc.info/?l=linux-netdev&m\x135536629004808&w=2
>
> I've modified the sctp Kconfig file to reflect the recommended way of making
> this choice, using the thermal driver example specified, and brought the
> defaults back into line with the way they were prior to my origional patch
>
> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> to work soundly.
>

Just tried it and like how it looks.

Acked-by: Vlad Yasevich <vyasevich@gmail.com>

> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: David Miller <davem@davemloft.net>
> CC: Linus Torvalds <torvalds@linux-foundation.org>
> CC: Vlad Yasevich <vyasevich@gmail.com>
> CC: linux-sctp@vger.kernel.org
> ---
>   net/sctp/Kconfig | 22 ++++++++++++++++++++--
>   1 file changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
> index a9edd2e..7cd47be 100644
> --- a/net/sctp/Kconfig
> +++ b/net/sctp/Kconfig
> @@ -66,12 +66,31 @@ config SCTP_DBG_OBJCNT
>   	  'cat /proc/net/sctp/sctp_dbg_objcnt'
>
>   	  If unsure, say N
> +choice
> +	prompt "Default SCTP cookie HMAC encoding"
> +	default SCTP_COOKIE_HMAC_MD5
> +	help
> +	  This option sets the default sctp cookie hmac algorithm
> +	  when in doubt select 'md5'
> +
> +config SCTP_DEFAULT_COOKIE_HMAC_MD5
> +	bool "Enable optional MD5 hmac cookie generation"
> +	help
> +	  Enable optional MD5 hmac based SCTP cookie generation
> +	select SCTP_COOKIE_HMAC_MD5
> +
> +config SCTP_DEFAULT_COOKIE_HMAC_SHA1
> +	bool "Enable optional SHA1 hmac cookie generation"
> +	help
> +	  Enable optional SHA1 hmac based SCTP cookie generation
> +	select SCTP_COOKIE_HMAC_SHA1
> +
> +endchoice
>
>   config SCTP_COOKIE_HMAC_MD5
>   	bool "Enable optional MD5 hmac cookie generation"
>   	help
>   	  Enable optional MD5 hmac based SCTP cookie generation
> -	default y
>   	select CRYPTO_HMAC if SCTP_COOKIE_HMAC_MD5
>   	select CRYPTO_MD5 if SCTP_COOKIE_HMAC_MD5
>
> @@ -79,7 +98,6 @@ config SCTP_COOKIE_HMAC_SHA1
>   	bool "Enable optional SHA1 hmac cookie generation"
>   	help
>   	  Enable optional SHA1 hmac based SCTP cookie generation
> -	default y
>   	select CRYPTO_HMAC if SCTP_COOKIE_HMAC_SHA1
>   	select CRYPTO_SHA1 if SCTP_COOKIE_HMAC_SHA1
>
>


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

* Re: [PATCH] sctp: Change defaults on cookie hmac selection
  2012-12-14 18:51 ` Neil Horman
@ 2012-12-14 21:56   ` Linus Torvalds
  -1 siblings, 0 replies; 46+ messages in thread
From: Linus Torvalds @ 2012-12-14 21:56 UTC (permalink / raw)
  To: Neil Horman; +Cc: Network Development, David Miller, Vlad Yasevich, linux-sctp

On Fri, Dec 14, 2012 at 10:51 AM, Neil Horman <nhorman@tuxdriver.com> wrote:
>
> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> to work soundly.

Ok, looks good, but I suspect we should also re-introduce the "none"
choice we used to have.

No?

          Linus

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

* Re: [PATCH] sctp: Change defaults on cookie hmac selection
@ 2012-12-14 21:56   ` Linus Torvalds
  0 siblings, 0 replies; 46+ messages in thread
From: Linus Torvalds @ 2012-12-14 21:56 UTC (permalink / raw)
  To: Neil Horman; +Cc: Network Development, David Miller, Vlad Yasevich, linux-sctp

On Fri, Dec 14, 2012 at 10:51 AM, Neil Horman <nhorman@tuxdriver.com> wrote:
>
> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> to work soundly.

Ok, looks good, but I suspect we should also re-introduce the "none"
choice we used to have.

No?

          Linus

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

* Re: [PATCH] sctp: Change defaults on cookie hmac selection
  2012-12-14 21:56   ` Linus Torvalds
@ 2012-12-15  0:38     ` Neil Horman
  -1 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2012-12-15  0:38 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Network Development, David Miller, Vlad Yasevich, linux-sctp

On Fri, Dec 14, 2012 at 01:56:15PM -0800, Linus Torvalds wrote:
> On Fri, Dec 14, 2012 at 10:51 AM, Neil Horman <nhorman@tuxdriver.com> wrote:
> >
> > Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> > to work soundly.
> 
> Ok, looks good, but I suspect we should also re-introduce the "none"
> choice we used to have.
> 
> No?
> 
No need, I think.  Since its a user configurable choice now, the user can just
set the selector to "None" in proc, and none will be used.

Neil

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

* Re: [PATCH] sctp: Change defaults on cookie hmac selection
@ 2012-12-15  0:38     ` Neil Horman
  0 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2012-12-15  0:38 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Network Development, David Miller, Vlad Yasevich, linux-sctp

On Fri, Dec 14, 2012 at 01:56:15PM -0800, Linus Torvalds wrote:
> On Fri, Dec 14, 2012 at 10:51 AM, Neil Horman <nhorman@tuxdriver.com> wrote:
> >
> > Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> > to work soundly.
> 
> Ok, looks good, but I suspect we should also re-introduce the "none"
> choice we used to have.
> 
> No?
> 
No need, I think.  Since its a user configurable choice now, the user can just
set the selector to "None" in proc, and none will be used.

Neil


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

* Re: [PATCH] sctp: Change defaults on cookie hmac selection
  2012-12-15  0:38     ` Neil Horman
@ 2012-12-15  0:44       ` Linus Torvalds
  -1 siblings, 0 replies; 46+ messages in thread
From: Linus Torvalds @ 2012-12-15  0:44 UTC (permalink / raw)
  To: Neil Horman; +Cc: Network Development, David Miller, Vlad Yasevich, linux-sctp

On Fri, Dec 14, 2012 at 4:38 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
>
> No need, I think.  Since its a user configurable choice now, the user can just
> set the selector to "None" in proc, and none will be used.

Well, by the same logic, there's no point to defaulting to MD5 either,
since the user could just put MD5 in the there.

The point is, if you're asking for a default, you should include the
actual choices, and not limit it to some random subset of choices. No?

             Linus

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

* Re: [PATCH] sctp: Change defaults on cookie hmac selection
@ 2012-12-15  0:44       ` Linus Torvalds
  0 siblings, 0 replies; 46+ messages in thread
From: Linus Torvalds @ 2012-12-15  0:44 UTC (permalink / raw)
  To: Neil Horman; +Cc: Network Development, David Miller, Vlad Yasevich, linux-sctp

On Fri, Dec 14, 2012 at 4:38 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
>
> No need, I think.  Since its a user configurable choice now, the user can just
> set the selector to "None" in proc, and none will be used.

Well, by the same logic, there's no point to defaulting to MD5 either,
since the user could just put MD5 in the there.

The point is, if you're asking for a default, you should include the
actual choices, and not limit it to some random subset of choices. No?

             Linus

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

* Re: [PATCH] sctp: Change defaults on cookie hmac selection
  2012-12-15  0:44       ` Linus Torvalds
@ 2012-12-15  1:12         ` Neil Horman
  -1 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2012-12-15  1:12 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Network Development, David Miller, Vlad Yasevich, linux-sctp

On Fri, Dec 14, 2012 at 04:44:56PM -0800, Linus Torvalds wrote:
> On Fri, Dec 14, 2012 at 4:38 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
> >
> > No need, I think.  Since its a user configurable choice now, the user can just
> > set the selector to "None" in proc, and none will be used.
> 
> Well, by the same logic, there's no point to defaulting to MD5 either,
> since the user could just put MD5 in the there.
> 
> The point is, if you're asking for a default, you should include the
> actual choices, and not limit it to some random subset of choices. No?
> 
>              Linus
> 
Ok, Thats a fair point, I can add a option to choose the "None" option as the
deafult.  Dave, do you want a delta patch, or a new version?
Neil

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

* Re: [PATCH] sctp: Change defaults on cookie hmac selection
@ 2012-12-15  1:12         ` Neil Horman
  0 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2012-12-15  1:12 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Network Development, David Miller, Vlad Yasevich, linux-sctp

On Fri, Dec 14, 2012 at 04:44:56PM -0800, Linus Torvalds wrote:
> On Fri, Dec 14, 2012 at 4:38 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
> >
> > No need, I think.  Since its a user configurable choice now, the user can just
> > set the selector to "None" in proc, and none will be used.
> 
> Well, by the same logic, there's no point to defaulting to MD5 either,
> since the user could just put MD5 in the there.
> 
> The point is, if you're asking for a default, you should include the
> actual choices, and not limit it to some random subset of choices. No?
> 
>              Linus
> 
Ok, Thats a fair point, I can add a option to choose the "None" option as the
deafult.  Dave, do you want a delta patch, or a new version?
Neil


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

* Re: [PATCH] sctp: Change defaults on cookie hmac selection
  2012-12-15  1:12         ` Neil Horman
@ 2012-12-15  1:14           ` David Miller
  -1 siblings, 0 replies; 46+ messages in thread
From: David Miller @ 2012-12-15  1:14 UTC (permalink / raw)
  To: nhorman; +Cc: torvalds, netdev, vyasevich, linux-sctp

From: Neil Horman <nhorman@tuxdriver.com>
Date: Fri, 14 Dec 2012 20:12:29 -0500

> On Fri, Dec 14, 2012 at 04:44:56PM -0800, Linus Torvalds wrote:
>> On Fri, Dec 14, 2012 at 4:38 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
>> >
>> > No need, I think.  Since its a user configurable choice now, the user can just
>> > set the selector to "None" in proc, and none will be used.
>> 
>> Well, by the same logic, there's no point to defaulting to MD5 either,
>> since the user could just put MD5 in the there.
>> 
>> The point is, if you're asking for a default, you should include the
>> actual choices, and not limit it to some random subset of choices. No?
>> 
>>              Linus
>> 
> Ok, Thats a fair point, I can add a option to choose the "None" option as the
> deafult.  Dave, do you want a delta patch, or a new version?

New version please.

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

* Re: [PATCH] sctp: Change defaults on cookie hmac selection
@ 2012-12-15  1:14           ` David Miller
  0 siblings, 0 replies; 46+ messages in thread
From: David Miller @ 2012-12-15  1:14 UTC (permalink / raw)
  To: nhorman; +Cc: torvalds, netdev, vyasevich, linux-sctp

From: Neil Horman <nhorman@tuxdriver.com>
Date: Fri, 14 Dec 2012 20:12:29 -0500

> On Fri, Dec 14, 2012 at 04:44:56PM -0800, Linus Torvalds wrote:
>> On Fri, Dec 14, 2012 at 4:38 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
>> >
>> > No need, I think.  Since its a user configurable choice now, the user can just
>> > set the selector to "None" in proc, and none will be used.
>> 
>> Well, by the same logic, there's no point to defaulting to MD5 either,
>> since the user could just put MD5 in the there.
>> 
>> The point is, if you're asking for a default, you should include the
>> actual choices, and not limit it to some random subset of choices. No?
>> 
>>              Linus
>> 
> Ok, Thats a fair point, I can add a option to choose the "None" option as the
> deafult.  Dave, do you want a delta patch, or a new version?

New version please.

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

* [PATCH v2] sctp: Change defaults on cookie hmac selection
  2012-12-14 18:51 ` Neil Horman
@ 2012-12-15  1:22   ` Neil Horman
  -1 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2012-12-15  1:22 UTC (permalink / raw)
  To: netdev
  Cc: Neil Horman, David Miller, Linus Torvalds, Vlad Yasevich, linux-sctp

Recently I posted commit 3c68198e75 which made selection of the cookie hmac
algorithm selectable.  This is all well and good, but Linus noted that it
changes the default config:
http://marc.info/?l=linux-netdev&m=135536629004808&w=2

I've modified the sctp Kconfig file to reflect the recommended way of making
this choice, using the thermal driver example specified, and brought the
defaults back into line with the way they were prior to my origional patch

Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
algorithm, so we don't needlessly bloat the kernel by forcing a non-none
default.  This also led me to note that we won't honor the default none
condition properly because of how sctp_net_init is encoded.  Fix that up as
well.

Tested by myself (allbeit fairly quickly).  All configuration combinations seems
to work soundly.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: David Miller <davem@davemloft.net>
CC: Linus Torvalds <torvalds@linux-foundation.org>
CC: Vlad Yasevich <vyasevich@gmail.com>
CC: linux-sctp@vger.kernel.org
---
 net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
 net/sctp/protocol.c |  4 ++--
 2 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
index a9edd2e..c262106 100644
--- a/net/sctp/Kconfig
+++ b/net/sctp/Kconfig
@@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
 	  'cat /proc/net/sctp/sctp_dbg_objcnt'
 
 	  If unsure, say N
+choice
+	prompt "Default SCTP cookie HMAC encoding"
+	default SCTP_COOKIE_HMAC_MD5
+	help
+	  This option sets the default sctp cookie hmac algorithm
+	  when in doubt select 'md5'
+
+config SCTP_DEFAULT_COOKIE_HMAC_MD5
+	bool "Enable optional MD5 hmac cookie generation"
+	help
+	  Enable optional MD5 hmac based SCTP cookie generation
+	select SCTP_COOKIE_HMAC_MD5
+
+config SCTP_DEFAULT_COOKIE_HMAC_SHA1
+	bool "Enable optional SHA1 hmac cookie generation"
+	help
+	  Enable optional SHA1 hmac based SCTP cookie generation
+	select SCTP_COOKIE_HMAC_SHA1
+
+config SCTP_DEFAULT_COOKIE_HMAC_NONE
+	bool "Use no hmac alg in SCTP cookie generation"
+	help
+	  Use no hmac algorithm in SCTP cookie generation
+
+endchoice
 
 config SCTP_COOKIE_HMAC_MD5
 	bool "Enable optional MD5 hmac cookie generation"
 	help
 	  Enable optional MD5 hmac based SCTP cookie generation
-	default y
 	select CRYPTO_HMAC if SCTP_COOKIE_HMAC_MD5
 	select CRYPTO_MD5 if SCTP_COOKIE_HMAC_MD5
 
@@ -79,7 +103,6 @@ config SCTP_COOKIE_HMAC_SHA1
 	bool "Enable optional SHA1 hmac cookie generation"
 	help
 	  Enable optional SHA1 hmac based SCTP cookie generation
-	default y
 	select CRYPTO_HMAC if SCTP_COOKIE_HMAC_SHA1
 	select CRYPTO_SHA1 if SCTP_COOKIE_HMAC_SHA1
 
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 2c7785b..f898b1c 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1191,9 +1191,9 @@ static int __net_init sctp_net_init(struct net *net)
 	net->sctp.cookie_preserve_enable 	= 1;
 
 	/* Default sctp sockets to use md5 as their hmac alg */
-#if defined (CONFIG_CRYPTO_MD5)
+#if defined (CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5)
 	net->sctp.sctp_hmac_alg			= "md5";
-#elif defined (CONFIG_CRYPTO_SHA1)
+#elif defined (CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1)
 	net->sctp.sctp_hmac_alg			= "sha1";
 #else
 	net->sctp.sctp_hmac_alg			= NULL;
-- 
1.7.11.7

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

* [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2012-12-15  1:22   ` Neil Horman
  0 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2012-12-15  1:22 UTC (permalink / raw)
  To: netdev
  Cc: Neil Horman, David Miller, Linus Torvalds, Vlad Yasevich, linux-sctp

Recently I posted commit 3c68198e75 which made selection of the cookie hmac
algorithm selectable.  This is all well and good, but Linus noted that it
changes the default config:
http://marc.info/?l=linux-netdev&m\x135536629004808&w=2

I've modified the sctp Kconfig file to reflect the recommended way of making
this choice, using the thermal driver example specified, and brought the
defaults back into line with the way they were prior to my origional patch

Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
algorithm, so we don't needlessly bloat the kernel by forcing a non-none
default.  This also led me to note that we won't honor the default none
condition properly because of how sctp_net_init is encoded.  Fix that up as
well.

Tested by myself (allbeit fairly quickly).  All configuration combinations seems
to work soundly.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: David Miller <davem@davemloft.net>
CC: Linus Torvalds <torvalds@linux-foundation.org>
CC: Vlad Yasevich <vyasevich@gmail.com>
CC: linux-sctp@vger.kernel.org
---
 net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
 net/sctp/protocol.c |  4 ++--
 2 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
index a9edd2e..c262106 100644
--- a/net/sctp/Kconfig
+++ b/net/sctp/Kconfig
@@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
 	  'cat /proc/net/sctp/sctp_dbg_objcnt'
 
 	  If unsure, say N
+choice
+	prompt "Default SCTP cookie HMAC encoding"
+	default SCTP_COOKIE_HMAC_MD5
+	help
+	  This option sets the default sctp cookie hmac algorithm
+	  when in doubt select 'md5'
+
+config SCTP_DEFAULT_COOKIE_HMAC_MD5
+	bool "Enable optional MD5 hmac cookie generation"
+	help
+	  Enable optional MD5 hmac based SCTP cookie generation
+	select SCTP_COOKIE_HMAC_MD5
+
+config SCTP_DEFAULT_COOKIE_HMAC_SHA1
+	bool "Enable optional SHA1 hmac cookie generation"
+	help
+	  Enable optional SHA1 hmac based SCTP cookie generation
+	select SCTP_COOKIE_HMAC_SHA1
+
+config SCTP_DEFAULT_COOKIE_HMAC_NONE
+	bool "Use no hmac alg in SCTP cookie generation"
+	help
+	  Use no hmac algorithm in SCTP cookie generation
+
+endchoice
 
 config SCTP_COOKIE_HMAC_MD5
 	bool "Enable optional MD5 hmac cookie generation"
 	help
 	  Enable optional MD5 hmac based SCTP cookie generation
-	default y
 	select CRYPTO_HMAC if SCTP_COOKIE_HMAC_MD5
 	select CRYPTO_MD5 if SCTP_COOKIE_HMAC_MD5
 
@@ -79,7 +103,6 @@ config SCTP_COOKIE_HMAC_SHA1
 	bool "Enable optional SHA1 hmac cookie generation"
 	help
 	  Enable optional SHA1 hmac based SCTP cookie generation
-	default y
 	select CRYPTO_HMAC if SCTP_COOKIE_HMAC_SHA1
 	select CRYPTO_SHA1 if SCTP_COOKIE_HMAC_SHA1
 
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 2c7785b..f898b1c 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1191,9 +1191,9 @@ static int __net_init sctp_net_init(struct net *net)
 	net->sctp.cookie_preserve_enable 	= 1;
 
 	/* Default sctp sockets to use md5 as their hmac alg */
-#if defined (CONFIG_CRYPTO_MD5)
+#if defined (CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5)
 	net->sctp.sctp_hmac_alg			= "md5";
-#elif defined (CONFIG_CRYPTO_SHA1)
+#elif defined (CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1)
 	net->sctp.sctp_hmac_alg			= "sha1";
 #else
 	net->sctp.sctp_hmac_alg			= NULL;
-- 
1.7.11.7


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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2012-12-15  1:22   ` Neil Horman
@ 2012-12-16  1:16     ` David Miller
  -1 siblings, 0 replies; 46+ messages in thread
From: David Miller @ 2012-12-16  1:16 UTC (permalink / raw)
  To: nhorman; +Cc: netdev, torvalds, vyasevich, linux-sctp

From: Neil Horman <nhorman@tuxdriver.com>
Date: Fri, 14 Dec 2012 20:22:01 -0500

> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
> algorithm selectable.  This is all well and good, but Linus noted that it
> changes the default config:
> http://marc.info/?l=linux-netdev&m=135536629004808&w=2
> 
> I've modified the sctp Kconfig file to reflect the recommended way of making
> this choice, using the thermal driver example specified, and brought the
> defaults back into line with the way they were prior to my origional patch
> 
> Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
> algorithm, so we don't needlessly bloat the kernel by forcing a non-none
> default.  This also led me to note that we won't honor the default none
> condition properly because of how sctp_net_init is encoded.  Fix that up as
> well.
> 
> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> to work soundly.
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>

Applied.

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2012-12-16  1:16     ` David Miller
  0 siblings, 0 replies; 46+ messages in thread
From: David Miller @ 2012-12-16  1:16 UTC (permalink / raw)
  To: nhorman; +Cc: netdev, torvalds, vyasevich, linux-sctp

From: Neil Horman <nhorman@tuxdriver.com>
Date: Fri, 14 Dec 2012 20:22:01 -0500

> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
> algorithm selectable.  This is all well and good, but Linus noted that it
> changes the default config:
> http://marc.info/?l=linux-netdev&m\x135536629004808&w=2
> 
> I've modified the sctp Kconfig file to reflect the recommended way of making
> this choice, using the thermal driver example specified, and brought the
> defaults back into line with the way they were prior to my origional patch
> 
> Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
> algorithm, so we don't needlessly bloat the kernel by forcing a non-none
> default.  This also led me to note that we won't honor the default none
> condition properly because of how sctp_net_init is encoded.  Fix that up as
> well.
> 
> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> to work soundly.
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>

Applied.

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2012-12-15  1:22   ` Neil Horman
@ 2013-01-07 13:25     ` Florian Fainelli
  -1 siblings, 0 replies; 46+ messages in thread
From: Florian Fainelli @ 2013-01-07 13:25 UTC (permalink / raw)
  To: Neil Horman
  Cc: netdev, David Miller, Linus Torvalds, Vlad Yasevich, linux-sctp

Hello Neil,

Le 12/15/12 02:22, Neil Horman a écrit :
> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
> algorithm selectable.  This is all well and good, but Linus noted that it
> changes the default config:
> http://marc.info/?l=linux-netdev&m=135536629004808&w=2
>
> I've modified the sctp Kconfig file to reflect the recommended way of making
> this choice, using the thermal driver example specified, and brought the
> defaults back into line with the way they were prior to my origional patch
>
> Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
> algorithm, so we don't needlessly bloat the kernel by forcing a non-none
> default.  This also led me to note that we won't honor the default none
> condition properly because of how sctp_net_init is encoded.  Fix that up as
> well.
>
> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> to work soundly.
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: David Miller <davem@davemloft.net>
> CC: Linus Torvalds <torvalds@linux-foundation.org>
> CC: Vlad Yasevich <vyasevich@gmail.com>
> CC: linux-sctp@vger.kernel.org
> ---
>   net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
>   net/sctp/protocol.c |  4 ++--
>   2 files changed, 27 insertions(+), 4 deletions(-)
>
> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
> index a9edd2e..c262106 100644
> --- a/net/sctp/Kconfig
> +++ b/net/sctp/Kconfig
> @@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
>   	  'cat /proc/net/sctp/sctp_dbg_objcnt'
>
>   	  If unsure, say N
> +choice
> +	prompt "Default SCTP cookie HMAC encoding"
> +	default SCTP_COOKIE_HMAC_MD5

Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to update 
to 3.8-rc2, and I usually build my kernel-headers with:

yes '' | ARCH=foo make oldconfig

and this just kept asking me for this config symbol because none could 
be provided.
--
Florian

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-07 13:25     ` Florian Fainelli
  0 siblings, 0 replies; 46+ messages in thread
From: Florian Fainelli @ 2013-01-07 13:25 UTC (permalink / raw)
  To: Neil Horman
  Cc: netdev, David Miller, Linus Torvalds, Vlad Yasevich, linux-sctp

Hello Neil,

Le 12/15/12 02:22, Neil Horman a écrit :
> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
> algorithm selectable.  This is all well and good, but Linus noted that it
> changes the default config:
> http://marc.info/?l=linux-netdev&m\x135536629004808&w=2
>
> I've modified the sctp Kconfig file to reflect the recommended way of making
> this choice, using the thermal driver example specified, and brought the
> defaults back into line with the way they were prior to my origional patch
>
> Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
> algorithm, so we don't needlessly bloat the kernel by forcing a non-none
> default.  This also led me to note that we won't honor the default none
> condition properly because of how sctp_net_init is encoded.  Fix that up as
> well.
>
> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> to work soundly.
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: David Miller <davem@davemloft.net>
> CC: Linus Torvalds <torvalds@linux-foundation.org>
> CC: Vlad Yasevich <vyasevich@gmail.com>
> CC: linux-sctp@vger.kernel.org
> ---
>   net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
>   net/sctp/protocol.c |  4 ++--
>   2 files changed, 27 insertions(+), 4 deletions(-)
>
> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
> index a9edd2e..c262106 100644
> --- a/net/sctp/Kconfig
> +++ b/net/sctp/Kconfig
> @@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
>   	  'cat /proc/net/sctp/sctp_dbg_objcnt'
>
>   	  If unsure, say N
> +choice
> +	prompt "Default SCTP cookie HMAC encoding"
> +	default SCTP_COOKIE_HMAC_MD5

Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to update 
to 3.8-rc2, and I usually build my kernel-headers with:

yes '' | ARCH=foo make oldconfig

and this just kept asking me for this config symbol because none could 
be provided.
--
Florian

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-07 13:25     ` Florian Fainelli
@ 2013-01-07 14:49       ` Neil Horman
  -1 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2013-01-07 14:49 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, David Miller, Linus Torvalds, Vlad Yasevich, linux-sctp

On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
> Hello Neil,
> 
> Le 12/15/12 02:22, Neil Horman a écrit :
> >Recently I posted commit 3c68198e75 which made selection of the cookie hmac
> >algorithm selectable.  This is all well and good, but Linus noted that it
> >changes the default config:
> >http://marc.info/?l=linux-netdev&m=135536629004808&w=2
> >
> >I've modified the sctp Kconfig file to reflect the recommended way of making
> >this choice, using the thermal driver example specified, and brought the
> >defaults back into line with the way they were prior to my origional patch
> >
> >Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
> >algorithm, so we don't needlessly bloat the kernel by forcing a non-none
> >default.  This also led me to note that we won't honor the default none
> >condition properly because of how sctp_net_init is encoded.  Fix that up as
> >well.
> >
> >Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> >to work soundly.
> >
> >Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> >CC: David Miller <davem@davemloft.net>
> >CC: Linus Torvalds <torvalds@linux-foundation.org>
> >CC: Vlad Yasevich <vyasevich@gmail.com>
> >CC: linux-sctp@vger.kernel.org
> >---
> >  net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
> >  net/sctp/protocol.c |  4 ++--
> >  2 files changed, 27 insertions(+), 4 deletions(-)
> >
> >diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
> >index a9edd2e..c262106 100644
> >--- a/net/sctp/Kconfig
> >+++ b/net/sctp/Kconfig
> >@@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
> >  	  'cat /proc/net/sctp/sctp_dbg_objcnt'
> >
> >  	  If unsure, say N
> >+choice
> >+	prompt "Default SCTP cookie HMAC encoding"
> >+	default SCTP_COOKIE_HMAC_MD5
> 
> Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
> update to 3.8-rc2, and I usually build my kernel-headers with:
> 
> yes '' | ARCH=foo make oldconfig
> 
> and this just kept asking me for this config symbol because none
> could be provided.
> --
> Florian
> 

No, the config mechanism is setup to offer the user the ability to choose a
default cookie hmac, alg, then optionally select any other hmac algs you would
like to be made available (in the event you want to change the default at run
time).  When you select the default, it eables (via the select directive), the
corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
then prompts for the remaining values.

Neil

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-07 14:49       ` Neil Horman
  0 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2013-01-07 14:49 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, David Miller, Linus Torvalds, Vlad Yasevich, linux-sctp

On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
> Hello Neil,
> 
> Le 12/15/12 02:22, Neil Horman a écrit :
> >Recently I posted commit 3c68198e75 which made selection of the cookie hmac
> >algorithm selectable.  This is all well and good, but Linus noted that it
> >changes the default config:
> >http://marc.info/?l=linux-netdev&m\x135536629004808&w=2
> >
> >I've modified the sctp Kconfig file to reflect the recommended way of making
> >this choice, using the thermal driver example specified, and brought the
> >defaults back into line with the way they were prior to my origional patch
> >
> >Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
> >algorithm, so we don't needlessly bloat the kernel by forcing a non-none
> >default.  This also led me to note that we won't honor the default none
> >condition properly because of how sctp_net_init is encoded.  Fix that up as
> >well.
> >
> >Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> >to work soundly.
> >
> >Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> >CC: David Miller <davem@davemloft.net>
> >CC: Linus Torvalds <torvalds@linux-foundation.org>
> >CC: Vlad Yasevich <vyasevich@gmail.com>
> >CC: linux-sctp@vger.kernel.org
> >---
> >  net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
> >  net/sctp/protocol.c |  4 ++--
> >  2 files changed, 27 insertions(+), 4 deletions(-)
> >
> >diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
> >index a9edd2e..c262106 100644
> >--- a/net/sctp/Kconfig
> >+++ b/net/sctp/Kconfig
> >@@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
> >  	  'cat /proc/net/sctp/sctp_dbg_objcnt'
> >
> >  	  If unsure, say N
> >+choice
> >+	prompt "Default SCTP cookie HMAC encoding"
> >+	default SCTP_COOKIE_HMAC_MD5
> 
> Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
> update to 3.8-rc2, and I usually build my kernel-headers with:
> 
> yes '' | ARCH=foo make oldconfig
> 
> and this just kept asking me for this config symbol because none
> could be provided.
> --
> Florian
> 

No, the config mechanism is setup to offer the user the ability to choose a
default cookie hmac, alg, then optionally select any other hmac algs you would
like to be made available (in the event you want to change the default at run
time).  When you select the default, it eables (via the select directive), the
corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
then prompts for the remaining values.

Neil


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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-07 14:49       ` Neil Horman
@ 2013-01-07 15:15         ` Florian Fainelli
  -1 siblings, 0 replies; 46+ messages in thread
From: Florian Fainelli @ 2013-01-07 15:15 UTC (permalink / raw)
  To: Neil Horman
  Cc: netdev, David Miller, Linus Torvalds, Vlad Yasevich, linux-sctp

Le 01/07/13 15:49, Neil Horman a écrit :
> On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
>> Hello Neil,
>>
>> Le 12/15/12 02:22, Neil Horman a écrit :
>>> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
>>> algorithm selectable.  This is all well and good, but Linus noted that it
>>> changes the default config:
>>> http://marc.info/?l=linux-netdev&m=135536629004808&w=2
>>>
>>> I've modified the sctp Kconfig file to reflect the recommended way of making
>>> this choice, using the thermal driver example specified, and brought the
>>> defaults back into line with the way they were prior to my origional patch
>>>
>>> Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
>>> algorithm, so we don't needlessly bloat the kernel by forcing a non-none
>>> default.  This also led me to note that we won't honor the default none
>>> condition properly because of how sctp_net_init is encoded.  Fix that up as
>>> well.
>>>
>>> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
>>> to work soundly.
>>>
>>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>>> CC: David Miller <davem@davemloft.net>
>>> CC: Linus Torvalds <torvalds@linux-foundation.org>
>>> CC: Vlad Yasevich <vyasevich@gmail.com>
>>> CC: linux-sctp@vger.kernel.org
>>> ---
>>>   net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
>>>   net/sctp/protocol.c |  4 ++--
>>>   2 files changed, 27 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
>>> index a9edd2e..c262106 100644
>>> --- a/net/sctp/Kconfig
>>> +++ b/net/sctp/Kconfig
>>> @@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
>>>   	  'cat /proc/net/sctp/sctp_dbg_objcnt'
>>>
>>>   	  If unsure, say N
>>> +choice
>>> +	prompt "Default SCTP cookie HMAC encoding"
>>> +	default SCTP_COOKIE_HMAC_MD5
>> Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
>> update to 3.8-rc2, and I usually build my kernel-headers with:
>>
>> yes '' | ARCH=foo make oldconfig
>>
>> and this just kept asking me for this config symbol because none
>> could be provided.
>> --
>> Florian
>>
> No, the config mechanism is setup to offer the user the ability to choose a
> default cookie hmac, alg, then optionally select any other hmac algs you would
> like to be made available (in the event you want to change the default at run
> time).  When you select the default, it eables (via the select directive), the
> corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
> then prompts for the remaining values.

Ok for the explanation, but this still breaks an oldconfig because we do 
not actually propose the user with a default choice:

     choice[1-3?]:     Default SCTP cookie HMAC encoding
       1. Enable optional MD5 hmac cookie generation 
(SCTP_DEFAULT_COOKIE_HMAC_MD5) (NEW)
       2. Enable optional SHA1 hmac cookie generation 
(SCTP_DEFAULT_COOKIE_HMAC_SHA1) (NEW)
       3. Use no hmac alg in SCTP cookie generation 
(SCTP_DEFAULT_COOKIE_HMAC_NONE) (NEW)

I do not see any difference in what I am proposed if the default config 
symbol is SCTP_DEFAULT_COOKIE_HMAC_MD5, I can still optionally choose 
SHA1 to be supported, and I do have a valid default config for this 
choice. While if I keep SCTP_COOKIE_HMAC_MD5 as the default I have to 
manually enter which option I want.
--
Florian

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-07 15:15         ` Florian Fainelli
  0 siblings, 0 replies; 46+ messages in thread
From: Florian Fainelli @ 2013-01-07 15:15 UTC (permalink / raw)
  To: Neil Horman
  Cc: netdev, David Miller, Linus Torvalds, Vlad Yasevich, linux-sctp

Le 01/07/13 15:49, Neil Horman a écrit :
> On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
>> Hello Neil,
>>
>> Le 12/15/12 02:22, Neil Horman a écrit :
>>> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
>>> algorithm selectable.  This is all well and good, but Linus noted that it
>>> changes the default config:
>>> http://marc.info/?l=linux-netdev&m\x135536629004808&w=2
>>>
>>> I've modified the sctp Kconfig file to reflect the recommended way of making
>>> this choice, using the thermal driver example specified, and brought the
>>> defaults back into line with the way they were prior to my origional patch
>>>
>>> Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
>>> algorithm, so we don't needlessly bloat the kernel by forcing a non-none
>>> default.  This also led me to note that we won't honor the default none
>>> condition properly because of how sctp_net_init is encoded.  Fix that up as
>>> well.
>>>
>>> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
>>> to work soundly.
>>>
>>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>>> CC: David Miller <davem@davemloft.net>
>>> CC: Linus Torvalds <torvalds@linux-foundation.org>
>>> CC: Vlad Yasevich <vyasevich@gmail.com>
>>> CC: linux-sctp@vger.kernel.org
>>> ---
>>>   net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
>>>   net/sctp/protocol.c |  4 ++--
>>>   2 files changed, 27 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
>>> index a9edd2e..c262106 100644
>>> --- a/net/sctp/Kconfig
>>> +++ b/net/sctp/Kconfig
>>> @@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
>>>   	  'cat /proc/net/sctp/sctp_dbg_objcnt'
>>>
>>>   	  If unsure, say N
>>> +choice
>>> +	prompt "Default SCTP cookie HMAC encoding"
>>> +	default SCTP_COOKIE_HMAC_MD5
>> Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
>> update to 3.8-rc2, and I usually build my kernel-headers with:
>>
>> yes '' | ARCH=foo make oldconfig
>>
>> and this just kept asking me for this config symbol because none
>> could be provided.
>> --
>> Florian
>>
> No, the config mechanism is setup to offer the user the ability to choose a
> default cookie hmac, alg, then optionally select any other hmac algs you would
> like to be made available (in the event you want to change the default at run
> time).  When you select the default, it eables (via the select directive), the
> corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
> then prompts for the remaining values.

Ok for the explanation, but this still breaks an oldconfig because we do 
not actually propose the user with a default choice:

     choice[1-3?]:     Default SCTP cookie HMAC encoding
       1. Enable optional MD5 hmac cookie generation 
(SCTP_DEFAULT_COOKIE_HMAC_MD5) (NEW)
       2. Enable optional SHA1 hmac cookie generation 
(SCTP_DEFAULT_COOKIE_HMAC_SHA1) (NEW)
       3. Use no hmac alg in SCTP cookie generation 
(SCTP_DEFAULT_COOKIE_HMAC_NONE) (NEW)

I do not see any difference in what I am proposed if the default config 
symbol is SCTP_DEFAULT_COOKIE_HMAC_MD5, I can still optionally choose 
SHA1 to be supported, and I do have a valid default config for this 
choice. While if I keep SCTP_COOKIE_HMAC_MD5 as the default I have to 
manually enter which option I want.
--
Florian

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-07 14:49       ` Neil Horman
@ 2013-01-07 15:32         ` Vlad Yasevich
  -1 siblings, 0 replies; 46+ messages in thread
From: Vlad Yasevich @ 2013-01-07 15:32 UTC (permalink / raw)
  To: Neil Horman
  Cc: Florian Fainelli, netdev, David Miller, Linus Torvalds, linux-sctp

On 01/07/2013 09:49 AM, Neil Horman wrote:
> On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
>> Hello Neil,
>>
>> Le 12/15/12 02:22, Neil Horman a écrit :
>>> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
>>> algorithm selectable.  This is all well and good, but Linus noted that it
>>> changes the default config:
>>> http://marc.info/?l=linux-netdev&m=135536629004808&w=2
>>>
>>> I've modified the sctp Kconfig file to reflect the recommended way of making
>>> this choice, using the thermal driver example specified, and brought the
>>> defaults back into line with the way they were prior to my origional patch
>>>
>>> Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
>>> algorithm, so we don't needlessly bloat the kernel by forcing a non-none
>>> default.  This also led me to note that we won't honor the default none
>>> condition properly because of how sctp_net_init is encoded.  Fix that up as
>>> well.
>>>
>>> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
>>> to work soundly.
>>>
>>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>>> CC: David Miller <davem@davemloft.net>
>>> CC: Linus Torvalds <torvalds@linux-foundation.org>
>>> CC: Vlad Yasevich <vyasevich@gmail.com>
>>> CC: linux-sctp@vger.kernel.org
>>> ---
>>>   net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
>>>   net/sctp/protocol.c |  4 ++--
>>>   2 files changed, 27 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
>>> index a9edd2e..c262106 100644
>>> --- a/net/sctp/Kconfig
>>> +++ b/net/sctp/Kconfig
>>> @@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
>>>   	  'cat /proc/net/sctp/sctp_dbg_objcnt'
>>>
>>>   	  If unsure, say N
>>> +choice
>>> +	prompt "Default SCTP cookie HMAC encoding"
>>> +	default SCTP_COOKIE_HMAC_MD5
>>
>> Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
>> update to 3.8-rc2, and I usually build my kernel-headers with:
>>
>> yes '' | ARCH=foo make oldconfig
>>
>> and this just kept asking me for this config symbol because none
>> could be provided.
>> --
>> Florian
>>
>
> No, the config mechanism is setup to offer the user the ability to choose a
> default cookie hmac, alg, then optionally select any other hmac algs you would
> like to be made available (in the event you want to change the default at run
> time).  When you select the default, it eables (via the select directive), the
> corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
> then prompts for the remaining values.
>

Neil

Actually, I think it should be as Florian suggests.  The default value 
of the choice should be one of the values defined as part of the choice 
(the SCTP_DEFAULT_COOKIE_*).  Turning on appropriate default would turn 
on appropriate cookie config (SCTP_COOKIE_HMAC_*).

Would that save all the config trouble?

-vlad

> Neil
>

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-07 15:32         ` Vlad Yasevich
  0 siblings, 0 replies; 46+ messages in thread
From: Vlad Yasevich @ 2013-01-07 15:32 UTC (permalink / raw)
  To: Neil Horman
  Cc: Florian Fainelli, netdev, David Miller, Linus Torvalds, linux-sctp

On 01/07/2013 09:49 AM, Neil Horman wrote:
> On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
>> Hello Neil,
>>
>> Le 12/15/12 02:22, Neil Horman a écrit :
>>> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
>>> algorithm selectable.  This is all well and good, but Linus noted that it
>>> changes the default config:
>>> http://marc.info/?l=linux-netdev&m\x135536629004808&w=2
>>>
>>> I've modified the sctp Kconfig file to reflect the recommended way of making
>>> this choice, using the thermal driver example specified, and brought the
>>> defaults back into line with the way they were prior to my origional patch
>>>
>>> Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
>>> algorithm, so we don't needlessly bloat the kernel by forcing a non-none
>>> default.  This also led me to note that we won't honor the default none
>>> condition properly because of how sctp_net_init is encoded.  Fix that up as
>>> well.
>>>
>>> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
>>> to work soundly.
>>>
>>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>>> CC: David Miller <davem@davemloft.net>
>>> CC: Linus Torvalds <torvalds@linux-foundation.org>
>>> CC: Vlad Yasevich <vyasevich@gmail.com>
>>> CC: linux-sctp@vger.kernel.org
>>> ---
>>>   net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
>>>   net/sctp/protocol.c |  4 ++--
>>>   2 files changed, 27 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
>>> index a9edd2e..c262106 100644
>>> --- a/net/sctp/Kconfig
>>> +++ b/net/sctp/Kconfig
>>> @@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
>>>   	  'cat /proc/net/sctp/sctp_dbg_objcnt'
>>>
>>>   	  If unsure, say N
>>> +choice
>>> +	prompt "Default SCTP cookie HMAC encoding"
>>> +	default SCTP_COOKIE_HMAC_MD5
>>
>> Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
>> update to 3.8-rc2, and I usually build my kernel-headers with:
>>
>> yes '' | ARCH=foo make oldconfig
>>
>> and this just kept asking me for this config symbol because none
>> could be provided.
>> --
>> Florian
>>
>
> No, the config mechanism is setup to offer the user the ability to choose a
> default cookie hmac, alg, then optionally select any other hmac algs you would
> like to be made available (in the event you want to change the default at run
> time).  When you select the default, it eables (via the select directive), the
> corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
> then prompts for the remaining values.
>

Neil

Actually, I think it should be as Florian suggests.  The default value 
of the choice should be one of the values defined as part of the choice 
(the SCTP_DEFAULT_COOKIE_*).  Turning on appropriate default would turn 
on appropriate cookie config (SCTP_COOKIE_HMAC_*).

Would that save all the config trouble?

-vlad

> Neil
>


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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-07 15:15         ` Florian Fainelli
@ 2013-01-07 15:38           ` Neil Horman
  -1 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2013-01-07 15:38 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, David Miller, Linus Torvalds, Vlad Yasevich, linux-sctp

On Mon, Jan 07, 2013 at 04:15:24PM +0100, Florian Fainelli wrote:
> Le 01/07/13 15:49, Neil Horman a écrit :
> >On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
> >>Hello Neil,
> >>
> >>Le 12/15/12 02:22, Neil Horman a écrit :
> >>>Recently I posted commit 3c68198e75 which made selection of the cookie hmac
> >>>algorithm selectable.  This is all well and good, but Linus noted that it
> >>>changes the default config:
> >>>http://marc.info/?l=linux-netdev&m=135536629004808&w=2
> >>>
> >>>I've modified the sctp Kconfig file to reflect the recommended way of making
> >>>this choice, using the thermal driver example specified, and brought the
> >>>defaults back into line with the way they were prior to my origional patch
> >>>
> >>>Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
> >>>algorithm, so we don't needlessly bloat the kernel by forcing a non-none
> >>>default.  This also led me to note that we won't honor the default none
> >>>condition properly because of how sctp_net_init is encoded.  Fix that up as
> >>>well.
> >>>
> >>>Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> >>>to work soundly.
> >>>
> >>>Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> >>>CC: David Miller <davem@davemloft.net>
> >>>CC: Linus Torvalds <torvalds@linux-foundation.org>
> >>>CC: Vlad Yasevich <vyasevich@gmail.com>
> >>>CC: linux-sctp@vger.kernel.org
> >>>---
> >>>  net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
> >>>  net/sctp/protocol.c |  4 ++--
> >>>  2 files changed, 27 insertions(+), 4 deletions(-)
> >>>
> >>>diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
> >>>index a9edd2e..c262106 100644
> >>>--- a/net/sctp/Kconfig
> >>>+++ b/net/sctp/Kconfig
> >>>@@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
> >>>  	  'cat /proc/net/sctp/sctp_dbg_objcnt'
> >>>
> >>>  	  If unsure, say N
> >>>+choice
> >>>+	prompt "Default SCTP cookie HMAC encoding"
> >>>+	default SCTP_COOKIE_HMAC_MD5
> >>Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
> >>update to 3.8-rc2, and I usually build my kernel-headers with:
> >>
> >>yes '' | ARCH=foo make oldconfig
> >>
> >>and this just kept asking me for this config symbol because none
> >>could be provided.
> >>--
> >>Florian
> >>
> >No, the config mechanism is setup to offer the user the ability to choose a
> >default cookie hmac, alg, then optionally select any other hmac algs you would
> >like to be made available (in the event you want to change the default at run
> >time).  When you select the default, it eables (via the select directive), the
> >corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
> >then prompts for the remaining values.
> 
> Ok for the explanation, but this still breaks an oldconfig because
> we do not actually propose the user with a default choice:
> 
>     choice[1-3?]:     Default SCTP cookie HMAC encoding
>       1. Enable optional MD5 hmac cookie generation
> (SCTP_DEFAULT_COOKIE_HMAC_MD5) (NEW)
>       2. Enable optional SHA1 hmac cookie generation
> (SCTP_DEFAULT_COOKIE_HMAC_SHA1) (NEW)
>       3. Use no hmac alg in SCTP cookie generation
> (SCTP_DEFAULT_COOKIE_HMAC_NONE) (NEW)
> 
> I do not see any difference in what I am proposed if the default
> config symbol is SCTP_DEFAULT_COOKIE_HMAC_MD5, I can still
> optionally choose SHA1 to be supported, and I do have a valid
> default config for this choice. While if I keep SCTP_COOKIE_HMAC_MD5
No, thats the problem, your old config is no longer valid with this new Kconfig
file.  Your config is telling the config utility that you want your default
Cookie hmac to be MD5, but you've explicitly told it (via your yes "" | make
oldconfig command), that you want SCTP_COOKIE_HMAC_MD5 to be disabled, so the
config utility is left with no choice to prompt you again for a default hmac,
which your command answers again by saying SCTP_DEFAULT_COOKIE_HMAC_MD5 (the
default choice of 1).  Thats your loop, you keep telling the config utility that
you both want the default hmac to be md5, and that you don't want to allow md5
to be an available hmac alg.  

Thats not a bug.  I'm sorry if your old configuration needs manual updating, but
there are no guarantees that old configurations will 'just work' in perpituity.

Neil

> as the default I have to manually enter which option I want.
> --
> Florian
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" 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] 46+ messages in thread

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-07 15:38           ` Neil Horman
  0 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2013-01-07 15:38 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, David Miller, Linus Torvalds, Vlad Yasevich, linux-sctp

On Mon, Jan 07, 2013 at 04:15:24PM +0100, Florian Fainelli wrote:
> Le 01/07/13 15:49, Neil Horman a écrit :
> >On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
> >>Hello Neil,
> >>
> >>Le 12/15/12 02:22, Neil Horman a écrit :
> >>>Recently I posted commit 3c68198e75 which made selection of the cookie hmac
> >>>algorithm selectable.  This is all well and good, but Linus noted that it
> >>>changes the default config:
> >>>http://marc.info/?l=linux-netdev&m\x135536629004808&w=2
> >>>
> >>>I've modified the sctp Kconfig file to reflect the recommended way of making
> >>>this choice, using the thermal driver example specified, and brought the
> >>>defaults back into line with the way they were prior to my origional patch
> >>>
> >>>Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
> >>>algorithm, so we don't needlessly bloat the kernel by forcing a non-none
> >>>default.  This also led me to note that we won't honor the default none
> >>>condition properly because of how sctp_net_init is encoded.  Fix that up as
> >>>well.
> >>>
> >>>Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> >>>to work soundly.
> >>>
> >>>Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> >>>CC: David Miller <davem@davemloft.net>
> >>>CC: Linus Torvalds <torvalds@linux-foundation.org>
> >>>CC: Vlad Yasevich <vyasevich@gmail.com>
> >>>CC: linux-sctp@vger.kernel.org
> >>>---
> >>>  net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
> >>>  net/sctp/protocol.c |  4 ++--
> >>>  2 files changed, 27 insertions(+), 4 deletions(-)
> >>>
> >>>diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
> >>>index a9edd2e..c262106 100644
> >>>--- a/net/sctp/Kconfig
> >>>+++ b/net/sctp/Kconfig
> >>>@@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
> >>>  	  'cat /proc/net/sctp/sctp_dbg_objcnt'
> >>>
> >>>  	  If unsure, say N
> >>>+choice
> >>>+	prompt "Default SCTP cookie HMAC encoding"
> >>>+	default SCTP_COOKIE_HMAC_MD5
> >>Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
> >>update to 3.8-rc2, and I usually build my kernel-headers with:
> >>
> >>yes '' | ARCH=foo make oldconfig
> >>
> >>and this just kept asking me for this config symbol because none
> >>could be provided.
> >>--
> >>Florian
> >>
> >No, the config mechanism is setup to offer the user the ability to choose a
> >default cookie hmac, alg, then optionally select any other hmac algs you would
> >like to be made available (in the event you want to change the default at run
> >time).  When you select the default, it eables (via the select directive), the
> >corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
> >then prompts for the remaining values.
> 
> Ok for the explanation, but this still breaks an oldconfig because
> we do not actually propose the user with a default choice:
> 
>     choice[1-3?]:     Default SCTP cookie HMAC encoding
>       1. Enable optional MD5 hmac cookie generation
> (SCTP_DEFAULT_COOKIE_HMAC_MD5) (NEW)
>       2. Enable optional SHA1 hmac cookie generation
> (SCTP_DEFAULT_COOKIE_HMAC_SHA1) (NEW)
>       3. Use no hmac alg in SCTP cookie generation
> (SCTP_DEFAULT_COOKIE_HMAC_NONE) (NEW)
> 
> I do not see any difference in what I am proposed if the default
> config symbol is SCTP_DEFAULT_COOKIE_HMAC_MD5, I can still
> optionally choose SHA1 to be supported, and I do have a valid
> default config for this choice. While if I keep SCTP_COOKIE_HMAC_MD5
No, thats the problem, your old config is no longer valid with this new Kconfig
file.  Your config is telling the config utility that you want your default
Cookie hmac to be MD5, but you've explicitly told it (via your yes "" | make
oldconfig command), that you want SCTP_COOKIE_HMAC_MD5 to be disabled, so the
config utility is left with no choice to prompt you again for a default hmac,
which your command answers again by saying SCTP_DEFAULT_COOKIE_HMAC_MD5 (the
default choice of 1).  Thats your loop, you keep telling the config utility that
you both want the default hmac to be md5, and that you don't want to allow md5
to be an available hmac alg.  

Thats not a bug.  I'm sorry if your old configuration needs manual updating, but
there are no guarantees that old configurations will 'just work' in perpituity.

Neil

> as the default I have to manually enter which option I want.
> --
> Florian
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" 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] 46+ messages in thread

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-07 15:32         ` Vlad Yasevich
@ 2013-01-07 15:46           ` Neil Horman
  -1 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2013-01-07 15:46 UTC (permalink / raw)
  To: Vlad Yasevich
  Cc: Florian Fainelli, netdev, David Miller, Linus Torvalds, linux-sctp

On Mon, Jan 07, 2013 at 10:32:01AM -0500, Vlad Yasevich wrote:
> On 01/07/2013 09:49 AM, Neil Horman wrote:
> >On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
> >>Hello Neil,
> >>
> >>Le 12/15/12 02:22, Neil Horman a écrit :
> >>>Recently I posted commit 3c68198e75 which made selection of the cookie hmac
> >>>algorithm selectable.  This is all well and good, but Linus noted that it
> >>>changes the default config:
> >>>http://marc.info/?l=linux-netdev&m=135536629004808&w=2
> >>>
> >>>I've modified the sctp Kconfig file to reflect the recommended way of making
> >>>this choice, using the thermal driver example specified, and brought the
> >>>defaults back into line with the way they were prior to my origional patch
> >>>
> >>>Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
> >>>algorithm, so we don't needlessly bloat the kernel by forcing a non-none
> >>>default.  This also led me to note that we won't honor the default none
> >>>condition properly because of how sctp_net_init is encoded.  Fix that up as
> >>>well.
> >>>
> >>>Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> >>>to work soundly.
> >>>
> >>>Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> >>>CC: David Miller <davem@davemloft.net>
> >>>CC: Linus Torvalds <torvalds@linux-foundation.org>
> >>>CC: Vlad Yasevich <vyasevich@gmail.com>
> >>>CC: linux-sctp@vger.kernel.org
> >>>---
> >>>  net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
> >>>  net/sctp/protocol.c |  4 ++--
> >>>  2 files changed, 27 insertions(+), 4 deletions(-)
> >>>
> >>>diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
> >>>index a9edd2e..c262106 100644
> >>>--- a/net/sctp/Kconfig
> >>>+++ b/net/sctp/Kconfig
> >>>@@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
> >>>  	  'cat /proc/net/sctp/sctp_dbg_objcnt'
> >>>
> >>>  	  If unsure, say N
> >>>+choice
> >>>+	prompt "Default SCTP cookie HMAC encoding"
> >>>+	default SCTP_COOKIE_HMAC_MD5
> >>
> >>Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
> >>update to 3.8-rc2, and I usually build my kernel-headers with:
> >>
> >>yes '' | ARCH=foo make oldconfig
> >>
> >>and this just kept asking me for this config symbol because none
> >>could be provided.
> >>--
> >>Florian
> >>
> >
> >No, the config mechanism is setup to offer the user the ability to choose a
> >default cookie hmac, alg, then optionally select any other hmac algs you would
> >like to be made available (in the event you want to change the default at run
> >time).  When you select the default, it eables (via the select directive), the
> >corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
> >then prompts for the remaining values.
> >
> 
> Neil
> 
> Actually, I think it should be as Florian suggests.  The default
> value of the choice should be one of the values defined as part of
> the choice (the SCTP_DEFAULT_COOKIE_*).  Turning on appropriate
> default would turn on appropriate cookie config
> (SCTP_COOKIE_HMAC_*).
> 
I absolutely disagree.

> Would that save all the config trouble?
> 
Yes, it would fix it as Florian has noted, but at the cost of silently modifying
what the default hmac config vaule is.  If you've expressly disabled
SCTP_COOKIE_HMAC_MD5, and then blindly take the default choice in the
SCTP_DEFAULT_COOKIE selection option (the default default as it were), using the
approach your suggesting, then that will silently enable SCTP_COOKIE_HMAC_MD5
again, which may not be expected by users.  If you expressly have a config
option disabled in an old configuration, we should leave it there.

We're doing the right thing now, IMO.  When presented with a conflictly set
of configuration options, the config utilty is (repeatedly) prompting us to
resolve them.  That seems like a much more reasonable approach to this, than
silently changing pre-existing options so people can do the equivalent of just
blindly pressing enter through the config process (which is all yes "" | make
oldconfig is).

This is a momentary hiccup, corrected by taking 30 seconds to make a manual
config change (or by taking a second to understand what the config utility is
tell us by prompting for a default choice repeatedly).  Theres nothing to fix
here.

Neil

> -vlad
> 
> >Neil
> >
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" 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] 46+ messages in thread

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-07 15:46           ` Neil Horman
  0 siblings, 0 replies; 46+ messages in thread
From: Neil Horman @ 2013-01-07 15:46 UTC (permalink / raw)
  To: Vlad Yasevich
  Cc: Florian Fainelli, netdev, David Miller, Linus Torvalds, linux-sctp

On Mon, Jan 07, 2013 at 10:32:01AM -0500, Vlad Yasevich wrote:
> On 01/07/2013 09:49 AM, Neil Horman wrote:
> >On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
> >>Hello Neil,
> >>
> >>Le 12/15/12 02:22, Neil Horman a écrit :
> >>>Recently I posted commit 3c68198e75 which made selection of the cookie hmac
> >>>algorithm selectable.  This is all well and good, but Linus noted that it
> >>>changes the default config:
> >>>http://marc.info/?l=linux-netdev&m\x135536629004808&w=2
> >>>
> >>>I've modified the sctp Kconfig file to reflect the recommended way of making
> >>>this choice, using the thermal driver example specified, and brought the
> >>>defaults back into line with the way they were prior to my origional patch
> >>>
> >>>Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
> >>>algorithm, so we don't needlessly bloat the kernel by forcing a non-none
> >>>default.  This also led me to note that we won't honor the default none
> >>>condition properly because of how sctp_net_init is encoded.  Fix that up as
> >>>well.
> >>>
> >>>Tested by myself (allbeit fairly quickly).  All configuration combinations seems
> >>>to work soundly.
> >>>
> >>>Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> >>>CC: David Miller <davem@davemloft.net>
> >>>CC: Linus Torvalds <torvalds@linux-foundation.org>
> >>>CC: Vlad Yasevich <vyasevich@gmail.com>
> >>>CC: linux-sctp@vger.kernel.org
> >>>---
> >>>  net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
> >>>  net/sctp/protocol.c |  4 ++--
> >>>  2 files changed, 27 insertions(+), 4 deletions(-)
> >>>
> >>>diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
> >>>index a9edd2e..c262106 100644
> >>>--- a/net/sctp/Kconfig
> >>>+++ b/net/sctp/Kconfig
> >>>@@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
> >>>  	  'cat /proc/net/sctp/sctp_dbg_objcnt'
> >>>
> >>>  	  If unsure, say N
> >>>+choice
> >>>+	prompt "Default SCTP cookie HMAC encoding"
> >>>+	default SCTP_COOKIE_HMAC_MD5
> >>
> >>Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
> >>update to 3.8-rc2, and I usually build my kernel-headers with:
> >>
> >>yes '' | ARCH=foo make oldconfig
> >>
> >>and this just kept asking me for this config symbol because none
> >>could be provided.
> >>--
> >>Florian
> >>
> >
> >No, the config mechanism is setup to offer the user the ability to choose a
> >default cookie hmac, alg, then optionally select any other hmac algs you would
> >like to be made available (in the event you want to change the default at run
> >time).  When you select the default, it eables (via the select directive), the
> >corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
> >then prompts for the remaining values.
> >
> 
> Neil
> 
> Actually, I think it should be as Florian suggests.  The default
> value of the choice should be one of the values defined as part of
> the choice (the SCTP_DEFAULT_COOKIE_*).  Turning on appropriate
> default would turn on appropriate cookie config
> (SCTP_COOKIE_HMAC_*).
> 
I absolutely disagree.

> Would that save all the config trouble?
> 
Yes, it would fix it as Florian has noted, but at the cost of silently modifying
what the default hmac config vaule is.  If you've expressly disabled
SCTP_COOKIE_HMAC_MD5, and then blindly take the default choice in the
SCTP_DEFAULT_COOKIE selection option (the default default as it were), using the
approach your suggesting, then that will silently enable SCTP_COOKIE_HMAC_MD5
again, which may not be expected by users.  If you expressly have a config
option disabled in an old configuration, we should leave it there.

We're doing the right thing now, IMO.  When presented with a conflictly set
of configuration options, the config utilty is (repeatedly) prompting us to
resolve them.  That seems like a much more reasonable approach to this, than
silently changing pre-existing options so people can do the equivalent of just
blindly pressing enter through the config process (which is all yes "" | make
oldconfig is).

This is a momentary hiccup, corrected by taking 30 seconds to make a manual
config change (or by taking a second to understand what the config utility is
tell us by prompting for a default choice repeatedly).  Theres nothing to fix
here.

Neil

> -vlad
> 
> >Neil
> >
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" 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] 46+ messages in thread

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-07 15:38           ` Neil Horman
@ 2013-01-07 15:48             ` Vlad Yasevich
  -1 siblings, 0 replies; 46+ messages in thread
From: Vlad Yasevich @ 2013-01-07 15:48 UTC (permalink / raw)
  To: Neil Horman
  Cc: Florian Fainelli, netdev, David Miller, Linus Torvalds, linux-sctp

On 01/07/2013 10:38 AM, Neil Horman wrote:
> On Mon, Jan 07, 2013 at 04:15:24PM +0100, Florian Fainelli wrote:
>> Le 01/07/13 15:49, Neil Horman a écrit :
>>> On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
>>>> Hello Neil,
>>>>
>>>> Le 12/15/12 02:22, Neil Horman a écrit :
>>>>> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
>>>>> algorithm selectable.  This is all well and good, but Linus noted that it
>>>>> changes the default config:
>>>>> http://marc.info/?l=linux-netdev&m=135536629004808&w=2
>>>>>
>>>>> I've modified the sctp Kconfig file to reflect the recommended way of making
>>>>> this choice, using the thermal driver example specified, and brought the
>>>>> defaults back into line with the way they were prior to my origional patch
>>>>>
>>>>> Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
>>>>> algorithm, so we don't needlessly bloat the kernel by forcing a non-none
>>>>> default.  This also led me to note that we won't honor the default none
>>>>> condition properly because of how sctp_net_init is encoded.  Fix that up as
>>>>> well.
>>>>>
>>>>> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
>>>>> to work soundly.
>>>>>
>>>>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>>>>> CC: David Miller <davem@davemloft.net>
>>>>> CC: Linus Torvalds <torvalds@linux-foundation.org>
>>>>> CC: Vlad Yasevich <vyasevich@gmail.com>
>>>>> CC: linux-sctp@vger.kernel.org
>>>>> ---
>>>>>   net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
>>>>>   net/sctp/protocol.c |  4 ++--
>>>>>   2 files changed, 27 insertions(+), 4 deletions(-)
>>>>>
>>>>> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
>>>>> index a9edd2e..c262106 100644
>>>>> --- a/net/sctp/Kconfig
>>>>> +++ b/net/sctp/Kconfig
>>>>> @@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
>>>>>   	  'cat /proc/net/sctp/sctp_dbg_objcnt'
>>>>>
>>>>>   	  If unsure, say N
>>>>> +choice
>>>>> +	prompt "Default SCTP cookie HMAC encoding"
>>>>> +	default SCTP_COOKIE_HMAC_MD5
>>>> Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
>>>> update to 3.8-rc2, and I usually build my kernel-headers with:
>>>>
>>>> yes '' | ARCH=foo make oldconfig
>>>>
>>>> and this just kept asking me for this config symbol because none
>>>> could be provided.
>>>> --
>>>> Florian
>>>>
>>> No, the config mechanism is setup to offer the user the ability to choose a
>>> default cookie hmac, alg, then optionally select any other hmac algs you would
>>> like to be made available (in the event you want to change the default at run
>>> time).  When you select the default, it eables (via the select directive), the
>>> corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
>>> then prompts for the remaining values.
>>
>> Ok for the explanation, but this still breaks an oldconfig because
>> we do not actually propose the user with a default choice:
>>
>>      choice[1-3?]:     Default SCTP cookie HMAC encoding
>>        1. Enable optional MD5 hmac cookie generation
>> (SCTP_DEFAULT_COOKIE_HMAC_MD5) (NEW)
>>        2. Enable optional SHA1 hmac cookie generation
>> (SCTP_DEFAULT_COOKIE_HMAC_SHA1) (NEW)
>>        3. Use no hmac alg in SCTP cookie generation
>> (SCTP_DEFAULT_COOKIE_HMAC_NONE) (NEW)
>>
>> I do not see any difference in what I am proposed if the default
>> config symbol is SCTP_DEFAULT_COOKIE_HMAC_MD5, I can still
>> optionally choose SHA1 to be supported, and I do have a valid
>> default config for this choice. While if I keep SCTP_COOKIE_HMAC_MD5
> No, thats the problem, your old config is no longer valid with this new Kconfig
> file.  Your config is telling the config utility that you want your default
> Cookie hmac to be MD5, but you've explicitly told it (via your yes "" | make
> oldconfig command), that you want SCTP_COOKIE_HMAC_MD5 to be disabled, so the
> config utility is left with no choice to prompt you again for a default hmac,
> which your command answers again by saying SCTP_DEFAULT_COOKIE_HMAC_MD5 (the
> default choice of 1).  Thats your loop, you keep telling the config utility that
> you both want the default hmac to be md5, and that you don't want to allow md5
> to be an available hmac alg.
>
> Thats not a bug.  I'm sorry if your old configuration needs manual updating, but
> there are no guarantees that old configurations will 'just work' in perpituity.
>

Neil

Actually, I think we have a bug in the config.  Look at the thermal 
driver config again.  It has:

choice
         prompt "Default Thermal governor"
         default THERMAL_DEFAULT_GOV_STEP_WISE

config THERMAL_DEFAULT_GOV_STEP_WISE
	...
config THERMAL_DEFAULT_GOV_FAIR_SHARE
	...
config THERMAL_DEFAULT_GOV_USER_SPACE
	...
endchoice


SCTP has:

choice
         prompt "Default SCTP cookie HMAC encoding"
         default SCTP_COOKIE_HMAC_MD5

config SCTP_DEFAULT_COOKIE_HMAC_MD5
	...
config SCTP_DEFAULT_COOKIE_HMAC_SHA1
	...
config SCTP_DEFAULT_COOKIE_HMAC_NONE
	...
endchoice

See the difference?  The default value of the choice statement needs to
be one of the available choices.

-vlad



> Neil
>
>> as the default I have to manually enter which option I want.
>> --
>> Florian
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" 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] 46+ messages in thread

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-07 15:48             ` Vlad Yasevich
  0 siblings, 0 replies; 46+ messages in thread
From: Vlad Yasevich @ 2013-01-07 15:48 UTC (permalink / raw)
  To: Neil Horman
  Cc: Florian Fainelli, netdev, David Miller, Linus Torvalds, linux-sctp

On 01/07/2013 10:38 AM, Neil Horman wrote:
> On Mon, Jan 07, 2013 at 04:15:24PM +0100, Florian Fainelli wrote:
>> Le 01/07/13 15:49, Neil Horman a écrit :
>>> On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
>>>> Hello Neil,
>>>>
>>>> Le 12/15/12 02:22, Neil Horman a écrit :
>>>>> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
>>>>> algorithm selectable.  This is all well and good, but Linus noted that it
>>>>> changes the default config:
>>>>> http://marc.info/?l=linux-netdev&m\x135536629004808&w=2
>>>>>
>>>>> I've modified the sctp Kconfig file to reflect the recommended way of making
>>>>> this choice, using the thermal driver example specified, and brought the
>>>>> defaults back into line with the way they were prior to my origional patch
>>>>>
>>>>> Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
>>>>> algorithm, so we don't needlessly bloat the kernel by forcing a non-none
>>>>> default.  This also led me to note that we won't honor the default none
>>>>> condition properly because of how sctp_net_init is encoded.  Fix that up as
>>>>> well.
>>>>>
>>>>> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
>>>>> to work soundly.
>>>>>
>>>>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>>>>> CC: David Miller <davem@davemloft.net>
>>>>> CC: Linus Torvalds <torvalds@linux-foundation.org>
>>>>> CC: Vlad Yasevich <vyasevich@gmail.com>
>>>>> CC: linux-sctp@vger.kernel.org
>>>>> ---
>>>>>   net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
>>>>>   net/sctp/protocol.c |  4 ++--
>>>>>   2 files changed, 27 insertions(+), 4 deletions(-)
>>>>>
>>>>> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
>>>>> index a9edd2e..c262106 100644
>>>>> --- a/net/sctp/Kconfig
>>>>> +++ b/net/sctp/Kconfig
>>>>> @@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
>>>>>   	  'cat /proc/net/sctp/sctp_dbg_objcnt'
>>>>>
>>>>>   	  If unsure, say N
>>>>> +choice
>>>>> +	prompt "Default SCTP cookie HMAC encoding"
>>>>> +	default SCTP_COOKIE_HMAC_MD5
>>>> Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
>>>> update to 3.8-rc2, and I usually build my kernel-headers with:
>>>>
>>>> yes '' | ARCH=foo make oldconfig
>>>>
>>>> and this just kept asking me for this config symbol because none
>>>> could be provided.
>>>> --
>>>> Florian
>>>>
>>> No, the config mechanism is setup to offer the user the ability to choose a
>>> default cookie hmac, alg, then optionally select any other hmac algs you would
>>> like to be made available (in the event you want to change the default at run
>>> time).  When you select the default, it eables (via the select directive), the
>>> corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
>>> then prompts for the remaining values.
>>
>> Ok for the explanation, but this still breaks an oldconfig because
>> we do not actually propose the user with a default choice:
>>
>>      choice[1-3?]:     Default SCTP cookie HMAC encoding
>>        1. Enable optional MD5 hmac cookie generation
>> (SCTP_DEFAULT_COOKIE_HMAC_MD5) (NEW)
>>        2. Enable optional SHA1 hmac cookie generation
>> (SCTP_DEFAULT_COOKIE_HMAC_SHA1) (NEW)
>>        3. Use no hmac alg in SCTP cookie generation
>> (SCTP_DEFAULT_COOKIE_HMAC_NONE) (NEW)
>>
>> I do not see any difference in what I am proposed if the default
>> config symbol is SCTP_DEFAULT_COOKIE_HMAC_MD5, I can still
>> optionally choose SHA1 to be supported, and I do have a valid
>> default config for this choice. While if I keep SCTP_COOKIE_HMAC_MD5
> No, thats the problem, your old config is no longer valid with this new Kconfig
> file.  Your config is telling the config utility that you want your default
> Cookie hmac to be MD5, but you've explicitly told it (via your yes "" | make
> oldconfig command), that you want SCTP_COOKIE_HMAC_MD5 to be disabled, so the
> config utility is left with no choice to prompt you again for a default hmac,
> which your command answers again by saying SCTP_DEFAULT_COOKIE_HMAC_MD5 (the
> default choice of 1).  Thats your loop, you keep telling the config utility that
> you both want the default hmac to be md5, and that you don't want to allow md5
> to be an available hmac alg.
>
> Thats not a bug.  I'm sorry if your old configuration needs manual updating, but
> there are no guarantees that old configurations will 'just work' in perpituity.
>

Neil

Actually, I think we have a bug in the config.  Look at the thermal 
driver config again.  It has:

choice
         prompt "Default Thermal governor"
         default THERMAL_DEFAULT_GOV_STEP_WISE

config THERMAL_DEFAULT_GOV_STEP_WISE
	...
config THERMAL_DEFAULT_GOV_FAIR_SHARE
	...
config THERMAL_DEFAULT_GOV_USER_SPACE
	...
endchoice


SCTP has:

choice
         prompt "Default SCTP cookie HMAC encoding"
         default SCTP_COOKIE_HMAC_MD5

config SCTP_DEFAULT_COOKIE_HMAC_MD5
	...
config SCTP_DEFAULT_COOKIE_HMAC_SHA1
	...
config SCTP_DEFAULT_COOKIE_HMAC_NONE
	...
endchoice

See the difference?  The default value of the choice statement needs to
be one of the available choices.

-vlad



> Neil
>
>> as the default I have to manually enter which option I want.
>> --
>> Florian
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" 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] 46+ messages in thread

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-07 15:46           ` Neil Horman
@ 2013-01-07 16:39             ` Vlad Yasevich
  -1 siblings, 0 replies; 46+ messages in thread
From: Vlad Yasevich @ 2013-01-07 16:39 UTC (permalink / raw)
  To: Neil Horman
  Cc: Florian Fainelli, netdev, David Miller, Linus Torvalds, linux-sctp

On 01/07/2013 10:46 AM, Neil Horman wrote:
> On Mon, Jan 07, 2013 at 10:32:01AM -0500, Vlad Yasevich wrote:
>> On 01/07/2013 09:49 AM, Neil Horman wrote:
>>> On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
>>>> Hello Neil,
>>>>
>>>> Le 12/15/12 02:22, Neil Horman a écrit :
>>>>> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
>>>>> algorithm selectable.  This is all well and good, but Linus noted that it
>>>>> changes the default config:
>>>>> http://marc.info/?l=linux-netdev&m=135536629004808&w=2
>>>>>
>>>>> I've modified the sctp Kconfig file to reflect the recommended way of making
>>>>> this choice, using the thermal driver example specified, and brought the
>>>>> defaults back into line with the way they were prior to my origional patch
>>>>>
>>>>> Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
>>>>> algorithm, so we don't needlessly bloat the kernel by forcing a non-none
>>>>> default.  This also led me to note that we won't honor the default none
>>>>> condition properly because of how sctp_net_init is encoded.  Fix that up as
>>>>> well.
>>>>>
>>>>> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
>>>>> to work soundly.
>>>>>
>>>>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>>>>> CC: David Miller <davem@davemloft.net>
>>>>> CC: Linus Torvalds <torvalds@linux-foundation.org>
>>>>> CC: Vlad Yasevich <vyasevich@gmail.com>
>>>>> CC: linux-sctp@vger.kernel.org
>>>>> ---
>>>>>   net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
>>>>>   net/sctp/protocol.c |  4 ++--
>>>>>   2 files changed, 27 insertions(+), 4 deletions(-)
>>>>>
>>>>> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
>>>>> index a9edd2e..c262106 100644
>>>>> --- a/net/sctp/Kconfig
>>>>> +++ b/net/sctp/Kconfig
>>>>> @@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
>>>>>   	  'cat /proc/net/sctp/sctp_dbg_objcnt'
>>>>>
>>>>>   	  If unsure, say N
>>>>> +choice
>>>>> +	prompt "Default SCTP cookie HMAC encoding"
>>>>> +	default SCTP_COOKIE_HMAC_MD5
>>>>
>>>> Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
>>>> update to 3.8-rc2, and I usually build my kernel-headers with:
>>>>
>>>> yes '' | ARCH=foo make oldconfig
>>>>
>>>> and this just kept asking me for this config symbol because none
>>>> could be provided.
>>>> --
>>>> Florian
>>>>
>>>
>>> No, the config mechanism is setup to offer the user the ability to choose a
>>> default cookie hmac, alg, then optionally select any other hmac algs you would
>>> like to be made available (in the event you want to change the default at run
>>> time).  When you select the default, it eables (via the select directive), the
>>> corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
>>> then prompts for the remaining values.
>>>
>>
>> Neil
>>
>> Actually, I think it should be as Florian suggests.  The default
>> value of the choice should be one of the values defined as part of
>> the choice (the SCTP_DEFAULT_COOKIE_*).  Turning on appropriate
>> default would turn on appropriate cookie config
>> (SCTP_COOKIE_HMAC_*).
>>
> I absolutely disagree.
>
>> Would that save all the config trouble?
>>
> Yes, it would fix it as Florian has noted, but at the cost of silently modifying
> what the default hmac config vaule is.  If you've expressly disabled
> SCTP_COOKIE_HMAC_MD5, and then blindly take the default choice in the
> SCTP_DEFAULT_COOKIE selection option (the default default as it were), using the
> approach your suggesting, then that will silently enable SCTP_COOKIE_HMAC_MD5
> again, which may not be expected by users.  If you expressly have a config
> option disabled in an old configuration, we should leave it there.

GACK.  Just reproduced this and I really don't like this infinite loop 
of choice prompts.  That's a horrible bug and we need to fix this.

I don't think overriding the value is that big of a deal, especially 
considering that this is exactly what 'make menuconfig' and other 
graphical configs will do.
If I start with:
	CONFIG_IP_SCTP=m
	CONFIG_NET_SCTPPROBE=m
	# CONFIG_SCTP_DBG_MSG is not set
	# CONFIG_SCTP_DBG_OBJCNT is not set
	# CONFIG_SCTP_HMAC_NONE is not set
	CONFIG_SCTP_HMAC_SHA1=y
	# CONFIG_SCTP_HMAC_MD5 is not set

then run:
	yes "" | make oldconfig

I get an infinite loop.

If I run "make menuconfig", I get:
	CONFIG_IP_SCTP=m
	CONFIG_NET_SCTPPROBE=m
	# CONFIG_SCTP_DBG_MSG is not set
	# CONFIG_SCTP_DBG_OBJCNT is not set
	CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
	# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
	# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
	CONFIG_SCTP_COOKIE_HMAC_MD5=y
	# CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set

Note, that SHA1 is now overridden with MD5.

If I change the value of the default choice in Kconfig, the behavior 
between oldconfig and menuconfig is the same.

-vlad







>
> We're doing the right thing now, IMO.  When presented with a conflictly set
> of configuration options, the config utilty is (repeatedly) prompting us to
> resolve them.  That seems like a much more reasonable approach to this, than
> silently changing pre-existing options so people can do the equivalent of just
> blindly pressing enter through the config process (which is all yes "" | make
> oldconfig is).
>
> This is a momentary hiccup, corrected by taking 30 seconds to make a manual
> config change (or by taking a second to understand what the config utility is
> tell us by prompting for a default choice repeatedly).  Theres nothing to fix
> here.
>
> Neil
>
>> -vlad
>>
>>> Neil
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" 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] 46+ messages in thread

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-07 16:39             ` Vlad Yasevich
  0 siblings, 0 replies; 46+ messages in thread
From: Vlad Yasevich @ 2013-01-07 16:39 UTC (permalink / raw)
  To: Neil Horman
  Cc: Florian Fainelli, netdev, David Miller, Linus Torvalds, linux-sctp

On 01/07/2013 10:46 AM, Neil Horman wrote:
> On Mon, Jan 07, 2013 at 10:32:01AM -0500, Vlad Yasevich wrote:
>> On 01/07/2013 09:49 AM, Neil Horman wrote:
>>> On Mon, Jan 07, 2013 at 02:25:39PM +0100, Florian Fainelli wrote:
>>>> Hello Neil,
>>>>
>>>> Le 12/15/12 02:22, Neil Horman a écrit :
>>>>> Recently I posted commit 3c68198e75 which made selection of the cookie hmac
>>>>> algorithm selectable.  This is all well and good, but Linus noted that it
>>>>> changes the default config:
>>>>> http://marc.info/?l=linux-netdev&m\x135536629004808&w=2
>>>>>
>>>>> I've modified the sctp Kconfig file to reflect the recommended way of making
>>>>> this choice, using the thermal driver example specified, and brought the
>>>>> defaults back into line with the way they were prior to my origional patch
>>>>>
>>>>> Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
>>>>> algorithm, so we don't needlessly bloat the kernel by forcing a non-none
>>>>> default.  This also led me to note that we won't honor the default none
>>>>> condition properly because of how sctp_net_init is encoded.  Fix that up as
>>>>> well.
>>>>>
>>>>> Tested by myself (allbeit fairly quickly).  All configuration combinations seems
>>>>> to work soundly.
>>>>>
>>>>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>>>>> CC: David Miller <davem@davemloft.net>
>>>>> CC: Linus Torvalds <torvalds@linux-foundation.org>
>>>>> CC: Vlad Yasevich <vyasevich@gmail.com>
>>>>> CC: linux-sctp@vger.kernel.org
>>>>> ---
>>>>>   net/sctp/Kconfig    | 27 +++++++++++++++++++++++++--
>>>>>   net/sctp/protocol.c |  4 ++--
>>>>>   2 files changed, 27 insertions(+), 4 deletions(-)
>>>>>
>>>>> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
>>>>> index a9edd2e..c262106 100644
>>>>> --- a/net/sctp/Kconfig
>>>>> +++ b/net/sctp/Kconfig
>>>>> @@ -66,12 +66,36 @@ config SCTP_DBG_OBJCNT
>>>>>   	  'cat /proc/net/sctp/sctp_dbg_objcnt'
>>>>>
>>>>>   	  If unsure, say N
>>>>> +choice
>>>>> +	prompt "Default SCTP cookie HMAC encoding"
>>>>> +	default SCTP_COOKIE_HMAC_MD5
>>>>
>>>> Should not this be SCTP_DEFAULT_COOKIE_HMAC_MD5? I just tried to
>>>> update to 3.8-rc2, and I usually build my kernel-headers with:
>>>>
>>>> yes '' | ARCH=foo make oldconfig
>>>>
>>>> and this just kept asking me for this config symbol because none
>>>> could be provided.
>>>> --
>>>> Florian
>>>>
>>>
>>> No, the config mechanism is setup to offer the user the ability to choose a
>>> default cookie hmac, alg, then optionally select any other hmac algs you would
>>> like to be made available (in the event you want to change the default at run
>>> time).  When you select the default, it eables (via the select directive), the
>>> corresponding SCTP_COOKIE_HMAC_* config option, which is used in the build, and
>>> then prompts for the remaining values.
>>>
>>
>> Neil
>>
>> Actually, I think it should be as Florian suggests.  The default
>> value of the choice should be one of the values defined as part of
>> the choice (the SCTP_DEFAULT_COOKIE_*).  Turning on appropriate
>> default would turn on appropriate cookie config
>> (SCTP_COOKIE_HMAC_*).
>>
> I absolutely disagree.
>
>> Would that save all the config trouble?
>>
> Yes, it would fix it as Florian has noted, but at the cost of silently modifying
> what the default hmac config vaule is.  If you've expressly disabled
> SCTP_COOKIE_HMAC_MD5, and then blindly take the default choice in the
> SCTP_DEFAULT_COOKIE selection option (the default default as it were), using the
> approach your suggesting, then that will silently enable SCTP_COOKIE_HMAC_MD5
> again, which may not be expected by users.  If you expressly have a config
> option disabled in an old configuration, we should leave it there.

GACK.  Just reproduced this and I really don't like this infinite loop 
of choice prompts.  That's a horrible bug and we need to fix this.

I don't think overriding the value is that big of a deal, especially 
considering that this is exactly what 'make menuconfig' and other 
graphical configs will do.
If I start with:
	CONFIG_IP_SCTP=m
	CONFIG_NET_SCTPPROBE=m
	# CONFIG_SCTP_DBG_MSG is not set
	# CONFIG_SCTP_DBG_OBJCNT is not set
	# CONFIG_SCTP_HMAC_NONE is not set
	CONFIG_SCTP_HMAC_SHA1=y
	# CONFIG_SCTP_HMAC_MD5 is not set

then run:
	yes "" | make oldconfig

I get an infinite loop.

If I run "make menuconfig", I get:
	CONFIG_IP_SCTP=m
	CONFIG_NET_SCTPPROBE=m
	# CONFIG_SCTP_DBG_MSG is not set
	# CONFIG_SCTP_DBG_OBJCNT is not set
	CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
	# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
	# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
	CONFIG_SCTP_COOKIE_HMAC_MD5=y
	# CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set

Note, that SHA1 is now overridden with MD5.

If I change the value of the default choice in Kconfig, the behavior 
between oldconfig and menuconfig is the same.

-vlad







>
> We're doing the right thing now, IMO.  When presented with a conflictly set
> of configuration options, the config utilty is (repeatedly) prompting us to
> resolve them.  That seems like a much more reasonable approach to this, than
> silently changing pre-existing options so people can do the equivalent of just
> blindly pressing enter through the config process (which is all yes "" | make
> oldconfig is).
>
> This is a momentary hiccup, corrected by taking 30 seconds to make a manual
> config change (or by taking a second to understand what the config utility is
> tell us by prompting for a default choice repeatedly).  Theres nothing to fix
> here.
>
> Neil
>
>> -vlad
>>
>>> Neil
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" 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] 46+ messages in thread

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-07 15:48             ` Vlad Yasevich
@ 2013-01-08 17:36               ` Florian Fainelli
  -1 siblings, 0 replies; 46+ messages in thread
From: Florian Fainelli @ 2013-01-08 17:36 UTC (permalink / raw)
  To: Vlad Yasevich
  Cc: Neil Horman, netdev, David Miller, Linus Torvalds, linux-sctp

Le 01/07/13 16:48, Vlad Yasevich a écrit :
> No, thats the problem, your old config is no longer valid with this 
> new Kconfig
>> file.  Your config is telling the config utility that you want your 
>> default
>> Cookie hmac to be MD5, but you've explicitly told it (via your yes "" 
>> | make
>> oldconfig command), that you want SCTP_COOKIE_HMAC_MD5 to be 
>> disabled, so the
>> config utility is left with no choice to prompt you again for a 
>> default hmac,
>> which your command answers again by saying 
>> SCTP_DEFAULT_COOKIE_HMAC_MD5 (the
>> default choice of 1).  Thats your loop, you keep telling the config 
>> utility that
>> you both want the default hmac to be md5, and that you don't want to 
>> allow md5
>> to be an available hmac alg.
>>
>> Thats not a bug.  I'm sorry if your old configuration needs manual 
>> updating, but
>> there are no guarantees that old configurations will 'just work' in 
>> perpituity.
>>
>
> Neil
>
> Actually, I think we have a bug in the config.  Look at the thermal 
> driver config again.  It has:
>
> choice
>         prompt "Default Thermal governor"
>         default THERMAL_DEFAULT_GOV_STEP_WISE
>
> config THERMAL_DEFAULT_GOV_STEP_WISE
>     ...
> config THERMAL_DEFAULT_GOV_FAIR_SHARE
>     ...
> config THERMAL_DEFAULT_GOV_USER_SPACE
>     ...
> endchoice
>
>
> SCTP has:
>
> choice
>         prompt "Default SCTP cookie HMAC encoding"
>         default SCTP_COOKIE_HMAC_MD5
>
> config SCTP_DEFAULT_COOKIE_HMAC_MD5
>     ...
> config SCTP_DEFAULT_COOKIE_HMAC_SHA1
>     ...
> config SCTP_DEFAULT_COOKIE_HMAC_NONE
>     ...
> endchoice
>
> See the difference?  The default value of the choice statement needs to
> be one of the available choices.

Right, since none of the config symbols actually exist when migrating 
from and oldconfig we are still being prompted, which is just fine 
actually. Having the config symbol being the default a member of the 
choice/endchoice section is what should be expected.
--
Florian

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-08 17:36               ` Florian Fainelli
  0 siblings, 0 replies; 46+ messages in thread
From: Florian Fainelli @ 2013-01-08 17:36 UTC (permalink / raw)
  To: Vlad Yasevich
  Cc: Neil Horman, netdev, David Miller, Linus Torvalds, linux-sctp

Le 01/07/13 16:48, Vlad Yasevich a écrit :
> No, thats the problem, your old config is no longer valid with this 
> new Kconfig
>> file.  Your config is telling the config utility that you want your 
>> default
>> Cookie hmac to be MD5, but you've explicitly told it (via your yes "" 
>> | make
>> oldconfig command), that you want SCTP_COOKIE_HMAC_MD5 to be 
>> disabled, so the
>> config utility is left with no choice to prompt you again for a 
>> default hmac,
>> which your command answers again by saying 
>> SCTP_DEFAULT_COOKIE_HMAC_MD5 (the
>> default choice of 1).  Thats your loop, you keep telling the config 
>> utility that
>> you both want the default hmac to be md5, and that you don't want to 
>> allow md5
>> to be an available hmac alg.
>>
>> Thats not a bug.  I'm sorry if your old configuration needs manual 
>> updating, but
>> there are no guarantees that old configurations will 'just work' in 
>> perpituity.
>>
>
> Neil
>
> Actually, I think we have a bug in the config.  Look at the thermal 
> driver config again.  It has:
>
> choice
>         prompt "Default Thermal governor"
>         default THERMAL_DEFAULT_GOV_STEP_WISE
>
> config THERMAL_DEFAULT_GOV_STEP_WISE
>     ...
> config THERMAL_DEFAULT_GOV_FAIR_SHARE
>     ...
> config THERMAL_DEFAULT_GOV_USER_SPACE
>     ...
> endchoice
>
>
> SCTP has:
>
> choice
>         prompt "Default SCTP cookie HMAC encoding"
>         default SCTP_COOKIE_HMAC_MD5
>
> config SCTP_DEFAULT_COOKIE_HMAC_MD5
>     ...
> config SCTP_DEFAULT_COOKIE_HMAC_SHA1
>     ...
> config SCTP_DEFAULT_COOKIE_HMAC_NONE
>     ...
> endchoice
>
> See the difference?  The default value of the choice statement needs to
> be one of the available choices.

Right, since none of the config symbols actually exist when migrating 
from and oldconfig we are still being prompted, which is just fine 
actually. Having the config symbol being the default a member of the 
choice/endchoice section is what should be expected.
--
Florian

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-07 16:39             ` Vlad Yasevich
@ 2013-01-08 17:48               ` Florian Fainelli
  -1 siblings, 0 replies; 46+ messages in thread
From: Florian Fainelli @ 2013-01-08 17:48 UTC (permalink / raw)
  To: Vlad Yasevich
  Cc: Neil Horman, netdev, David Miller, Linus Torvalds, linux-sctp

Le 01/07/13 17:39, Vlad Yasevich a écrit :
>>
>>> Would that save all the config trouble?
>>>
>> Yes, it would fix it as Florian has noted, but at the cost of 
>> silently modifying
>> what the default hmac config vaule is.  If you've expressly disabled
>> SCTP_COOKIE_HMAC_MD5, and then blindly take the default choice in the
>> SCTP_DEFAULT_COOKIE selection option (the default default as it 
>> were), using the
>> approach your suggesting, then that will silently enable 
>> SCTP_COOKIE_HMAC_MD5
>> again, which may not be expected by users.  If you expressly have a 
>> config
>> option disabled in an old configuration, we should leave it there.
>
> GACK.  Just reproduced this and I really don't like this infinite loop 
> of choice prompts.  That's a horrible bug and we need to fix this.
>
> I don't think overriding the value is that big of a deal, especially 
> considering that this is exactly what 'make menuconfig' and other 
> graphical configs will do.
> If I start with:
>     CONFIG_IP_SCTP=m
>     CONFIG_NET_SCTPPROBE=m
>     # CONFIG_SCTP_DBG_MSG is not set
>     # CONFIG_SCTP_DBG_OBJCNT is not set
>     # CONFIG_SCTP_HMAC_NONE is not set
>     CONFIG_SCTP_HMAC_SHA1=y
>     # CONFIG_SCTP_HMAC_MD5 is not set
>
> then run:
>     yes "" | make oldconfig
>
> I get an infinite loop.
>
> If I run "make menuconfig", I get:
>     CONFIG_IP_SCTP=m
>     CONFIG_NET_SCTPPROBE=m
>     # CONFIG_SCTP_DBG_MSG is not set
>     # CONFIG_SCTP_DBG_OBJCNT is not set
>     CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
>     # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
>     # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
>     CONFIG_SCTP_COOKIE_HMAC_MD5=y
>     # CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set
>
> Note, that SHA1 is now overridden with MD5.
>
> If I change the value of the default choice in Kconfig, the behavior 
> between oldconfig and menuconfig is the same.

Right, the issue is as simple as there is no default *valid* config 
symbol being proposed. In any case Neil's patch changes both config 
symbol names such that they are non-existent when transitionning from a 
pre-3.8-rc config and a 3.8-rc config. The following patch fixes this 
for me:

 From c8e277512bafafc009a3fbf889c78d6b6a06d5fa Mon Sep 17 00:00:00 2001
From: Florian Fainelli <florian@openwrt.org>
Date: Mon, 7 Jan 2013 14:26:15 +0100
Subject: [PATCH] sctp: fix typo in default SCTP cookie choice

Commit 0d0863b0 (sctp: Change defaults on cookie hmac selection)
introduced a choice configuration option to select the default SCTP
cookie hashing algorithm, a typo was introduced for the default choice.
This is an issue when running make oldconfig because an explicit choice
number must be entered since no default is available. This patch fixes
the typo, thus providing a valid default choice.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
  net/sctp/Kconfig |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
index c262106..7521d94 100644
--- a/net/sctp/Kconfig
+++ b/net/sctp/Kconfig
@@ -68,7 +68,7 @@ config SCTP_DBG_OBJCNT
        If unsure, say N
  choice
      prompt "Default SCTP cookie HMAC encoding"
-    default SCTP_COOKIE_HMAC_MD5
+    default SCTP_DEFAULT_COOKIE_HMAC_MD5
      help
        This option sets the default sctp cookie hmac algorithm
        when in doubt select 'md5'
-- 
1.7.10.4

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-08 17:48               ` Florian Fainelli
  0 siblings, 0 replies; 46+ messages in thread
From: Florian Fainelli @ 2013-01-08 17:48 UTC (permalink / raw)
  To: Vlad Yasevich
  Cc: Neil Horman, netdev, David Miller, Linus Torvalds, linux-sctp

Le 01/07/13 17:39, Vlad Yasevich a écrit :
>>
>>> Would that save all the config trouble?
>>>
>> Yes, it would fix it as Florian has noted, but at the cost of 
>> silently modifying
>> what the default hmac config vaule is.  If you've expressly disabled
>> SCTP_COOKIE_HMAC_MD5, and then blindly take the default choice in the
>> SCTP_DEFAULT_COOKIE selection option (the default default as it 
>> were), using the
>> approach your suggesting, then that will silently enable 
>> SCTP_COOKIE_HMAC_MD5
>> again, which may not be expected by users.  If you expressly have a 
>> config
>> option disabled in an old configuration, we should leave it there.
>
> GACK.  Just reproduced this and I really don't like this infinite loop 
> of choice prompts.  That's a horrible bug and we need to fix this.
>
> I don't think overriding the value is that big of a deal, especially 
> considering that this is exactly what 'make menuconfig' and other 
> graphical configs will do.
> If I start with:
>     CONFIG_IP_SCTP=m
>     CONFIG_NET_SCTPPROBE=m
>     # CONFIG_SCTP_DBG_MSG is not set
>     # CONFIG_SCTP_DBG_OBJCNT is not set
>     # CONFIG_SCTP_HMAC_NONE is not set
>     CONFIG_SCTP_HMAC_SHA1=y
>     # CONFIG_SCTP_HMAC_MD5 is not set
>
> then run:
>     yes "" | make oldconfig
>
> I get an infinite loop.
>
> If I run "make menuconfig", I get:
>     CONFIG_IP_SCTP=m
>     CONFIG_NET_SCTPPROBE=m
>     # CONFIG_SCTP_DBG_MSG is not set
>     # CONFIG_SCTP_DBG_OBJCNT is not set
>     CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
>     # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
>     # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
>     CONFIG_SCTP_COOKIE_HMAC_MD5=y
>     # CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set
>
> Note, that SHA1 is now overridden with MD5.
>
> If I change the value of the default choice in Kconfig, the behavior 
> between oldconfig and menuconfig is the same.

Right, the issue is as simple as there is no default *valid* config 
symbol being proposed. In any case Neil's patch changes both config 
symbol names such that they are non-existent when transitionning from a 
pre-3.8-rc config and a 3.8-rc config. The following patch fixes this 
for me:

 From c8e277512bafafc009a3fbf889c78d6b6a06d5fa Mon Sep 17 00:00:00 2001
From: Florian Fainelli <florian@openwrt.org>
Date: Mon, 7 Jan 2013 14:26:15 +0100
Subject: [PATCH] sctp: fix typo in default SCTP cookie choice

Commit 0d0863b0 (sctp: Change defaults on cookie hmac selection)
introduced a choice configuration option to select the default SCTP
cookie hashing algorithm, a typo was introduced for the default choice.
This is an issue when running make oldconfig because an explicit choice
number must be entered since no default is available. This patch fixes
the typo, thus providing a valid default choice.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
  net/sctp/Kconfig |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
index c262106..7521d94 100644
--- a/net/sctp/Kconfig
+++ b/net/sctp/Kconfig
@@ -68,7 +68,7 @@ config SCTP_DBG_OBJCNT
        If unsure, say N
  choice
      prompt "Default SCTP cookie HMAC encoding"
-    default SCTP_COOKIE_HMAC_MD5
+    default SCTP_DEFAULT_COOKIE_HMAC_MD5
      help
        This option sets the default sctp cookie hmac algorithm
        when in doubt select 'md5'
-- 
1.7.10.4



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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-08 17:48               ` Florian Fainelli
@ 2013-01-08 18:08                 ` Vlad Yasevich
  -1 siblings, 0 replies; 46+ messages in thread
From: Vlad Yasevich @ 2013-01-08 18:08 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Neil Horman, netdev, David Miller, Linus Torvalds, linux-sctp,
	Alex Elder

On 01/08/2013 12:48 PM, Florian Fainelli wrote:
> Le 01/07/13 17:39, Vlad Yasevich a écrit :
>>>
>>>> Would that save all the config trouble?
>>>>
>>> Yes, it would fix it as Florian has noted, but at the cost of
>>> silently modifying
>>> what the default hmac config vaule is.  If you've expressly disabled
>>> SCTP_COOKIE_HMAC_MD5, and then blindly take the default choice in the
>>> SCTP_DEFAULT_COOKIE selection option (the default default as it
>>> were), using the
>>> approach your suggesting, then that will silently enable
>>> SCTP_COOKIE_HMAC_MD5
>>> again, which may not be expected by users.  If you expressly have a
>>> config
>>> option disabled in an old configuration, we should leave it there.
>>
>> GACK.  Just reproduced this and I really don't like this infinite loop
>> of choice prompts.  That's a horrible bug and we need to fix this.
>>
>> I don't think overriding the value is that big of a deal, especially
>> considering that this is exactly what 'make menuconfig' and other
>> graphical configs will do.
>> If I start with:
>>     CONFIG_IP_SCTP=m
>>     CONFIG_NET_SCTPPROBE=m
>>     # CONFIG_SCTP_DBG_MSG is not set
>>     # CONFIG_SCTP_DBG_OBJCNT is not set
>>     # CONFIG_SCTP_HMAC_NONE is not set
>>     CONFIG_SCTP_HMAC_SHA1=y
>>     # CONFIG_SCTP_HMAC_MD5 is not set
>>
>> then run:
>>     yes "" | make oldconfig
>>
>> I get an infinite loop.
>>
>> If I run "make menuconfig", I get:
>>     CONFIG_IP_SCTP=m
>>     CONFIG_NET_SCTPPROBE=m
>>     # CONFIG_SCTP_DBG_MSG is not set
>>     # CONFIG_SCTP_DBG_OBJCNT is not set
>>     CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
>>     # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
>>     # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
>>     CONFIG_SCTP_COOKIE_HMAC_MD5=y
>>     # CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set
>>
>> Note, that SHA1 is now overridden with MD5.
>>
>> If I change the value of the default choice in Kconfig, the behavior
>> between oldconfig and menuconfig is the same.
>
> Right, the issue is as simple as there is no default *valid* config
> symbol being proposed. In any case Neil's patch changes both config
> symbol names such that they are non-existent when transitionning from a
> pre-3.8-rc config and a 3.8-rc config. The following patch fixes this
> for me:
>
>  From c8e277512bafafc009a3fbf889c78d6b6a06d5fa Mon Sep 17 00:00:00 2001
> From: Florian Fainelli <florian@openwrt.org>
> Date: Mon, 7 Jan 2013 14:26:15 +0100
> Subject: [PATCH] sctp: fix typo in default SCTP cookie choice
>
> Commit 0d0863b0 (sctp: Change defaults on cookie hmac selection)
> introduced a choice configuration option to select the default SCTP
> cookie hashing algorithm, a typo was introduced for the default choice.
> This is an issue when running make oldconfig because an explicit choice
> number must be entered since no default is available. This patch fixes
> the typo, thus providing a valid default choice.
>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>

Hi Florian

Alex Alder already sent the patch that Neil and I both acked, but I see
that Alex never sent it to netdev (just checked the headers).

Oh well...  this is the same change that Alex sent, so ACK, and now it 
can get into the tree.

Acked-by: Vlad Yasevich <vyasevich@gmail.com>

Alex, please be sure to CC your patches to netdev as well.

Thanks
-vlad

> ---
>   net/sctp/Kconfig |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
> index c262106..7521d94 100644
> --- a/net/sctp/Kconfig
> +++ b/net/sctp/Kconfig
> @@ -68,7 +68,7 @@ config SCTP_DBG_OBJCNT
>         If unsure, say N
>   choice
>       prompt "Default SCTP cookie HMAC encoding"
> -    default SCTP_COOKIE_HMAC_MD5
> +    default SCTP_DEFAULT_COOKIE_HMAC_MD5
>       help
>         This option sets the default sctp cookie hmac algorithm
>         when in doubt select 'md5'

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-08 18:08                 ` Vlad Yasevich
  0 siblings, 0 replies; 46+ messages in thread
From: Vlad Yasevich @ 2013-01-08 18:08 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Neil Horman, netdev, David Miller, Linus Torvalds, linux-sctp,
	Alex Elder

On 01/08/2013 12:48 PM, Florian Fainelli wrote:
> Le 01/07/13 17:39, Vlad Yasevich a écrit :
>>>
>>>> Would that save all the config trouble?
>>>>
>>> Yes, it would fix it as Florian has noted, but at the cost of
>>> silently modifying
>>> what the default hmac config vaule is.  If you've expressly disabled
>>> SCTP_COOKIE_HMAC_MD5, and then blindly take the default choice in the
>>> SCTP_DEFAULT_COOKIE selection option (the default default as it
>>> were), using the
>>> approach your suggesting, then that will silently enable
>>> SCTP_COOKIE_HMAC_MD5
>>> again, which may not be expected by users.  If you expressly have a
>>> config
>>> option disabled in an old configuration, we should leave it there.
>>
>> GACK.  Just reproduced this and I really don't like this infinite loop
>> of choice prompts.  That's a horrible bug and we need to fix this.
>>
>> I don't think overriding the value is that big of a deal, especially
>> considering that this is exactly what 'make menuconfig' and other
>> graphical configs will do.
>> If I start with:
>>     CONFIG_IP_SCTP=m
>>     CONFIG_NET_SCTPPROBE=m
>>     # CONFIG_SCTP_DBG_MSG is not set
>>     # CONFIG_SCTP_DBG_OBJCNT is not set
>>     # CONFIG_SCTP_HMAC_NONE is not set
>>     CONFIG_SCTP_HMAC_SHA1=y
>>     # CONFIG_SCTP_HMAC_MD5 is not set
>>
>> then run:
>>     yes "" | make oldconfig
>>
>> I get an infinite loop.
>>
>> If I run "make menuconfig", I get:
>>     CONFIG_IP_SCTP=m
>>     CONFIG_NET_SCTPPROBE=m
>>     # CONFIG_SCTP_DBG_MSG is not set
>>     # CONFIG_SCTP_DBG_OBJCNT is not set
>>     CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
>>     # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
>>     # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
>>     CONFIG_SCTP_COOKIE_HMAC_MD5=y
>>     # CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set
>>
>> Note, that SHA1 is now overridden with MD5.
>>
>> If I change the value of the default choice in Kconfig, the behavior
>> between oldconfig and menuconfig is the same.
>
> Right, the issue is as simple as there is no default *valid* config
> symbol being proposed. In any case Neil's patch changes both config
> symbol names such that they are non-existent when transitionning from a
> pre-3.8-rc config and a 3.8-rc config. The following patch fixes this
> for me:
>
>  From c8e277512bafafc009a3fbf889c78d6b6a06d5fa Mon Sep 17 00:00:00 2001
> From: Florian Fainelli <florian@openwrt.org>
> Date: Mon, 7 Jan 2013 14:26:15 +0100
> Subject: [PATCH] sctp: fix typo in default SCTP cookie choice
>
> Commit 0d0863b0 (sctp: Change defaults on cookie hmac selection)
> introduced a choice configuration option to select the default SCTP
> cookie hashing algorithm, a typo was introduced for the default choice.
> This is an issue when running make oldconfig because an explicit choice
> number must be entered since no default is available. This patch fixes
> the typo, thus providing a valid default choice.
>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>

Hi Florian

Alex Alder already sent the patch that Neil and I both acked, but I see
that Alex never sent it to netdev (just checked the headers).

Oh well...  this is the same change that Alex sent, so ACK, and now it 
can get into the tree.

Acked-by: Vlad Yasevich <vyasevich@gmail.com>

Alex, please be sure to CC your patches to netdev as well.

Thanks
-vlad

> ---
>   net/sctp/Kconfig |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
> index c262106..7521d94 100644
> --- a/net/sctp/Kconfig
> +++ b/net/sctp/Kconfig
> @@ -68,7 +68,7 @@ config SCTP_DBG_OBJCNT
>         If unsure, say N
>   choice
>       prompt "Default SCTP cookie HMAC encoding"
> -    default SCTP_COOKIE_HMAC_MD5
> +    default SCTP_DEFAULT_COOKIE_HMAC_MD5
>       help
>         This option sets the default sctp cookie hmac algorithm
>         when in doubt select 'md5'


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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-08 18:08                 ` Vlad Yasevich
@ 2013-01-08 18:20                   ` Alex Elder
  -1 siblings, 0 replies; 46+ messages in thread
From: Alex Elder @ 2013-01-08 18:20 UTC (permalink / raw)
  To: Vlad Yasevich
  Cc: Florian Fainelli, Neil Horman, netdev, David Miller,
	Linus Torvalds, linux-sctp

On 01/08/2013 12:08 PM, Vlad Yasevich wrote:
> On 01/08/2013 12:48 PM, Florian Fainelli wrote:
>> Le 01/07/13 17:39, Vlad Yasevich a écrit :
>>>>
>>>>> Would that save all the config trouble?
>>>>>
>>>> Yes, it would fix it as Florian has noted, but at the cost of
>>>> silently modifying
>>>> what the default hmac config vaule is.  If you've expressly disabled
>>>> SCTP_COOKIE_HMAC_MD5, and then blindly take the default choice in the
>>>> SCTP_DEFAULT_COOKIE selection option (the default default as it
>>>> were), using the
>>>> approach your suggesting, then that will silently enable
>>>> SCTP_COOKIE_HMAC_MD5
>>>> again, which may not be expected by users.  If you expressly have a
>>>> config
>>>> option disabled in an old configuration, we should leave it there.
>>>
>>> GACK.  Just reproduced this and I really don't like this infinite loop
>>> of choice prompts.  That's a horrible bug and we need to fix this.
>>>
>>> I don't think overriding the value is that big of a deal, especially
>>> considering that this is exactly what 'make menuconfig' and other
>>> graphical configs will do.
>>> If I start with:
>>>     CONFIG_IP_SCTP=m
>>>     CONFIG_NET_SCTPPROBE=m
>>>     # CONFIG_SCTP_DBG_MSG is not set
>>>     # CONFIG_SCTP_DBG_OBJCNT is not set
>>>     # CONFIG_SCTP_HMAC_NONE is not set
>>>     CONFIG_SCTP_HMAC_SHA1=y
>>>     # CONFIG_SCTP_HMAC_MD5 is not set
>>>
>>> then run:
>>>     yes "" | make oldconfig
>>>
>>> I get an infinite loop.
>>>
>>> If I run "make menuconfig", I get:
>>>     CONFIG_IP_SCTP=m
>>>     CONFIG_NET_SCTPPROBE=m
>>>     # CONFIG_SCTP_DBG_MSG is not set
>>>     # CONFIG_SCTP_DBG_OBJCNT is not set
>>>     CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
>>>     # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
>>>     # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
>>>     CONFIG_SCTP_COOKIE_HMAC_MD5=y
>>>     # CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set
>>>
>>> Note, that SHA1 is now overridden with MD5.
>>>
>>> If I change the value of the default choice in Kconfig, the behavior
>>> between oldconfig and menuconfig is the same.
>>
>> Right, the issue is as simple as there is no default *valid* config
>> symbol being proposed. In any case Neil's patch changes both config
>> symbol names such that they are non-existent when transitionning from a
>> pre-3.8-rc config and a 3.8-rc config. The following patch fixes this
>> for me:
>>
>>  From c8e277512bafafc009a3fbf889c78d6b6a06d5fa Mon Sep 17 00:00:00 2001
>> From: Florian Fainelli <florian@openwrt.org>
>> Date: Mon, 7 Jan 2013 14:26:15 +0100
>> Subject: [PATCH] sctp: fix typo in default SCTP cookie choice
>>
>> Commit 0d0863b0 (sctp: Change defaults on cookie hmac selection)
>> introduced a choice configuration option to select the default SCTP
>> cookie hashing algorithm, a typo was introduced for the default choice.
>> This is an issue when running make oldconfig because an explicit choice
>> number must be entered since no default is available. This patch fixes
>> the typo, thus providing a valid default choice.
>>
>> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> 
> Hi Florian
> 
> Alex Alder already sent the patch that Neil and I both acked, but I see
> that Alex never sent it to netdev (just checked the headers).
> 
> Oh well...  this is the same change that Alex sent, so ACK, and now it
> can get into the tree.
> 
> Acked-by: Vlad Yasevich <vyasevich@gmail.com>
> 
> Alex, please be sure to CC your patches to netdev as well.

Sorry, I just sent my messages to the addresses listed
on the commit that introduced the problem this fixed.

Linus already pulled in the patch.

					-Alex

> Thanks
> -vlad
> 
>> ---
>>   net/sctp/Kconfig |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
>> index c262106..7521d94 100644
>> --- a/net/sctp/Kconfig
>> +++ b/net/sctp/Kconfig
>> @@ -68,7 +68,7 @@ config SCTP_DBG_OBJCNT
>>         If unsure, say N
>>   choice
>>       prompt "Default SCTP cookie HMAC encoding"
>> -    default SCTP_COOKIE_HMAC_MD5
>> +    default SCTP_DEFAULT_COOKIE_HMAC_MD5
>>       help
>>         This option sets the default sctp cookie hmac algorithm
>>         when in doubt select 'md5'
> 

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-08 18:20                   ` Alex Elder
  0 siblings, 0 replies; 46+ messages in thread
From: Alex Elder @ 2013-01-08 18:20 UTC (permalink / raw)
  To: Vlad Yasevich
  Cc: Florian Fainelli, Neil Horman, netdev, David Miller,
	Linus Torvalds, linux-sctp

On 01/08/2013 12:08 PM, Vlad Yasevich wrote:
> On 01/08/2013 12:48 PM, Florian Fainelli wrote:
>> Le 01/07/13 17:39, Vlad Yasevich a écrit :
>>>>
>>>>> Would that save all the config trouble?
>>>>>
>>>> Yes, it would fix it as Florian has noted, but at the cost of
>>>> silently modifying
>>>> what the default hmac config vaule is.  If you've expressly disabled
>>>> SCTP_COOKIE_HMAC_MD5, and then blindly take the default choice in the
>>>> SCTP_DEFAULT_COOKIE selection option (the default default as it
>>>> were), using the
>>>> approach your suggesting, then that will silently enable
>>>> SCTP_COOKIE_HMAC_MD5
>>>> again, which may not be expected by users.  If you expressly have a
>>>> config
>>>> option disabled in an old configuration, we should leave it there.
>>>
>>> GACK.  Just reproduced this and I really don't like this infinite loop
>>> of choice prompts.  That's a horrible bug and we need to fix this.
>>>
>>> I don't think overriding the value is that big of a deal, especially
>>> considering that this is exactly what 'make menuconfig' and other
>>> graphical configs will do.
>>> If I start with:
>>>     CONFIG_IP_SCTP=m
>>>     CONFIG_NET_SCTPPROBE=m
>>>     # CONFIG_SCTP_DBG_MSG is not set
>>>     # CONFIG_SCTP_DBG_OBJCNT is not set
>>>     # CONFIG_SCTP_HMAC_NONE is not set
>>>     CONFIG_SCTP_HMAC_SHA1=y
>>>     # CONFIG_SCTP_HMAC_MD5 is not set
>>>
>>> then run:
>>>     yes "" | make oldconfig
>>>
>>> I get an infinite loop.
>>>
>>> If I run "make menuconfig", I get:
>>>     CONFIG_IP_SCTP=m
>>>     CONFIG_NET_SCTPPROBE=m
>>>     # CONFIG_SCTP_DBG_MSG is not set
>>>     # CONFIG_SCTP_DBG_OBJCNT is not set
>>>     CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
>>>     # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
>>>     # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
>>>     CONFIG_SCTP_COOKIE_HMAC_MD5=y
>>>     # CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set
>>>
>>> Note, that SHA1 is now overridden with MD5.
>>>
>>> If I change the value of the default choice in Kconfig, the behavior
>>> between oldconfig and menuconfig is the same.
>>
>> Right, the issue is as simple as there is no default *valid* config
>> symbol being proposed. In any case Neil's patch changes both config
>> symbol names such that they are non-existent when transitionning from a
>> pre-3.8-rc config and a 3.8-rc config. The following patch fixes this
>> for me:
>>
>>  From c8e277512bafafc009a3fbf889c78d6b6a06d5fa Mon Sep 17 00:00:00 2001
>> From: Florian Fainelli <florian@openwrt.org>
>> Date: Mon, 7 Jan 2013 14:26:15 +0100
>> Subject: [PATCH] sctp: fix typo in default SCTP cookie choice
>>
>> Commit 0d0863b0 (sctp: Change defaults on cookie hmac selection)
>> introduced a choice configuration option to select the default SCTP
>> cookie hashing algorithm, a typo was introduced for the default choice.
>> This is an issue when running make oldconfig because an explicit choice
>> number must be entered since no default is available. This patch fixes
>> the typo, thus providing a valid default choice.
>>
>> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> 
> Hi Florian
> 
> Alex Alder already sent the patch that Neil and I both acked, but I see
> that Alex never sent it to netdev (just checked the headers).
> 
> Oh well...  this is the same change that Alex sent, so ACK, and now it
> can get into the tree.
> 
> Acked-by: Vlad Yasevich <vyasevich@gmail.com>
> 
> Alex, please be sure to CC your patches to netdev as well.

Sorry, I just sent my messages to the addresses listed
on the commit that introduced the problem this fixed.

Linus already pulled in the patch.

					-Alex

> Thanks
> -vlad
> 
>> ---
>>   net/sctp/Kconfig |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
>> index c262106..7521d94 100644
>> --- a/net/sctp/Kconfig
>> +++ b/net/sctp/Kconfig
>> @@ -68,7 +68,7 @@ config SCTP_DBG_OBJCNT
>>         If unsure, say N
>>   choice
>>       prompt "Default SCTP cookie HMAC encoding"
>> -    default SCTP_COOKIE_HMAC_MD5
>> +    default SCTP_DEFAULT_COOKIE_HMAC_MD5
>>       help
>>         This option sets the default sctp cookie hmac algorithm
>>         when in doubt select 'md5'
> 


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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-08 18:20                   ` Alex Elder
@ 2013-01-08 18:28                     ` Vlad Yasevich
  -1 siblings, 0 replies; 46+ messages in thread
From: Vlad Yasevich @ 2013-01-08 18:28 UTC (permalink / raw)
  To: Alex Elder
  Cc: Florian Fainelli, Neil Horman, netdev, David Miller,
	Linus Torvalds, linux-sctp

On 01/08/2013 01:20 PM, Alex Elder wrote:
> On 01/08/2013 12:08 PM, Vlad Yasevich wrote:
>> On 01/08/2013 12:48 PM, Florian Fainelli wrote:
>>> Le 01/07/13 17:39, Vlad Yasevich a écrit :
>>>>>
>>>>>> Would that save all the config trouble?
>>>>>>
>>>>> Yes, it would fix it as Florian has noted, but at the cost of
>>>>> silently modifying
>>>>> what the default hmac config vaule is.  If you've expressly disabled
>>>>> SCTP_COOKIE_HMAC_MD5, and then blindly take the default choice in the
>>>>> SCTP_DEFAULT_COOKIE selection option (the default default as it
>>>>> were), using the
>>>>> approach your suggesting, then that will silently enable
>>>>> SCTP_COOKIE_HMAC_MD5
>>>>> again, which may not be expected by users.  If you expressly have a
>>>>> config
>>>>> option disabled in an old configuration, we should leave it there.
>>>>
>>>> GACK.  Just reproduced this and I really don't like this infinite loop
>>>> of choice prompts.  That's a horrible bug and we need to fix this.
>>>>
>>>> I don't think overriding the value is that big of a deal, especially
>>>> considering that this is exactly what 'make menuconfig' and other
>>>> graphical configs will do.
>>>> If I start with:
>>>>      CONFIG_IP_SCTP=m
>>>>      CONFIG_NET_SCTPPROBE=m
>>>>      # CONFIG_SCTP_DBG_MSG is not set
>>>>      # CONFIG_SCTP_DBG_OBJCNT is not set
>>>>      # CONFIG_SCTP_HMAC_NONE is not set
>>>>      CONFIG_SCTP_HMAC_SHA1=y
>>>>      # CONFIG_SCTP_HMAC_MD5 is not set
>>>>
>>>> then run:
>>>>      yes "" | make oldconfig
>>>>
>>>> I get an infinite loop.
>>>>
>>>> If I run "make menuconfig", I get:
>>>>      CONFIG_IP_SCTP=m
>>>>      CONFIG_NET_SCTPPROBE=m
>>>>      # CONFIG_SCTP_DBG_MSG is not set
>>>>      # CONFIG_SCTP_DBG_OBJCNT is not set
>>>>      CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
>>>>      # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
>>>>      # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
>>>>      CONFIG_SCTP_COOKIE_HMAC_MD5=y
>>>>      # CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set
>>>>
>>>> Note, that SHA1 is now overridden with MD5.
>>>>
>>>> If I change the value of the default choice in Kconfig, the behavior
>>>> between oldconfig and menuconfig is the same.
>>>
>>> Right, the issue is as simple as there is no default *valid* config
>>> symbol being proposed. In any case Neil's patch changes both config
>>> symbol names such that they are non-existent when transitionning from a
>>> pre-3.8-rc config and a 3.8-rc config. The following patch fixes this
>>> for me:
>>>
>>>   From c8e277512bafafc009a3fbf889c78d6b6a06d5fa Mon Sep 17 00:00:00 2001
>>> From: Florian Fainelli <florian@openwrt.org>
>>> Date: Mon, 7 Jan 2013 14:26:15 +0100
>>> Subject: [PATCH] sctp: fix typo in default SCTP cookie choice
>>>
>>> Commit 0d0863b0 (sctp: Change defaults on cookie hmac selection)
>>> introduced a choice configuration option to select the default SCTP
>>> cookie hashing algorithm, a typo was introduced for the default choice.
>>> This is an issue when running make oldconfig because an explicit choice
>>> number must be entered since no default is available. This patch fixes
>>> the typo, thus providing a valid default choice.
>>>
>>> Signed-off-by: Florian Fainelli <florian@openwrt.org>
>>
>> Hi Florian
>>
>> Alex Alder already sent the patch that Neil and I both acked, but I see
>> that Alex never sent it to netdev (just checked the headers).
>>
>> Oh well...  this is the same change that Alex sent, so ACK, and now it
>> can get into the tree.
>>
>> Acked-by: Vlad Yasevich <vyasevich@gmail.com>
>>
>> Alex, please be sure to CC your patches to netdev as well.
>
> Sorry, I just sent my messages to the addresses listed
> on the commit that introduced the problem this fixed.
>
> Linus already pulled in the patch.
>

I see.. Then this is a noop ;)

-vlad

> 					-Alex
>
>> Thanks
>> -vlad
>>
>>> ---
>>>    net/sctp/Kconfig |    2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
>>> index c262106..7521d94 100644
>>> --- a/net/sctp/Kconfig
>>> +++ b/net/sctp/Kconfig
>>> @@ -68,7 +68,7 @@ config SCTP_DBG_OBJCNT
>>>          If unsure, say N
>>>    choice
>>>        prompt "Default SCTP cookie HMAC encoding"
>>> -    default SCTP_COOKIE_HMAC_MD5
>>> +    default SCTP_DEFAULT_COOKIE_HMAC_MD5
>>>        help
>>>          This option sets the default sctp cookie hmac algorithm
>>>          when in doubt select 'md5'
>>
>

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-08 18:28                     ` Vlad Yasevich
  0 siblings, 0 replies; 46+ messages in thread
From: Vlad Yasevich @ 2013-01-08 18:28 UTC (permalink / raw)
  To: Alex Elder
  Cc: Florian Fainelli, Neil Horman, netdev, David Miller,
	Linus Torvalds, linux-sctp

On 01/08/2013 01:20 PM, Alex Elder wrote:
> On 01/08/2013 12:08 PM, Vlad Yasevich wrote:
>> On 01/08/2013 12:48 PM, Florian Fainelli wrote:
>>> Le 01/07/13 17:39, Vlad Yasevich a écrit :
>>>>>
>>>>>> Would that save all the config trouble?
>>>>>>
>>>>> Yes, it would fix it as Florian has noted, but at the cost of
>>>>> silently modifying
>>>>> what the default hmac config vaule is.  If you've expressly disabled
>>>>> SCTP_COOKIE_HMAC_MD5, and then blindly take the default choice in the
>>>>> SCTP_DEFAULT_COOKIE selection option (the default default as it
>>>>> were), using the
>>>>> approach your suggesting, then that will silently enable
>>>>> SCTP_COOKIE_HMAC_MD5
>>>>> again, which may not be expected by users.  If you expressly have a
>>>>> config
>>>>> option disabled in an old configuration, we should leave it there.
>>>>
>>>> GACK.  Just reproduced this and I really don't like this infinite loop
>>>> of choice prompts.  That's a horrible bug and we need to fix this.
>>>>
>>>> I don't think overriding the value is that big of a deal, especially
>>>> considering that this is exactly what 'make menuconfig' and other
>>>> graphical configs will do.
>>>> If I start with:
>>>>      CONFIG_IP_SCTP=m
>>>>      CONFIG_NET_SCTPPROBE=m
>>>>      # CONFIG_SCTP_DBG_MSG is not set
>>>>      # CONFIG_SCTP_DBG_OBJCNT is not set
>>>>      # CONFIG_SCTP_HMAC_NONE is not set
>>>>      CONFIG_SCTP_HMAC_SHA1=y
>>>>      # CONFIG_SCTP_HMAC_MD5 is not set
>>>>
>>>> then run:
>>>>      yes "" | make oldconfig
>>>>
>>>> I get an infinite loop.
>>>>
>>>> If I run "make menuconfig", I get:
>>>>      CONFIG_IP_SCTP=m
>>>>      CONFIG_NET_SCTPPROBE=m
>>>>      # CONFIG_SCTP_DBG_MSG is not set
>>>>      # CONFIG_SCTP_DBG_OBJCNT is not set
>>>>      CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
>>>>      # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
>>>>      # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
>>>>      CONFIG_SCTP_COOKIE_HMAC_MD5=y
>>>>      # CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set
>>>>
>>>> Note, that SHA1 is now overridden with MD5.
>>>>
>>>> If I change the value of the default choice in Kconfig, the behavior
>>>> between oldconfig and menuconfig is the same.
>>>
>>> Right, the issue is as simple as there is no default *valid* config
>>> symbol being proposed. In any case Neil's patch changes both config
>>> symbol names such that they are non-existent when transitionning from a
>>> pre-3.8-rc config and a 3.8-rc config. The following patch fixes this
>>> for me:
>>>
>>>   From c8e277512bafafc009a3fbf889c78d6b6a06d5fa Mon Sep 17 00:00:00 2001
>>> From: Florian Fainelli <florian@openwrt.org>
>>> Date: Mon, 7 Jan 2013 14:26:15 +0100
>>> Subject: [PATCH] sctp: fix typo in default SCTP cookie choice
>>>
>>> Commit 0d0863b0 (sctp: Change defaults on cookie hmac selection)
>>> introduced a choice configuration option to select the default SCTP
>>> cookie hashing algorithm, a typo was introduced for the default choice.
>>> This is an issue when running make oldconfig because an explicit choice
>>> number must be entered since no default is available. This patch fixes
>>> the typo, thus providing a valid default choice.
>>>
>>> Signed-off-by: Florian Fainelli <florian@openwrt.org>
>>
>> Hi Florian
>>
>> Alex Alder already sent the patch that Neil and I both acked, but I see
>> that Alex never sent it to netdev (just checked the headers).
>>
>> Oh well...  this is the same change that Alex sent, so ACK, and now it
>> can get into the tree.
>>
>> Acked-by: Vlad Yasevich <vyasevich@gmail.com>
>>
>> Alex, please be sure to CC your patches to netdev as well.
>
> Sorry, I just sent my messages to the addresses listed
> on the commit that introduced the problem this fixed.
>
> Linus already pulled in the patch.
>

I see.. Then this is a noop ;)

-vlad

> 					-Alex
>
>> Thanks
>> -vlad
>>
>>> ---
>>>    net/sctp/Kconfig |    2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
>>> index c262106..7521d94 100644
>>> --- a/net/sctp/Kconfig
>>> +++ b/net/sctp/Kconfig
>>> @@ -68,7 +68,7 @@ config SCTP_DBG_OBJCNT
>>>          If unsure, say N
>>>    choice
>>>        prompt "Default SCTP cookie HMAC encoding"
>>> -    default SCTP_COOKIE_HMAC_MD5
>>> +    default SCTP_DEFAULT_COOKIE_HMAC_MD5
>>>        help
>>>          This option sets the default sctp cookie hmac algorithm
>>>          when in doubt select 'md5'
>>
>


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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
  2013-01-08 18:28                     ` Vlad Yasevich
@ 2013-01-09  9:08                       ` Florian Fainelli
  -1 siblings, 0 replies; 46+ messages in thread
From: Florian Fainelli @ 2013-01-09  9:08 UTC (permalink / raw)
  To: Vlad Yasevich
  Cc: Alex Elder, Neil Horman, netdev, David Miller, Linus Torvalds,
	linux-sctp

Le 01/08/13 19:28, Vlad Yasevich a écrit :
>>> Hi Florian
>>>
>>> Alex Alder already sent the patch that Neil and I both acked, but I see
>>> that Alex never sent it to netdev (just checked the headers).
>>>
>>> Oh well...  this is the same change that Alex sent, so ACK, and now it
>>> can get into the tree.
>>>
>>> Acked-by: Vlad Yasevich <vyasevich@gmail.com>
>>>
>>> Alex, please be sure to CC your patches to netdev as well.
>>
>> Sorry, I just sent my messages to the addresses listed
>> on the commit that introduced the problem this fixed.
>>
>> Linus already pulled in the patch.
>>
>
> I see.. Then this is a noop ;)

Great, thanks!
--
Florian

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

* Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
@ 2013-01-09  9:08                       ` Florian Fainelli
  0 siblings, 0 replies; 46+ messages in thread
From: Florian Fainelli @ 2013-01-09  9:08 UTC (permalink / raw)
  To: Vlad Yasevich
  Cc: Alex Elder, Neil Horman, netdev, David Miller, Linus Torvalds,
	linux-sctp

Le 01/08/13 19:28, Vlad Yasevich a écrit :
>>> Hi Florian
>>>
>>> Alex Alder already sent the patch that Neil and I both acked, but I see
>>> that Alex never sent it to netdev (just checked the headers).
>>>
>>> Oh well...  this is the same change that Alex sent, so ACK, and now it
>>> can get into the tree.
>>>
>>> Acked-by: Vlad Yasevich <vyasevich@gmail.com>
>>>
>>> Alex, please be sure to CC your patches to netdev as well.
>>
>> Sorry, I just sent my messages to the addresses listed
>> on the commit that introduced the problem this fixed.
>>
>> Linus already pulled in the patch.
>>
>
> I see.. Then this is a noop ;)

Great, thanks!
--
Florian

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

end of thread, other threads:[~2013-01-09  9:11 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-14 18:51 [PATCH] sctp: Change defaults on cookie hmac selection Neil Horman
2012-12-14 18:51 ` Neil Horman
2012-12-14 20:01 ` Vlad Yasevich
2012-12-14 20:01   ` Vlad Yasevich
2012-12-14 21:56 ` Linus Torvalds
2012-12-14 21:56   ` Linus Torvalds
2012-12-15  0:38   ` Neil Horman
2012-12-15  0:38     ` Neil Horman
2012-12-15  0:44     ` Linus Torvalds
2012-12-15  0:44       ` Linus Torvalds
2012-12-15  1:12       ` Neil Horman
2012-12-15  1:12         ` Neil Horman
2012-12-15  1:14         ` David Miller
2012-12-15  1:14           ` David Miller
2012-12-15  1:22 ` [PATCH v2] " Neil Horman
2012-12-15  1:22   ` Neil Horman
2012-12-16  1:16   ` David Miller
2012-12-16  1:16     ` David Miller
2013-01-07 13:25   ` Florian Fainelli
2013-01-07 13:25     ` Florian Fainelli
2013-01-07 14:49     ` Neil Horman
2013-01-07 14:49       ` Neil Horman
2013-01-07 15:15       ` Florian Fainelli
2013-01-07 15:15         ` Florian Fainelli
2013-01-07 15:38         ` Neil Horman
2013-01-07 15:38           ` Neil Horman
2013-01-07 15:48           ` Vlad Yasevich
2013-01-07 15:48             ` Vlad Yasevich
2013-01-08 17:36             ` Florian Fainelli
2013-01-08 17:36               ` Florian Fainelli
2013-01-07 15:32       ` Vlad Yasevich
2013-01-07 15:32         ` Vlad Yasevich
2013-01-07 15:46         ` Neil Horman
2013-01-07 15:46           ` Neil Horman
2013-01-07 16:39           ` Vlad Yasevich
2013-01-07 16:39             ` Vlad Yasevich
2013-01-08 17:48             ` Florian Fainelli
2013-01-08 17:48               ` Florian Fainelli
2013-01-08 18:08               ` Vlad Yasevich
2013-01-08 18:08                 ` Vlad Yasevich
2013-01-08 18:20                 ` Alex Elder
2013-01-08 18:20                   ` Alex Elder
2013-01-08 18:28                   ` Vlad Yasevich
2013-01-08 18:28                     ` Vlad Yasevich
2013-01-09  9:08                     ` Florian Fainelli
2013-01-09  9:08                       ` Florian Fainelli

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.