netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevich@gmail.com>
To: Alex Elder <elder@inktank.com>
Cc: Florian Fainelli <florian@openwrt.org>,
	Neil Horman <nhorman@tuxdriver.com>,
	netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-sctp@vger.kernel.org
Subject: Re: [PATCH v2] sctp: Change defaults on cookie hmac selection
Date: Tue, 08 Jan 2013 13:28:26 -0500	[thread overview]
Message-ID: <50EC654A.9070506@gmail.com> (raw)
In-Reply-To: <50EC6378.7020505@inktank.com>

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'
>>
>

  reply	other threads:[~2013-01-08 18:28 UTC|newest]

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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50EC654A.9070506@gmail.com \
    --to=vyasevich@gmail.com \
    --cc=davem@davemloft.net \
    --cc=elder@inktank.com \
    --cc=florian@openwrt.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).