linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Joe Perches <joe@perches.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	mmarek@suse.cz, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org, Joe Mario <jmario@redhat.com>,
	Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 1/3] kbuild: Increase kallsyms max symbol length v2
Date: Wed, 23 Oct 2013 15:06:53 +0200	[thread overview]
Message-ID: <20131023130653.GN29695@two.firstfloor.org> (raw)
In-Reply-To: <1382459764.2041.90.camel@joe-AO722>

From: Joe Mario <jmario@redhat.com>

[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 <ak@linux.intel.com>
---
 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 <linux/kernel.h>
 #include <linux/stddef.h>
 
-#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)
 
-- 
1.8.4

-- 
ak@linux.intel.com -- Speaking for myself only.

  parent reply	other threads:[~2013-10-23 13:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 15:46 Some kbuild fixes Andi Kleen
2013-10-22 15:46 ` [PATCH 1/3] kbuild: Increase kallsyms max symbol length Andi Kleen
2013-10-22 16:36   ` Joe Perches
2013-10-22 16:40     ` Andi Kleen
2013-10-22 16:55       ` Joe Perches
2013-10-23 13:06     ` Andi Kleen [this message]
2013-11-06 21:26       ` [PATCH 1/3] kbuild: Increase kallsyms max symbol length v2 Michal Marek
2013-10-22 15:46 ` [PATCH 2/3] Kbuild: Handle longer symbols in kallsyms.c Andi Kleen
2013-10-22 16:36   ` Joe Perches
2013-10-23 13:07     ` [PATCH 2/3] Kbuild: Handle longer symbols in kallsyms.c v2 Andi Kleen
2013-11-06 21:27       ` Michal Marek
2013-10-22 15:46 ` [PATCH 3/3] kbuild, bloat-o-meter: fix static detection Andi Kleen
2013-11-06 21:27   ` Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131023130653.GN29695@two.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=jmario@redhat.com \
    --cc=joe@perches.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).