From: Keir Fraser <keir@xensource.com>
To: Jimi Xenidis <jimix@watson.ibm.com>,
Christoph Egger <Christoph.Egger@amd.com>
Cc: xen-devel@lists.xensource.com, Keir Fraser <keir@xensource.com>
Subject: Re: [PATCH] Use string bounded functions
Date: Mon, 29 Jan 2007 13:49:13 +0000 [thread overview]
Message-ID: <C1E3ABD9.8603%keir@xensource.com> (raw)
In-Reply-To: <A39F71D3-F989-4A46-A1CE-0055B4D1BA8B@watson.ibm.com>
That's overkill really. Once the uses are all gone from the repository we
can just kill them off. Any out-of-tree patches can easily be fixed up.
-- Keir
On 29/1/07 13:41, "Jimi Xenidis" <jimix@watson.ibm.com> wrote:
> I'm all for this.
> Are we going to mark all the "bad" ones as deprecated for some time?
> -JX
>
> On Jan 29, 2007, at 6:10 AM, Christoph Egger wrote:
>
>> On Monday 29 January 2007 11:52, Keir Fraser wrote:
>>> On 29/1/07 10:10, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
>>>> The attached patch replaces sprintf with snprintf and strncpy with
>>>> strlcpy.
>>>>
>>>> There are various cases where no NULL-terminated strings are
>>>> guaranteed
>>>> and eventual possible overflows. This patch fixes them.
>>>>
>>>> BTW: Since Xen kernel has its own string functions, can't we just
>>>> remove
>>>> sprintf() and strncpy()? IMO, Xen should not inherit the
>>>> historical C
>>>> relicts.
>>>
>>> This makes plenty of sense. Strncpy() in particular is dangerous and
>>> strlcpy() is always preferable. So I'd be happy to see strncat/
>>> strncpy die.
>>
>> sprintf() is also dangerous. snprintf() is better. sprintf() should
>> also die.
>>
>>> There are a few uses remaining (particularly in arch/ia64) that
>>> you'll have
>>> to fix first.
>>
>> Yeah. But due to lack of hw, I can't even build test for ia64 and ppc.
>> So when I send the patches, intel and ibm have to verify first that
>> they don't
>> break anything.
>>
>>> And please add 'signed-off-by' attribution when you post patches!
>>
>> Will do.
>>
>> Christoph
>>
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2007-01-29 13:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-29 10:10 [PATCH] Use string bounded functions Christoph Egger
2007-01-29 10:52 ` Keir Fraser
2007-01-29 11:10 ` Christoph Egger
2007-01-29 13:41 ` Jimi Xenidis
2007-01-29 13:49 ` Keir Fraser [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=C1E3ABD9.8603%keir@xensource.com \
--to=keir@xensource.com \
--cc=Christoph.Egger@amd.com \
--cc=jimix@watson.ibm.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.