linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: mmarek@suse.cz, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 2/3] Kbuild: Handle longer symbols in kallsyms.c
Date: Tue, 22 Oct 2013 09:36:34 -0700	[thread overview]
Message-ID: <1382459794.2041.91.camel@joe-AO722> (raw)
In-Reply-To: <1382456783-22826-3-git-send-email-andi@firstfloor.org>

On Tue, 2013-10-22 at 08:46 -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
> 
> Also warn for too long symbols

[]

> diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
[]
> @@ -27,7 +27,7 @@
>  #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
>  #endif
>  
> -#define KSYM_NAME_LEN		128
> +#define KSYM_NAME_LEN		256

Maybe nicer to get these #defines via #include <>
to avoid getting out of sync.
 
>  struct sym_entry {
>  	unsigned long long addr;
> @@ -118,6 +118,12 @@ static int read_symbol(FILE *in, struct sym_entry *s)
>  			fprintf(stderr, "Read error or end of file.\n");
>  		return -1;
>  	}
> +	if (strlen(str) > KSYM_NAME_LEN) {
> +		fprintf(stderr, "Symbol %s too long for kallsyms.\n"
> +                                "Please increase KSYM_NAME_LEN both in kernel and kallsyms.c",
> +			str);

Missing newline?

Also maybe nicer to show symbol length and KSYM_NAME_LEN values.



  reply	other threads:[~2013-10-22 16:36 UTC|newest]

Thread overview: 14+ 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     ` [PATCH 1/3] kbuild: Increase kallsyms max symbol length v2 Andi Kleen
2013-11-06 21:26       ` 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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2013-08-11  0:55 [PATCH 1/3] kbuild: Increase kallsyms max symbol length Andi Kleen
2013-08-11  0:55 ` [PATCH 2/3] Kbuild: Handle longer symbols in kallsyms.c Andi Kleen

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=1382459794.2041.91.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --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).