Skip to contentSkip to conversation

sctp: fix Kconfig bug in default cookie hmac selection

PATCH In review Alex Elder 3 participants 5 messages Jan 7, 2013

Subsystems (2)
lore
Share & tools
lore

Alex Elder

author
#0 lore raw

PATCH 1/1 sctp: fix Kconfig bug in default cookie hmac selection

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.

---
 net/sctp/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sctp/Kconfig +1 -1
index c262106..7521d94 100644
@@ -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'
Signature · 1 line
1.7.9.5
Acked-by on v1 1/1
#1 lore raw
Quoted 36 lines · Alex Elder

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.

---
 net/sctp/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sctp/Kconfig +1 -1
index c262106..7521d94 100644
@@ -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'
Signature · 1 line
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.

author
#2 lore raw
In reply to Alex Elder
Quoted 32 lines · Neil Horman
Quoted 31 lines · Alex Elder

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.

---
 net/sctp/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sctp/Kconfig +1 -1
index c262106..7521d94 100644
@@ -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
Quoted 8 lines
Quoted 5 lines
net/sctp/Kconfig +0 -0
 	  when in doubt select 'md5'
Signature · 1 line
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.

Quoted 2 lines

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.

Quoted 6 lines

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.

Thanks a lot.

-Alex

Tested-by Acked-by on v1 1/1
#3 lore raw
In reply to Alex Elder
Quoted 25 lines · Alex Elder

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.

---
  net/sctp/Kconfig |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
net/sctp/Kconfig +0 -0
index c262106..7521d94 100644

net/sctp/Kconfig config SCTP_DBG_OBJCNT · line 74

Quoted 8 lines
net/sctp/Kconfig +1 -1
@@ -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'

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

-vlad

#4 lore raw
In reply to Alex Elder
Quoted 53 lines · Alex Elder
Quoted 32 lines · Neil Horman
Quoted 31 lines · Alex Elder

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.

---
 net/sctp/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sctp/Kconfig +1 -1
index c262106..7521d94 100644
@@ -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
Quoted 8 lines
Quoted 5 lines
net/sctp/Kconfig +0 -0
 	  when in doubt select 'md5'
Signature · 1 line
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.

Quoted 2 lines

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.

Quoted 9 lines
Quoted 6 lines

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.

Thanks a lot.

No worries, thanks for bearing with me.
Neil

Quoted 3 lines

-Alex