Skip to contentSkip to conversation

subflow.c:undefined reference to `__crypto_memneq'

PATCH In review Florian Westphal 4 participants 6 messages Jan 18, 2020 – Jan 20, 2020 Networking MPTCP

lore
Share & tools
lore

Florian Westphal

author
#0 lore raw

PATCH 22/38 subflow.c:undefined reference to `__crypto_memneq'

----- Forwarded message from kbuild test robot <lkp(a)intel.com> -----

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/martineau/linux.git kbuild-mptcp
head:   c4ccdd8177fb3d8123dd294ae93ee2dac1f43f32
commit: ccd5b6ef8fd4b37a7721231a55482523b07d7ef9 [22/38] mptcp: Add handling of incoming MP_JOIN requests
config: xtensa-common_defconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.5.0

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
git checkout ccd5b6ef8fd4b37a7721231a55482523b07d7ef9
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=xtensa

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>

All errors (new ones prefixed by >>):

net/mptcp/subflow.o: In function `subflow_ulp_release':

Quoted 1 line
Quoted 1 line

subflow.c:(.text+0x41c): undefined reference to `__crypto_memneq'

net/mptcp/subflow.o: In function `subflow_syn_recv_sock':
subflow.c:(.text+0x53a): undefined reference to `__crypto_memneq'

Hmpf. The .config has CONFIG_CRYPTO=n and then the symbol doesn't exist.

So we have two choices:
- select CRYPTO from Kconfig
- use plain memcmp as before (might reveal info about key though)
- copypaste a similar function into mptcp.

What do you think?

#1 lore raw
Quoted 27 lines · Florian Westphal

----- Forwarded message from kbuild test robot <lkp(a)intel.com> -----

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/martineau/linux.git kbuild-mptcp
head:   c4ccdd8177fb3d8123dd294ae93ee2dac1f43f32
commit: ccd5b6ef8fd4b37a7721231a55482523b07d7ef9 [22/38] mptcp: Add handling of incoming MP_JOIN requests
config: xtensa-common_defconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.5.0

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
git checkout ccd5b6ef8fd4b37a7721231a55482523b07d7ef9
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=xtensa

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>

All errors (new ones prefixed by >>):

net/mptcp/subflow.o: In function `subflow_ulp_release':

Quoted 1 line
Quoted 1 line

subflow.c:(.text+0x41c): undefined reference to `__crypto_memneq'

net/mptcp/subflow.o: In function `subflow_syn_recv_sock':
subflow.c:(.text+0x53a): undefined reference to `__crypto_memneq'

Hmpf. The .config has CONFIG_CRYPTO=n and then the symbol doesn't exist.

Quoted 6 lines

So we have two choices:
- select CRYPTO from Kconfig
- use plain memcmp as before (might reveal info about key though)
- copypaste a similar function into mptcp.

What do you think?

I prefer selecting CRYPTO over copy/paste. Plain memcmp does not seem suitable.

--
Mat Martineau
Intel

#2 lore raw
Quoted 29 lines · Mat Martineau
Quoted 27 lines · Florian Westphal

----- Forwarded message from kbuild test robot <lkp(a)intel.com> -----

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/martineau/linux.git kbuild-mptcp
head:   c4ccdd8177fb3d8123dd294ae93ee2dac1f43f32
commit: ccd5b6ef8fd4b37a7721231a55482523b07d7ef9 [22/38] mptcp: Add handling of incoming MP_JOIN requests
config: xtensa-common_defconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.5.0

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
git checkout ccd5b6ef8fd4b37a7721231a55482523b07d7ef9
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=xtensa

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>

All errors (new ones prefixed by >>):

net/mptcp/subflow.o: In function `subflow_ulp_release':

Quoted 1 line
Quoted 1 line

subflow.c:(.text+0x41c): undefined reference to `__crypto_memneq'

net/mptcp/subflow.o: In function `subflow_syn_recv_sock':
subflow.c:(.text+0x53a): undefined reference to `__crypto_memneq'

Hmpf. The .config has CONFIG_CRYPTO=n and then the symbol doesn't exist.

Quoted 8 lines
Quoted 6 lines

So we have two choices:
- select CRYPTO from Kconfig
- use plain memcmp as before (might reveal info about key though)
- copypaste a similar function into mptcp.

What do you think?

I prefer selecting CRYPTO over copy/paste.

I agree with 'select CRYPTO=y'

/P

#3 lore raw

Hi Florian, Mat, Paolo,

Quoted 35 lines · Paolo Abeni
Quoted 34 lines · Mat Martineau
Quoted 32 lines · Florian Westphal

