From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Andrew Morton <akpm@linux-foundation.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [build bug] SCTP, net/sctp/auth.c, ./net/rxrpc/ar-key.c fails to build
Date: Wed, 28 Nov 2007 11:05:49 -0500 [thread overview]
Message-ID: <474D91DD.7000908@hp.com> (raw)
In-Reply-To: <20071128145804.GA23823@elte.hu>
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
Ingo Molnar wrote:
> * Vlad Yasevich <vladislav.yasevich@hp.com> wrote:
>
>>>> this is a build regression over v2.6.23. config attached.
>>> the patch below fix it (or rather, works it around).
>>>
>> The patch is an OK workaround, but may not yield a working SCTP.
>>
>> Let me see if I can do better..
>
> i'd be glad to test any patch. Note, the config was generated via 'make
> randconfig', for automated build and boot QA, and "working SCTP" is not
> something that is necessary for such a kernel to boot. So the workaround
> might be fine as well - not all config space combinations that are
> reachable via 'make randconfig' make "sense", but they should still
> build and boot fine.
>
> Ingo
>
I am testing with this patch right now...
-vlad
[-- Attachment #2: foo --]
[-- Type: text/plain, Size: 1809 bytes --]
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index da8354e..e71b5f1 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -438,11 +438,14 @@ enum {
SCTP_AUTH_HMAC_ID_RESERVED_0,
SCTP_AUTH_HMAC_ID_SHA1,
SCTP_AUTH_HMAC_ID_RESERVED_2,
- SCTP_AUTH_HMAC_ID_SHA256
+#if defined (CONFIG_CRYPTO_SHA256) || defined (CONFIG_CRYPTO_SHA256_MODULE)
+ SCTP_AUTH_HMAC_ID_SHA256,
+#endif
+ __SCTP_AUTH_HMAC_MAX
};
-#define SCTP_AUTH_HMAC_ID_MAX SCTP_AUTH_HMAC_ID_SHA256
-#define SCTP_AUTH_NUM_HMACS (SCTP_AUTH_HMAC_ID_SHA256 + 1)
+#define SCTP_AUTH_HMAC_ID_MAX __SCTP_AUTH_HMAC_MAX - 1
+#define SCTP_AUTH_NUM_HMACS __SCTP_AUTH_HMAC_MAX
#define SCTP_SHA1_SIG_SIZE 20
#define SCTP_SHA256_SIG_SIZE 32
diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
index 8210f54..5390bc7 100644
--- a/net/sctp/Kconfig
+++ b/net/sctp/Kconfig
@@ -6,9 +6,9 @@ menuconfig IP_SCTP
tristate "The SCTP Protocol (EXPERIMENTAL)"
depends on INET && EXPERIMENTAL
depends on IPV6 || IPV6=n
- select CRYPTO if SCTP_HMAC_SHA1 || SCTP_HMAC_MD5
- select CRYPTO_HMAC if SCTP_HMAC_SHA1 || SCTP_HMAC_MD5
- select CRYPTO_SHA1 if SCTP_HMAC_SHA1
+ select CRYPTO
+ select CRYPTO_HMAC
+ select CRYPTO_SHA1
select CRYPTO_MD5 if SCTP_HMAC_MD5
---help---
Stream Control Transmission Protocol
diff --git a/net/sctp/auth.c b/net/sctp/auth.c
index 6d5fa6b..64b5c7a 100644
--- a/net/sctp/auth.c
+++ b/net/sctp/auth.c
@@ -54,11 +54,13 @@ static struct sctp_hmac sctp_hmac_list[SCTP_AUTH_NUM_HMACS] = {
/* id 2 is reserved as well */
.hmac_id = SCTP_AUTH_HMAC_ID_RESERVED_2,
},
+#if defined (CONFIG_CRYPTO_SHA256) || defined (CONFIG_CRYPTO_SHA256_MODULE)
{
.hmac_id = SCTP_AUTH_HMAC_ID_SHA256,
.hmac_name="hmac(sha256)",
.hmac_len = SCTP_SHA256_SIG_SIZE,
}
+#endif
};
next prev parent reply other threads:[~2007-11-28 15:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-22 15:33 [build bug] ./net/rxrpc/ar-key.c fails to build Ingo Molnar
2007-11-22 19:01 ` David Howells
2007-11-28 12:44 ` [build bug] SCTP, net/sctp/auth.c, " Ingo Molnar
2007-11-28 12:47 ` Ingo Molnar
2007-11-28 15:24 ` Vlad Yasevich
2007-11-28 14:58 ` Ingo Molnar
2007-11-28 16:05 ` Vlad Yasevich [this message]
2007-11-28 14:53 ` [PATCH] AF_RXRPC: Configure crypto correctly for AF_RXRPC David Howells
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=474D91DD.7000908@hp.com \
--to=vladislav.yasevich@hp.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rjw@sisk.pl \
/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).