All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sctp: fix Kconfig bug in default cookie hmac selection
@ 2013-01-07 16:47 Alex Elder
  2013-01-07 17:41 ` Neil Horman
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alex Elder @ 2013-01-07 16:47 UTC (permalink / raw)
  To: linux-sctp

The following commit added a "choice" to the sctp Kconfig file.  It
introduced a bug which led to an infinite loop when while running
"make oldconfig".

    0d0863b0 sctp: Change defaults on cookie hmac selection

The problem is that the wrong symbol was defined as the default
value for the choice.  Using the correct value gets rid of the
infinite loop.

Note:  if CONFIG_SCTP_COOKIE_HMAC_SHA1=y was present in the input
config file, both that and CONFIG_SCTP_COOKIE_HMAC_MD5=y be present
in the generated config file.

Signed-off-by: Alex Elder <elder@inktank.com>
---
 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.9.5


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

* Re: [PATCH] sctp: fix Kconfig bug in default cookie hmac selection
  2013-01-07 16:47 [PATCH] sctp: fix Kconfig bug in default cookie hmac selection Alex Elder
@ 2013-01-07 17:41 ` Neil Horman
  2013-01-07 17:53 ` Alex Elder
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Neil Horman @ 2013-01-07 17:41 UTC (permalink / raw)
  To: linux-sctp

On Mon, Jan 07, 2013 at 10:47:46AM -0600, Alex Elder wrote:
> The following commit added a "choice" to the sctp Kconfig file.  It
> introduced a bug which led to an infinite loop when while running
> "make oldconfig".
> 
>     0d0863b0 sctp: Change defaults on cookie hmac selection
> 
> The problem is that the wrong symbol was defined as the default
> value for the choice.  Using the correct value gets rid of the
> infinite loop.
> 
> Note:  if CONFIG_SCTP_COOKIE_HMAC_SHA1=y was present in the input
> config file, both that and CONFIG_SCTP_COOKIE_HMAC_MD5=y be present
> in the generated config file.
> 
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
>  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.9.5
> 
> 
I really, _really_ don't like this.  This does exactly what I was talking about
before, in that it resolves the loop, but it does so by silently overriding the
pre-existing configuration, which I think is wrong.  Vlad and I have discussed
it though, and he's convinced me that, despite the silent override, the rest of
the kernel behaves the same arguably broken way, so we may as well have this
operate in the same way.  I would really far prefer that the config looped to
make you select a default that was't in conflict with your existing config, but
I guess those who care to select non-deafult options will catch the change
anyway, and if you just hit enter, you have to expect changes.

Acked-by: Neil Horman <nhorman@tuxriver.com>


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

* Re: [PATCH] sctp: fix Kconfig bug in default cookie hmac selection
  2013-01-07 16:47 [PATCH] sctp: fix Kconfig bug in default cookie hmac selection Alex Elder
  2013-01-07 17:41 ` Neil Horman