----- Forwarded message from kbuild test robot <lkp(a)intel.com> -----

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/martineau/linux.git kbuild-mptcp
head:   c4ccdd8177fb3d8123dd294ae93ee2dac1f43f32
commit: ccd5b6ef8fd4b37a7721231a55482523b07d7ef9 [22/38] mptcp: Add handling of incoming MP_JOIN requests
config: xtensa-common_defconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.5.0

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
git checkout ccd5b6ef8fd4b37a7721231a55482523b07d7ef9
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=xtensa

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>

All errors (new ones prefixed by >>):

net/mptcp/subflow.o: In function `subflow_ulp_release':

Quoted 1 line
Quoted 1 line

subflow.c:(.text+0x41c): undefined reference to `__crypto_memneq'

net/mptcp/subflow.o: In function `subflow_syn_recv_sock':

   subflow.c:(.text+0x53a): undefined reference to `__crypto_memneq'

Hmpf. The .config has CONFIG_CRYPTO=n and then the symbol doesn't exist.

So we have two choices:
- select CRYPTO from Kconfig
- use plain memcmp as before (might reveal info about key though)
- copypaste a similar function into mptcp.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

What do you think?

I prefer selecting CRYPTO over copy/paste.

I agree with 'select CRYPTO=y'

Me too.

Florian: do you ask the question because you think we can have issues or comments from net maintainers when forcing the selection of CRYPTO for MPTCP?

Do we plan to do this modification in "mptcp: Add handling of incoming MP_JOIN requests" commit (part 3) or before (part 2, when starting using functions from CRYPTO, e.g. "mptcp: Add key generation and token tree")?

Cheers,
Matt

Signature · 5 lines
Matthieu Baerts | R&D Engineer
matthieu.baerts(a)tessares.net
Tessares SA | Hybrid Access Solutions
www.tessares.net
1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium
author
#4 lore raw
Quoted 9 lines · Matthieu Baerts
Quoted 3 lines
Quoted 1 line

I prefer selecting CRYPTO over copy/paste.

I agree with 'select CRYPTO=y'

Me too.

Florian: do you ask the question because you think we can have issues or comments from net maintainers when forcing the selection of CRYPTO for MPTCP?

I think its fine, tcpmd5 and ipsec select it too.

Quoted 3 lines

Do we plan to do this modification in "mptcp: Add handling of incoming MP_JOIN requests" commit (part 3) or before (part 2, when starting using functions from CRYPTO, e.g. "mptcp: Add key generation and token tree")?

I'm currently travelling so I can't comment which commit makes the most sense. It should be added when the first crypto functions are used, I think.

#5 lore raw

Hi Florian,

Quoted 5 lines · Florian Westphal
Quoted 4 lines · Matthieu Baerts
Quoted 3 lines
Quoted 1 line

I prefer selecting CRYPTO over copy/paste.

I agree with 'select CRYPTO=y'

Quoted 7 lines
Quoted 5 lines

Me too.

Florian: do you ask the question because you think we can have issues or comments from net maintainers when forcing the selection of CRYPTO for MPTCP?

I think its fine, tcpmd5 and ipsec select it too.

Good point, thank you for your reply.
Many are doing that, e.g. in net: bluetooth, ceph, mac80211, mac802154, rxrpc, sctp, tipc, tls, xfrm.

Quoted 7 lines
Quoted 3 lines

Do we plan to do this modification in "mptcp: Add handling of incoming MP_JOIN requests" commit (part 3) or before (part 2, when starting using functions from CRYPTO, e.g. "mptcp: Add key generation and token tree")?

I'm currently travelling so I can't comment which commit makes the most sense. It should be added when the first crypto functions are used, I think.

Here is what I saw:

- "mptcp: Add key generation and token tree" commit introduces crypto.c but it only uses functions from lib/: sha_init(), sha_transform()

- "mptcp: move from sha1 (v0) to sha256 (v1)" commit is using sha256 primitives from include/crypto/sha.h, e.g. sha256_init() instead of function from crypto module. Paolo already added CRYPTO_LIB_SHA256 (and not CRYPTO_SHA256).

- "mptcp: Add handling of incoming MP_JOIN requests" commit is using "crypto_memneq" which needs CRYPTO.

So if I'm not mistaken, we need CRYPTO only for part 3.

Please tell me if I miss something :)

Cheers,
Matt

Signature · 5 lines
Matthieu Baerts | R&D Engineer
matthieu.baerts(a)tessares.net
Tessares SA | Hybrid Access Solutions
www.tessares.net
1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium