All of lore.kernel.org
 help / color / mirror / Atom feed
* [cryptodev:master 79/79] (.text+0x330de0): multiple definition of `ecdh_shared_secret'
@ 2016-06-23 19:47 kbuild test robot
  2016-06-24  6:06 ` Salvatore Benedetto
  0 siblings, 1 reply; 10+ messages in thread
From: kbuild test robot @ 2016-06-23 19:47 UTC (permalink / raw)
  Cc: kbuild-all, linux-crypto, Herbert Xu, Salvatore Benedetto

[-- Attachment #1: Type: text/plain, Size: 860 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
head:   3c4b23901a0c766879dff680cd6bdab47bcdbbd2
commit: 3c4b23901a0c766879dff680cd6bdab47bcdbbd2 [79/79] crypto: ecdh - Add ECDH software support
config: i386-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
        git checkout 3c4b23901a0c766879dff680cd6bdab47bcdbbd2
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   net/built-in.o: In function `ecdh_shared_secret':
>> (.text+0x330de0): multiple definition of `ecdh_shared_secret'
   crypto/built-in.o:(.text+0xb1b0): first defined here

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 54419 bytes --]

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

* Re: [cryptodev:master 79/79] (.text+0x330de0): multiple definition of `ecdh_shared_secret'
  2016-06-23 19:47 [cryptodev:master 79/79] (.text+0x330de0): multiple definition of `ecdh_shared_secret' kbuild test robot
@ 2016-06-24  6:06 ` Salvatore Benedetto
  2016-06-24  6:10   ` Herbert Xu
  0 siblings, 1 reply; 10+ messages in thread
From: Salvatore Benedetto @ 2016-06-24  6:06 UTC (permalink / raw)
  To: kbuild test robot, herbert; +Cc: linux-crypto, salvatore.benedetto

On Fri, Jun 24, 2016 at 03:47:04AM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
> head:   3c4b23901a0c766879dff680cd6bdab47bcdbbd2
> commit: 3c4b23901a0c766879dff680cd6bdab47bcdbbd2 [79/79] crypto: ecdh - Add ECDH software support
> config: i386-allyesconfig (attached as .config)
> compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
> reproduce:
>         git checkout 3c4b23901a0c766879dff680cd6bdab47bcdbbd2
>         # save the attached .config to linux build tree
>         make ARCH=i386 
> 
> All errors (new ones prefixed by >>):
> 
>    net/built-in.o: In function `ecdh_shared_secret':
> >> (.text+0x330de0): multiple definition of `ecdh_shared_secret'
>    crypto/built-in.o:(.text+0xb1b0): first defined here
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Hi Herbert,

can you squash the following patch?

Thanks,
Salvatore

---8<---
Rename ecdh_shared_secret

Signed-off-by: Salvatore Benedetto <salvatore.benedetto@intel.com>
---
 crypto/ecc.c  |  8 ++++----
 crypto/ecc.h  | 12 ++++++------
 crypto/ecdh.c |  8 ++++----
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/crypto/ecc.c b/crypto/ecc.c
index 9aedec6..1ba2436 100644
--- a/crypto/ecc.c
+++ b/crypto/ecc.c
@@ -966,10 +966,10 @@ out:
 	return ret;
 }
 
-int ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits,
-		       const u8 *private_key, unsigned int private_key_len,
-		       const u8 *public_key, unsigned int public_key_len,
-		       u8 *secret, unsigned int secret_len)
+int ecdh_compute_ss(unsigned int curve_id, unsigned int ndigits,
+		    const u8 *private_key, unsigned int private_key_len,
+		    const u8 *public_key, unsigned int public_key_len,
+		    u8 *secret, unsigned int secret_len)
 {
 	int ret = 0;
 	struct ecc_point *product, *pk;
diff --git a/crypto/ecc.h b/crypto/ecc.h
index b5db4b9..a856175 100644
--- a/crypto/ecc.h
+++ b/crypto/ecc.h
@@ -60,7 +60,7 @@ int ecdh_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
 		      u8 *public_key, unsigned int public_key_len);
 
 /**
- * ecdh_shared_secret() - Compute a shared secret
+ * ecdh_compute_ss() - Compute a shared secret
  *
  * @curve_id:		id representing the curve to use
  * @private_key:	private key of part A
@@ -70,14 +70,14 @@ int ecdh_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
  * @secret:		buffer for storing the calculated shared secret
  * @secret_len:		length of the secret buffer
  *
- * Note: It is recommended that you hash the result of ecdh_shared_secret
+ * Note: It is recommended that you hash the result of ecdh_compute_ss
  * before using it for symmetric encryption or HMAC.
  *
  * Returns 0 if the shared secret was generated successfully, a negative value
  * if an error occurred.
  */
