Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933207AbbFJM0I (ORCPT ); Wed, 10 Jun 2015 08:26:08 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:48755 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753965AbbFJMZ4 (ORCPT ); Wed, 10 Jun 2015 08:25:56 -0400 Message-ID: <7f21d0751fb972c81e8e15ead3a6a896.squirrel@www.codeaurora.org> In-Reply-To: References: <1431530457-19909-1-git-send-email-vigneshr@codeaurora.org> <55551249.6020904@redhat.com> Date: Wed, 10 Jun 2015 12:25:54 -0000 Subject: Re: [PATCH] ARM: module: Add ".ref.text" to arm unwind tables From: vigneshr@codeaurora.org To: linux@arm.linux.org.uk, a.ryabinin@samsung.com, akpm@linux-foundation.org, adech.fo@gmail.com, "Laura Abbott" Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org User-Agent: SquirrelMail/1.4.22-4.el6 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Priority: 3 (Normal) Importance: Normal Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4898 Lines: 141 Gentle reminder for review comments. > Forgot to add Maintainers. Adding them now. > >> On 05/13/2015 08:20 AM, Vignesh Radhakrishnan wrote: >>> Functions inside kernel modules that use __ref >>> will end up being placed in .ARM.exidx.ref.text >>> section by gcc. >>> >>> Currently we don't consider adding these functions >>> to arm unwind tables. >>> >>> Hence, if we turn slub debug on by default we end up >>> with the messages of this sort: >>> >>> unwind: Index not found bf0011e0 >>> >>> This is because slub debug saves stack trace of >>> allocation's and free's. Therefore, we end up seeing >>> a flood of these messages in dmesg since its not >>> able to locate these functions. >>> >>> Fix this by adding .ref.text section to arm unwind tables. >>> >> >> With this patch, I go from >> >> ------------[ cut here ]------------ >> WARNING: CPU: 0 PID: 63 at drivers/misc/test.c:12 >> that_function+0x10/0x2c >> [test]() >> Modules linked in: test(P+) >> CPU: 0 PID: 63 Comm: insmod Tainted: P 4.1.0-rc2+ #28 >> Hardware name: ARM-Versatile PB >> [] (unwind_backtrace) from [] (show_stack+0x10/0x14) >> [] (show_stack) from [] >> (warn_slowpath_common+0x78/0xb0) >> [] (warn_slowpath_common) from [] >> (warn_slowpath_null+0x1c/0x24) >> [] (warn_slowpath_null) from [] >> (that_function+0x10/0x2c [test]) >> unwind: Index not found bf000048 >> ---[ end trace 3e24f8edd90f3b27 ]--- >> >> to >> >> ------------[ cut here ]------------ >> WARNING: CPU: 0 PID: 63 at drivers/misc/test.c:12 >> that_function+0x10/0x2c >> [test]() >> Modules linked in: test(P+) >> CPU: 0 PID: 63 Comm: insmod Tainted: P 4.1.0-rc2+ #30 >> Hardware name: ARM-Versatile PB >> [] (unwind_backtrace) from [] (show_stack+0x10/0x14) >> [] (show_stack) from [] >> (warn_slowpath_common+0x78/0xb0) >> [] (warn_slowpath_common) from [] >> (warn_slowpath_null+0x1c/0x24) >> [] (warn_slowpath_null) from [] >> (that_function+0x10/0x2c [test]) >> [] (that_function [test]) from [] >> (awesome_module+0x10/0x1c [test]) >> [] (awesome_module [test]) from [] >> (do_one_initcall+0x80/0x1dc) >> [] (do_one_initcall) from [] >> (do_init_module+0x58/0x1a8) >> [] (do_init_module) from [] >> (load_module+0x170c/0x1c38) >> [] (load_module) from [] >> (SyS_init_module+0xcc/0x124) >> [] (SyS_init_module) from [] >> (ret_fast_syscall+0x0/0x30) >> ---[ end trace 554c9ff461eb2505 ]--- >> >> Tested-by: Laura Abbott >> >>> Signed-off-by: Vignesh Radhakrishnan >>> --- >>> arch/arm/include/asm/module.h | 1 + >>> arch/arm/kernel/module.c | 4 ++++ >>> 2 files changed, 5 insertions(+) >>> >>> diff --git a/arch/arm/include/asm/module.h >>> b/arch/arm/include/asm/module.h >>> index ed690c4..17640c9 100644 >>> --- a/arch/arm/include/asm/module.h >>> +++ b/arch/arm/include/asm/module.h >>> @@ -14,6 +14,7 @@ enum { >>> ARM_SEC_DEVEXIT, >>> ARM_SEC_HOT, >>> ARM_SEC_UNLIKELY, >>> + ARM_SEC_REF, >>> ARM_SEC_MAX, >>> }; >>> >>> diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c >>> index 2e11961..846b888 100644 >>> --- a/arch/arm/kernel/module.c >>> +++ b/arch/arm/kernel/module.c >>> @@ -308,6 +308,8 @@ int module_finalize(const Elf32_Ehdr *hdr, const >>> Elf_Shdr *sechdrs, >>> maps[ARM_SEC_UNLIKELY].unw_sec = s; >>> else if (strcmp(".ARM.exidx.text.hot", secname) == 0) >>> maps[ARM_SEC_HOT].unw_sec = s; >>> + else if (strcmp(".ARM.exidx.ref.text", secname) == 0) >>> + maps[ARM_SEC_REF].unw_sec = s; >>> else if (strcmp(".init.text", secname) == 0) >>> maps[ARM_SEC_INIT].txt_sec = s; >>> else if (strcmp(".text", secname) == 0) >>> @@ -318,6 +320,8 @@ int module_finalize(const Elf32_Ehdr *hdr, const >>> Elf_Shdr *sechdrs, >>> maps[ARM_SEC_UNLIKELY].txt_sec = s; >>> else if (strcmp(".text.hot", secname) == 0) >>> maps[ARM_SEC_HOT].txt_sec = s; >>> + else if (strcmp(".ref.text", secname) == 0) >>> + maps[ARM_SEC_REF].txt_sec = s; >>> } >>> >>> for (i = 0; i < ARM_SEC_MAX; i++) >>> >> >> > > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of the Code Aurora Forum, hosted by The Linux Foundation. > again > > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/