lkml.org 
[lkml]   [2013]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: memcmp in modules
From
Date
Andy Shevchenko wrote:
> What did I miss?

Well, as of linux-next-20130422, memcmp() is not correctly exported to modules.
Since linux-3.9-rc8 correctly exports memcmp(), this problem seems to be introduced
in linux-next tree. Also, this problem seems to involve CONFIG_MODVERSIONS=y.

[root@localhost linux-next]# modprobe ipv6
FATAL: Error inserting ipv6 (/lib/modules/3.9.0-rc8-next-20130422/kernel/net/ipv6/ipv6.ko): Invalid argument
[root@localhost linux-next]# dmesg
ipv6: no symbol version for memcmp
ipv6: Unknown symbol memcmp (err -22)

Since arch/x86/include/asm/string_64.h uses

int memcmp(const void *cs, const void *ct, size_t count);

while arch/x86/include/asm/string_32.h uses

#define memcmp __builtin_memcmp

changing to what you have tried

#define memcmp(a, b, n) __builtin_memcmp(a, b, n)

or changing to what x86_64 does

int memcmp(const void *cs, const void *ct, size_t count);

might solve this problem. But I don't know which one is correct solution...


\
 
 \ /
  Last update: 2013-04-22 17:01    [W:0.091 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site