public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paulo Marques <pmarques@grupopie.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.22-rc6-mm1] kallsyms: make KSYM_NAME_LEN include space for trailing '\0'
Date: Wed, 11 Jul 2007 11:58:55 +0100	[thread overview]
Message-ID: <4694B7EF.6040606@grupopie.com> (raw)
In-Reply-To: <20070711094429.GD23568@htj.dyndns.org>

Tejun Heo wrote:
> KSYM_NAME_LEN is peculiar in that it does not include the space for
> the trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when
> allocating buffer.  This is nonsense and error-prone.  Moreover, when
> the caller forgets that it's very likely to subtly bite back by
> corrupting the stack because the last position of the buffer is always
> cleared to zero.
> 
> This patch increments KSYM_NAME_LEN by one and updates code
> accordingly.

Nice work.

I've been wanting to do that cleanup myself for a long time ;)

Acked-by: Paulo Marques <pmarques@grupopie.com>

-- 
Paulo Marques - www.grupopie.com

"You're just jealous because the voices only talk to me."

      reply	other threads:[~2007-07-11 10:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-11  9:44 [PATCH 2.6.22-rc6-mm1] kallsyms: make KSYM_NAME_LEN include space for trailing '\0' Tejun Heo
2007-07-11 10:58 ` Paulo Marques [this message]

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=4694B7EF.6040606@grupopie.com \
    --to=pmarques@grupopie.com \
    --cc=akpm@linux-foundation.org \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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