@ 2013-01-07 17:53 ` Alex Elder
  2013-01-07 17:53 ` Vlad Yasevich
  2013-01-07 18:04 ` Neil Horman
  3 siblings, 0 replies; 5+ messages in thread
From: Alex Elder @ 2013-01-07 17:53 UTC (permalink / raw)
  To: linux-sctp

On 01/07/2013 11:41 AM, Neil Horman wrote:
> On Mon, Jan 07, 2013 at 10:47:46AM -0600, Alex Elder wrote:
>> The following commit added a "choice" to the sctp Kconfig file.  It
>> introduced a bug which led to an infinite loop when while running
>> "make oldconfig".
>>
>>     0d0863b0 sctp: Change defaults on cookie hmac selection
>>
>> The problem is that the wrong symbol was defined as the default
>> value for the choice.  Using the correct value gets rid of the
>> infinite loop.
>>
>> Note:  if CONFIG_SCTP_COOKIE_HMAC_SHA1=y was present in the input
>> config file, both that and CONFIG_SCTP_COOKIE_HMAC_MD5=y be present
>> in the generated config file.
>>
>> Signed-off-by: Alex Elder <elder@inktank.com>
>> ---
>>  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.9.5
>>
>>
> I really, _really_ don't like this.  This does exactly what I was talking about
> before, in that it resolves the loop, but it does so by silently overriding the
> pre-existing configuration, which I think is wrong.  Vlad and I have discussed

I know, that's why I mentioned it explicitly in my explanation.

I experiemented with "optional" but it didn't do the right thing
either.

> it though, and he's convinced me that, despite the silent override, the rest of
> the kernel behaves the same arguably broken way, so we may as well have this

Yup, I checked that too.  It's risky, but at the moment, it
will have no adverse affect on the how the code functions.

> operate in the same way.  I would really far prefer that the config looped to
> make you select a default that was't in conflict with your existing config, but
> I guess those who care to select non-deafult options will catch the change
> anyway, and if you just hit enter, you have to expect changes.
>
> Acked-by: Neil Horman <nhorman@tuxriver.com>

Thanks a lot.

					-Alex


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

* Re: [PATCH] sctp: fix Kconfig bug in default cookie hmac selection
  2013-01-07 16:47 [PATCH] sctp: fix Kconfig bug in default cookie hmac selection Alex Elder
  2013-01-07 17:41 ` Neil Horman
  2013-01-07 17:53 ` Alex Elder
@ 2013-01-07 17:53 ` Vlad Yasevich
  2013-01-07 18:04 ` Neil Horman
  3 siblings, 0 replies; 5+ messages in thread
From: Vlad Yasevich @ 2013-01-07 17:53 UTC (permalink / raw)
  To: linux-sctp

On 01/07/2013 11:47 AM, Alex Elder wrote:
> The following commit added a "choice" to the sctp Kconfig file.  It
> introduced a bug which led to an infinite loop when while running
> "make oldconfig".
>
>      0d0863b0 sctp: Change defaults on cookie hmac selection
>
> The problem is that the wrong symbol was defined as the default
> value for the choice.  Using the correct value gets rid of the
> infinite loop.
>
> Note:  if CONFIG_SCTP_COOKIE_HMAC_SHA1=y was present in the input
> config file, both that and CONFIG_SCTP_COOKIE_HMAC_MD5=y be present
> in the generated config file.
>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
>   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'
>

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

This does resolve the loop and makes the oldconfig behavior consistent 
with menuconfig.

-vlad


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

* Re: [PATCH] sctp: fix Kconfig bug in default cookie hmac selection
  2013-01-07 16:47 [PATCH] sctp: fix Kconfig bug in default cookie hmac selection Alex Elder
                   ` (2 preceding siblings ...)
  2013-01-07 17:53 ` Vlad Yasevich
@ 2013-01-07 18:04 ` Neil Horman
  3 siblings, 0 replies; 5+ messages in thread
From: Neil Horman @ 2013-01-07 18:04 UTC (permalink / raw)
  To: linux-sctp

On Mon, Jan 07, 2013 at 11:53:19AM -0600, Alex Elder wrote:
> On 01/07/2013 11:41 AM, Neil Horman wrote:
> > On Mon, Jan 07, 2013 at 10:47:46AM -0600, Alex Elder wrote:
> >> The following commit added a "choice" to the sctp Kconfig file.  It
> >> introduced a bug which led to an infinite loop when while running
> >> "make oldconfig".
> >>
> >>     0d0863b0 sctp: Change defaults on cookie hmac selection
> >>
> >> The problem is that the wrong symbol was defined as the default
> >> value for the choice.  Using the correct value gets rid of the
> >> infinite loop.
> >>
> >> Note:  if CONFIG_SCTP_COOKIE_HMAC_SHA1=y was present in the input
> >> config file, both that and CONFIG_SCTP_COOKIE_HMAC_MD5=y be present
> >> in the generated config file.
> >>
> >> Signed-off-by: Alex Elder <elder@inktank.com>
> >> ---
> >>  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.9.5
> >>
> >>
> > I really, _really_ don't like this.  This does exactly what I was talking about
> > before, in that it resolves the loop, but it does so by silently overriding the
> > pre-existing configuration, which I think is wrong.  Vlad and I have discussed
> 
> I know, that's why I mentioned it explicitly in my explanation.
> 
> I experiemented with "optional" but it didn't do the right thing
> either.
> 
> > it though, and he's convinced me that, despite the silent override, the rest of
> > the kernel behaves the same arguably broken way, so we may as well have this
> 
> Yup, I checked that too.  It's risky, but at the moment, it
> will have no adverse affect on the how the code functions.
> 
> > operate in the same way.  I would really far prefer that the config looped to
> > make you select a default that was't in conflict with your existing config, but
> > I guess those who care to select non-deafult options will catch the change
> > anyway, and if you just hit enter, you have to expect changes.
> >
> > Acked-by: Neil Horman <nhorman@tuxriver.com>
> 
> Thanks a lot.
> 
No worries, thanks for bearing with me.
Neil

> 					-Alex
> 
> 

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

end of thread, other threads:[~2013-01-07 18:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 16:47 [PATCH] sctp: fix Kconfig bug in default cookie hmac selection Alex Elder
2013-01-07 17:41 ` Neil Horman
2013-01-07 17:53 ` Alex Elder
2013-01-07 17:53 ` Vlad Yasevich
2013-01-07 18:04 ` Neil Horman

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.