Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1493784 > unrolled thread

Re: [lkp] [x86] 784d5699ed: kmsg.ip_tables:no_symbol_version_for_copy_from_user

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2016-09-30 01:30 +0200
Last post2016-10-11 15:20 +0200
Articles 4 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [lkp] [x86]  784d5699ed:  kmsg.ip_tables:no_symbol_version_for_copy_from_user Stephen Rothwell <sfr@canb.auug.org.au> - 2016-09-30 01:30 +0200
    Re: [lkp] [x86]  784d5699ed: kmsg.ip_tables:no_symbol_version_for_copy_from_user Mathieu OTHACEHE <m.othacehe@gmail.com> - 2016-10-09 11:50 +0200
    Re: [lkp] [x86] 784d5699ed:  kmsg.ip_tables:no_symbol_version_for_copy_from_user Michal Marek <mmarek@suse.cz> - 2016-10-11 15:20 +0200
      Re: [lkp] [x86] 784d5699ed:  kmsg.ip_tables:no_symbol_version_for_copy_from_user Michal Marek <mmarek@suse.com> - 2016-10-11 15:20 +0200

#1493784 — Re: [lkp] [x86] 784d5699ed: kmsg.ip_tables:no_symbol_version_for_copy_from_user

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2016-09-30 01:30 +0200
SubjectRe: [lkp] [x86] 784d5699ed: kmsg.ip_tables:no_symbol_version_for_copy_from_user
Message-ID<smSW5-2lb-9@gated-at.bofh.it>
Hi all,

On Tue, 20 Sep 2016 10:55:32 +0800 kernel test robot <xiaolong.ye@intel.com> wrote:
>
> FYI, we noticed the following commit:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> commit 784d5699eddc55878627da20d3fe0c8542e2f1a2 ("x86: move exports to actual definitions")
> 
> in testcase: boot
> 
> on test machine: qemu-system-x86_64 -enable-kvm -cpu host -smp 2 -m 4G
> 
> caused below changes:
> 
> [    4.386609] ip_tables: no symbol version for _copy_from_user
> [    4.387902] ip_tables: Unknown symbol _copy_from_user (err -22)
> [    4.389219] ip_tables: no symbol version for __put_user_2
> [    4.390473] ip_tables: Unknown symbol __put_user_2 (err -22)
> [    4.391760] ip_tables: no symbol version for __sw_hweight32
> [    4.393031] ip_tables: Unknown symbol __sw_hweight32 (err -22)
> [    4.394332] ip_tables: no symbol version for memcpy
> [    4.395508] ip_tables: Unknown symbol memcpy (err -22)
> [    4.396729] ip_tables: no symbol version for __fentry__
> [    4.397937] ip_tables: Unknown symbol __fentry__ (err -22)
> [    4.399234] ip_tables: no symbol version for _copy_to_user
> [    4.400488] ip_tables: Unknown symbol _copy_to_user (err -22)
> [    4.405835] systemd[1]: Failed to insert module 'ip_tables': Invalid argument
> 
> 
> 
> Thanks,
> Xiaolong

Do we have any resolution of this?

-- 
Cheers,
Stephen Rothwell

[toc] | [next] | [standalone]


#1497889 — Re: [lkp] [x86] 784d5699ed: kmsg.ip_tables:no_symbol_version_for_copy_from_user

FromMathieu OTHACEHE <m.othacehe@gmail.com>
Date2016-10-09 11:50 +0200
SubjectRe: [lkp] [x86] 784d5699ed: kmsg.ip_tables:no_symbol_version_for_copy_from_user
Message-ID<sqiU2-2sU-7@gated-at.bofh.it>
In reply to#1493784
Hi,

> Do we have any resolution of this?

I got the exact same problem if CONFIG_MODVERSIONS is enabled.
Here is my understanding.

All the symbols exported using assembler macro EXPORT_SYMBOL will need a
__crc_<symbol> to be defined later on (include/asm-generic/export.h).

This is what genksyms should do but it only runs on *.c files. So all the
symbols exported from *.S files won't get crc.

modpost is complaining about missing crc and it will not include those
symbols in *.mod.c modversion_info struct. Then, we got "Unknown
symbol" errors when modules are inserted at runtime.

I fixed it locally by setting __crc_<symbol> to a constant value in
export.h. But it may be a better idea to have genksyms run on *.S files ?

Thanks,

Mathieu

[toc] | [prev] | [next] | [standalone]


#1498874 — Re: [lkp] [x86] 784d5699ed: kmsg.ip_tables:no_symbol_version_for_copy_from_user

