From patchwork Wed Oct 23 13:06:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 3088331 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 51853BF924 for ; Wed, 23 Oct 2013 13:07:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 045B32020F for ; Wed, 23 Oct 2013 13:07:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3577A201FD for ; Wed, 23 Oct 2013 13:06:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753765Ab3JWNGz (ORCPT ); Wed, 23 Oct 2013 09:06:55 -0400 Received: from one.firstfloor.org ([193.170.194.197]:44319 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753566Ab3JWNGz (ORCPT ); Wed, 23 Oct 2013 09:06:55 -0400 Received: by one.firstfloor.org (Postfix, from userid 503) id 5A96886762; Wed, 23 Oct 2013 15:06:53 +0200 (CEST) Date: Wed, 23 Oct 2013 15:06:53 +0200 From: Andi Kleen To: Joe Perches Cc: Andi Kleen , mmarek@suse.cz, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Joe Mario , Andi Kleen Subject: [PATCH 1/3] kbuild: Increase kallsyms max symbol length v2 Message-ID: <20131023130653.GN29695@two.firstfloor.org> References: <1382456783-22826-1-git-send-email-andi@firstfloor.org> <1382456783-22826-2-git-send-email-andi@firstfloor.org> <1382459764.2041.90.camel@joe-AO722> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1382459764.2041.90.camel@joe-AO722> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Joe Mario [AK: This seems like a ticking time bomb even without LTO, so should be merged now. It causes very weird problems. Thanks to Joe for tracking them down.] With the added postfixes that LTO adds for local symbols, the longest name in the kernel overflows the namebuf[KSYM_NAME_LEN] array by two bytes. That name is: __pci_fixup_resumePCI_VENDOR_ID_SERVERWORKSPCI_DEVICE_ID_SERVERWORKS_HT1000SBquirk_disable_broadcom_boot_interrupt.1488004.672802 Double the max symbol name length. v2: Use 255 (Joe Perches) Signed-off-by: Andi Kleen --- include/linux/kallsyms.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 6883e19..5648870 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -9,7 +9,7 @@ #include #include -#define KSYM_NAME_LEN 128 +#define KSYM_NAME_LEN 255 #define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + (KSYM_NAME_LEN - 1) + \ 2*(BITS_PER_LONG*3/10) + (MODULE_NAME_LEN - 1) + 1)