-int ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits,
-		       const u8 *private_key, unsigned int private_key_len,
-		       const u8 *public_key, unsigned int public_key_len,
-		       u8 *secret, unsigned int secret_len);
+int ecdh_compute_ss(unsigned int curve_id, unsigned int ndigits,
+		    const u8 *private_key, unsigned int private_key_len,
+		    const u8 *public_key, unsigned int public_key_len,
+		    u8 *secret, unsigned int secret_len);
 #endif
diff --git a/crypto/ecdh.c b/crypto/ecdh.c
index d3a9eec..7e12a34 100644
--- a/crypto/ecdh.c
+++ b/crypto/ecdh.c
@@ -79,10 +79,10 @@ static int ecdh_compute_value(struct kpp_request *req)
 		if (copied != 2 * nbytes)
 			return -EINVAL;
 
-		ret = ecdh_shared_secret(ctx->curve_id, ctx->ndigits,
-					 (const u8 *)ctx->private_key, nbytes,
-					 (const u8 *)ctx->public_key, 2 * nbytes,
-					 (u8 *)ctx->shared_secret, nbytes);
+		ret = ecdh_compute_ss(ctx->curve_id, ctx->ndigits,
+				      (const u8 *)ctx->private_key, nbytes,
+				      (const u8 *)ctx->public_key, 2 * nbytes,
+				      (u8 *)ctx->shared_secret, nbytes);
 
 		buf = ctx->shared_secret;
 	} else {
-- 
2.7.4

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

* Re: [cryptodev:master 79/79] (.text+0x330de0): multiple definition of `ecdh_shared_secret'
  2016-06-24  6:06 ` Salvatore Benedetto
@ 2016-06-24  6:10   ` Herbert Xu
  2016-06-24  6:23     ` Herbert Xu
  2016-06-24  6:23     ` Salvatore Benedetto
  0 siblings, 2 replies; 10+ messages in thread
From: Herbert Xu @ 2016-06-24  6:10 UTC (permalink / raw)
  To: Salvatore Benedetto; +Cc: kbuild test robot, linux-crypto

On Fri, Jun 24, 2016 at 07:06:49AM +0100, Salvatore Benedetto wrote:
>
> can you squash the following patch?

No, please prune anything that we don't use from ecc.c.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [cryptodev:master 79/79] (.text+0x330de0): multiple definition of `ecdh_shared_secret'
  2016-06-24  6:10   ` Herbert Xu
@ 2016-06-24  6:23     ` Herbert Xu
       [not found]       ` <20160624062316.GA16985-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
  2016-06-24  6:23     ` Salvatore Benedetto
  1 sibling, 1 reply; 10+ messages in thread
From: Herbert Xu @ 2016-06-24  6:23 UTC (permalink / raw)
  To: Salvatore Benedetto; +Cc: kbuild test robot, linux-crypto

On Fri, Jun 24, 2016 at 02:10:12PM +0800, Herbert Xu wrote:
> On Fri, Jun 24, 2016 at 07:06:49AM +0100, Salvatore Benedetto wrote:
> >
> > can you squash the following patch?
> 
> No, please prune anything that we don't use from ecc.c.

I take that back.  I see it's actually coming from bluetooth.

How about moving ecc.c to lib so that it's shared between the
two?

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [cryptodev:master 79/79] (.text+0x330de0): multiple definition of `ecdh_shared_secret'
  2016-06-24  6:10   ` Herbert Xu
  2016-06-24  6:23     ` Herbert Xu
@ 2016-06-24  6:23     ` Salvatore Benedetto
  2016-06-24  6:25       ` Herbert Xu
  1 sibling, 1 reply; 10+ messages in thread
From: Salvatore Benedetto @ 2016-06-24  6:23 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, fengguang.wu

On Fri, Jun 24, 2016 at 02:10:12PM +0800, Herbert Xu wrote:
> On Fri, Jun 24, 2016 at 07:06:49AM +0100, Salvatore Benedetto wrote:
> >
> > can you squash the following patch?
> 
> No, please prune anything that we don't use from ecc.c.

We do use the symbol in question, and I'm pretty sure we use
all of crypto/ecc.c. I was going to send a patch where
I remove the net/bluetooth/ecc.c

How do you want me to proceed with this build failure?
Do you want me to send a new patch so that you can revert
3c4b23901a0c766879dff680cd6bdab47bcdbbd2 ?

Thanks,
Salvatore

> Thanks,
> -- 
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" 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] 10+ messages in thread

* Re: [cryptodev:master 79/79] (.text+0x330de0): multiple definition of `ecdh_shared_secret'
  2016-06-24  6:23     ` Salvatore Benedetto
@ 2016-06-24  6:25       ` Herbert Xu
  0 siblings, 0 replies; 10+ messages in thread
From: Herbert Xu @ 2016-06-24  6:25 UTC (permalink / raw)
  To: Salvatore Benedetto; +Cc: linux-crypto, fengguang.wu

On Fri, Jun 24, 2016 at 07:23:42AM +0100, Salvatore Benedetto wrote:
>
> We do use the symbol in question, and I'm pretty sure we use
> all of crypto/ecc.c. I was going to send a patch where
> I remove the net/bluetooth/ecc.c

I see.  In that case either rename the symbols in net/bluetooth/ecc.c
since it's going away or just do the bluetooth conversion.

Please send any new patches based on the current tree.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [cryptodev:master 79/79] (.text+0x330de0): multiple definition of `ecdh_shared_secret'
  2016-06-24  6:23     ` Herbert Xu
@ 2016-06-24  6:36           ` Salvatore Benedetto
  0 siblings, 0 replies; 10+ messages in thread
From: Salvatore Benedetto @ 2016-06-24  6:36 UTC (permalink / raw)
  To: Herbert Xu
  Cc: linux-crypto-u79uwXL29TY76Z2rM5mHXA,
	fengguang.wu-ral2JQCrhuEAvxtiuMwx3w,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA

On Fri, Jun 24, 2016 at 07:23:16AM +0100, Herbert Xu wrote:
> On Fri, Jun 24, 2016 at 02:10:12PM +0800, Herbert Xu wrote:
> > On Fri, Jun 24, 2016 at 07:06:49AM +0100, Salvatore Benedetto wrote:
> > >
> > > can you squash the following patch?
> > 
> > No, please prune anything that we don't use from ecc.c.
> 
> I take that back.  I see it's actually coming from bluetooth.
> 
> How about moving ecc.c to lib so that it's shared between the
> two?

The patch was based on the current tree. I just pulled.
There is not point in moving to lib because bluetooth is
about to be converted to kpp. 
That patch I believe will go up the bluetooth tree, so
my suggestion is to simply accept that I fail to properly
name that symbol.

Renaming the symbol in net/bluetooth/ecc which I think will conflict
with the patch where I remove it completely which, again, I believe
will go up the BT tree.

Thanks,
Salvatore

> Thanks,
> -- 
> Email: Herbert Xu <herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [cryptodev:master 79/79] (.text+0x330de0): multiple definition of `ecdh_shared_secret'
@ 2016-06-24  6:36           ` Salvatore Benedetto
  0 siblings, 0 replies; 10+ messages in thread
From: Salvatore Benedetto @ 2016-06-24  6:36 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, fengguang.wu, linux-bluetooth

On Fri, Jun 24, 2016 at 07:23:16AM +0100, Herbert Xu wrote:
> On Fri, Jun 24, 2016 at 02:10:12PM +0800, Herbert Xu wrote:
> > On Fri, Jun 24, 2016 at 07:06:49AM +0100, Salvatore Benedetto wrote:
> > >
> > > can you squash the following patch?
> > 
> > No, please prune anything that we don't use from ecc.c.
> 
> I take that back.  I see it's actually coming from bluetooth.
> 
> How about moving ecc.c to lib so that it's shared between the
> two?

The patch was based on the current tree. I just pulled.
There is not point in moving to lib because bluetooth is
about to be converted to kpp. 
That patch I believe will go up the bluetooth tree, so
my suggestion is to simply accept that I fail to properly
name that symbol.

Renaming the symbol in net/bluetooth/ecc which I think will conflict
with the patch where I remove it completely which, again, I believe
will go up the BT tree.

Thanks,
Salvatore

> Thanks,
> -- 
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [cryptodev:master 79/79] (.text+0x330de0): multiple definition of `ecdh_shared_secret'
  2016-06-24  6:36           ` Salvatore Benedetto
  (?)
@ 2016-06-24  6:45           ` Herbert Xu
  2016-06-24 12:57             ` Benedetto, Salvatore
  -1 siblings, 1 reply; 10+ messages in thread
From: Herbert Xu @ 2016-06-24  6:45 UTC (permalink / raw)
  To: Salvatore Benedetto; +Cc: linux-crypto, fengguang.wu, linux-bluetooth

On Fri, Jun 24, 2016 at 07:36:44AM +0100, Salvatore Benedetto wrote:
>
> 
> The patch was based on the current tree. I just pulled.
> There is not point in moving to lib because bluetooth is
> about to be converted to kpp. 
> That patch I believe will go up the bluetooth tree, so
> my suggestion is to simply accept that I fail to properly
> name that symbol.
> 
> Renaming the symbol in net/bluetooth/ecc which I think will conflict
> with the patch where I remove it completely which, again, I believe
> will go up the BT tree.

OK I will have no option but to revert your patches then.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* RE: [cryptodev:master 79/79] (.text+0x330de0): multiple definition of `ecdh_shared_secret'
  2016-06-24  6:45           ` Herbert Xu
@ 2016-06-24 12:57             ` Benedetto, Salvatore
  0 siblings, 0 replies; 10+ messages in thread
From: Benedetto, Salvatore @ 2016-06-24 12:57 UTC (permalink / raw)
  To: Herbert Xu
  Cc: linux-crypto, Wu, Fengguang, linux-bluetooth, Benedetto, Salvatore



> -----Original Message-----
> From: Herbert Xu [mailto:herbert@gondor.apana.org.au]
> Sent: Friday, June 24, 2016 7:45 AM
> To: Benedetto, Salvatore <salvatore.benedetto@intel.com>
> Cc: linux-crypto@vger.kernel.org; Wu, Fengguang
> <fengguang.wu@intel.com>; linux-bluetooth@vger.kernel.org
> Subject: Re: [cryptodev:master 79/79] (.text+0x330de0): multiple definition
> of `ecdh_shared_secret'
> 
> On Fri, Jun 24, 2016 at 07:36:44AM +0100, Salvatore Benedetto wrote:
> >
> >
> > The patch was based on the current tree. I just pulled.
> > There is not point in moving to lib because bluetooth is about to be
> > converted to kpp.
> > That patch I believe will go up the bluetooth tree, so my suggestion
> > is to simply accept that I fail to properly name that symbol.
> >
> > Renaming the symbol in net/bluetooth/ecc which I think will conflict
> > with the patch where I remove it completely which, again, I believe
> > will go up the BT tree.
> 
> OK I will have no option but to revert your patches then.

Please revert the last one only and I'll resend it with the symbol
name fixed. I don't see why you should revert all of them.

I also just sent the BT patch which was changing the symbol name
anyway.

Regards,
Salvatore 

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

end of thread, other threads:[~2016-06-24 12:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-23 19:47 [cryptodev:master 79/79] (.text+0x330de0): multiple definition of `ecdh_shared_secret' kbuild test robot
2016-06-24  6:06 ` Salvatore Benedetto
2016-06-24  6:10   ` Herbert Xu
2016-06-24  6:23     ` Herbert Xu
     [not found]       ` <20160624062316.GA16985-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2016-06-24  6:36         ` Salvatore Benedetto
2016-06-24  6:36           ` Salvatore Benedetto
2016-06-24  6:45           ` Herbert Xu
2016-06-24 12:57             ` Benedetto, Salvatore
2016-06-24  6:23     ` Salvatore Benedetto
2016-06-24  6:25       ` Herbert Xu

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.