From patchwork Sat Aug 29 20:12:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 7095721 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B8C71BEEC1 for ; Sat, 29 Aug 2015 20:19:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5AEE2083D for ; Sat, 29 Aug 2015 20:19:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A462D2078A for ; Sat, 29 Aug 2015 20:19:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZVmYe-00058F-N0; Sat, 29 Aug 2015 20:17:00 +0000 Received: from smtp07.smtpout.orange.fr ([80.12.242.129] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZVmYc-00057J-AA for linux-arm-kernel@lists.infradead.org; Sat, 29 Aug 2015 20:16:59 +0000 Received: from belgarion ([109.222.68.49]) by mwinf5d13 with ME id AkGa1r00q13mqGD03kGbWh; Sat, 29 Aug 2015 22:16:35 +0200 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Sat, 29 Aug 2015 22:16:35 +0200 X-ME-IP: 109.222.68.49 From: Robert Jarzmik To: linux-arm-kernel@lists.infradead.org Subject: Possible regression: module insertion, relocation misalignement X-URL: http://belgarath.falguerolles.org/ Date: Sat, 29 Aug 2015 22:12:08 +0200 Message-ID: <87egil26sn.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150829_131658_840678_47C97BE5 X-CRM114-Status: GOOD ( 13.64 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello, I have a strange regression with linux-next on module insertion. The stack I get when inserting a module is in [3]. I'm using the gcc in [1], and added a small print in [2]. This happens on a pxa310 cm-x300 platform. As far as I understand the Oops, this is an unaligned access on the following relocation (0xbf009a26): *(u32 *)loc += sym->st_value; This happens regardless of the module I try, by that fat.ko, pxa3xx-nand.ko, etc .. I add that I have not changed my toolchain for quite some time. Is there anyone also affected by this bug ? Cheers. =============== rj@belgarion:~/mio_linux/kernel$ arm-linux-gnueabi-gcc -v Using built-in specs. COLLECT_GCC=/usr/bin/arm-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.9/lto-wrapper Target: arm-linux-gnueabi Configured with: ../src/configure -v --with-pkgversion=' 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,go,fortran,objc --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv4t --with-float=soft --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- Thread model: posix gcc version 4.9.2 ( 4.9.2-10) [2] Debug patch in arch/arm/kernel/module.c =========================================== diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index efdddcb97dd1..aed935c55d63 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c @@ -88,6 +88,9 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, return -ENOEXEC; } + pr_info("%s():%d dstsec=%p dstsec->sh_addr=%p rel=%p rel->r_offset=%u\n", + __func__, __LINE__, dstsec, dstsec, + dstsec->sh_addr, rel, rel->r_offset); loc = dstsec->sh_addr + rel->r_offset; switch (ELF32_R_TYPE(rel->r_info)) {