Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932588AbcJNH3o (ORCPT ); Fri, 14 Oct 2016 03:29:44 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:33672 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932411AbcJNH3g (ORCPT ); Fri, 14 Oct 2016 03:29:36 -0400 User-agent: mu4e 0.9.17; emacs 25.2.50.1 From: Mathieu OTHACEHE To: Michal Marek Cc: Stephen Rothwell , Al Viro , LKML , lkp@01.org Subject: Re: [lkp] [x86] 784d5699ed: kmsg.ip_tables:no_symbol_version_for_copy_from_user In-reply-to: <57FCE5A2.9090602@suse.com> Date: Fri, 14 Oct 2016 09:27:25 +0200 Message-ID: <87a8e7jspu.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1195 Lines: 50 Hi Michal, Sorry for late reply. My toolchain in arch linux gcc version 6.2.1 20160830. I used defconfig (x86_64), with CONFIG_MODVERSIONS=y. I'm understanding better what's happening here. Running: nm arch/x86/lib/clear_page_64.o gives, 0000000000000000 T clear_page 0000000000000050 T clear_page_c_e 0000000000000010 T clear_page_orig w __crc_clear_page 0000000000000000 r __kcrctab_clear_page 0000000000000000 r __kstrtab_clear_page 0000000000000000 R __ksymtab_clear_page but running nm vmlinux|grep __crc_clear_page gives, 0000000051fac2d3 A __crc_clear_page_dirty_for_io So the weak symbol "__crc_clear_page" is not copied in vmlinux during linking. modpost uses __crc_* symbols to extract crc. Not founding those crc, it doesn't include symbols in mod.c modversion_info struct. It seems to be a linker bug. I also tested linking: int main() { return 0; } and .section test,"a" __kcrctab_test: .quad __test .weak __test Linking main.o and test.o, * weak symbol "__test" appears in a.out with gcc 5.4.0 * weak symbol "__test" *does not* appear in a.out with gcc 6.2.1 I'll try to find if there is a related bug report in gcc. Thanks, Mathieu