FromMichal Marek <mmarek@suse.cz>
Date2016-10-11 15:20 +0200
SubjectRe: [lkp] [x86] 784d5699ed: kmsg.ip_tables:no_symbol_version_for_copy_from_user
Message-ID<sr58l-7aD-7@gated-at.bofh.it>
In reply to#1493784
Dne 30.9.2016 v 01:26 Stephen Rothwell napsal(a):
> Hi all,
> 
> On Tue, 20 Sep 2016 10:55:32 +0800 kernel test robot <xiaolong.ye@intel.com> wrote:
>>
>> FYI, we noticed the following commit:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>> commit 784d5699eddc55878627da20d3fe0c8542e2f1a2 ("x86: move exports to actual definitions")
>>
>> in testcase: boot
>>
>> on test machine: qemu-system-x86_64 -enable-kvm -cpu host -smp 2 -m 4G
>>
>> caused below changes:
>>
>> [    4.386609] ip_tables: no symbol version for _copy_from_user
>> [    4.387902] ip_tables: Unknown symbol _copy_from_user (err -22)
>> [    4.389219] ip_tables: no symbol version for __put_user_2
>> [    4.390473] ip_tables: Unknown symbol __put_user_2 (err -22)
>> [    4.391760] ip_tables: no symbol version for __sw_hweight32
>> [    4.393031] ip_tables: Unknown symbol __sw_hweight32 (err -22)
>> [    4.394332] ip_tables: no symbol version for memcpy
>> [    4.395508] ip_tables: Unknown symbol memcpy (err -22)
>> [    4.396729] ip_tables: no symbol version for __fentry__
>> [    4.397937] ip_tables: Unknown symbol __fentry__ (err -22)
>> [    4.399234] ip_tables: no symbol version for _copy_to_user
>> [    4.400488] ip_tables: Unknown symbol _copy_to_user (err -22)
>> [    4.405835] systemd[1]: Failed to insert module 'ip_tables': Invalid argument
>>
>>
>>
>> Thanks,
>> Xiaolong
> 
> Do we have any resolution of this?

With which .config is it happening? In my testing, the undefined CRCs
show up as 0x00000000 in Module.symvers and they are also 0 in the
___kcrctab* sections in vmlinux. So the loader matches the requested and
provided symbol's CRC of 0 and is happy. But I guess I'm missing something.

Thanks,
Michal

[toc] | [prev] | [next] | [standalone]


#1498876 — Re: [lkp] [x86] 784d5699ed: kmsg.ip_tables:no_symbol_version_for_copy_from_user

FromMichal Marek <mmarek@suse.com>
Date2016-10-11 15:20 +0200
SubjectRe: [lkp] [x86] 784d5699ed: kmsg.ip_tables:no_symbol_version_for_copy_from_user
Message-ID<sr58l-7aD-5@gated-at.bofh.it>
In reply to#1498874
Dne 11.10.2016 v 15:10 Michal Marek napsal(a):
> Dne 30.9.2016 v 01:26 Stephen Rothwell napsal(a):
>> Hi all,
>>
>> On Tue, 20 Sep 2016 10:55:32 +0800 kernel test robot <xiaolong.ye@intel.com> wrote:
>>>
>>> FYI, we noticed the following commit:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>> commit 784d5699eddc55878627da20d3fe0c8542e2f1a2 ("x86: move exports to actual definitions")
>>>
>>> in testcase: boot
>>>
>>> on test machine: qemu-system-x86_64 -enable-kvm -cpu host -smp 2 -m 4G
>>>
>>> caused below changes:
>>>
>>> [    4.386609] ip_tables: no symbol version for _copy_from_user
>>> [    4.387902] ip_tables: Unknown symbol _copy_from_user (err -22)
>>> [    4.389219] ip_tables: no symbol version for __put_user_2
>>> [    4.390473] ip_tables: Unknown symbol __put_user_2 (err -22)
>>> [    4.391760] ip_tables: no symbol version for __sw_hweight32
>>> [    4.393031] ip_tables: Unknown symbol __sw_hweight32 (err -22)
>>> [    4.394332] ip_tables: no symbol version for memcpy
>>> [    4.395508] ip_tables: Unknown symbol memcpy (err -22)
>>> [    4.396729] ip_tables: no symbol version for __fentry__
>>> [    4.397937] ip_tables: Unknown symbol __fentry__ (err -22)
>>> [    4.399234] ip_tables: no symbol version for _copy_to_user
>>> [    4.400488] ip_tables: Unknown symbol _copy_to_user (err -22)
>>> [    4.405835] systemd[1]: Failed to insert module 'ip_tables': Invalid argument
>>>
>>>
>>>
>>> Thanks,
>>> Xiaolong
>>
>> Do we have any resolution of this?
> 
> With which .config is it happening?

Or maybe with which toolchain is the kernel built.

Thanks,
Michal

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web