All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Timo Sirainen <tss@iki.fi>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, git@vger.kernel.org
Subject: Re: Buffer overflows
Date: Fri, 31 Aug 2007 11:53:22 +0200	[thread overview]
Message-ID: <46D7E512.2010905@op5.se> (raw)
In-Reply-To: <1188536430.29782.903.camel@hurina>

Timo Sirainen wrote:
> On Thu, 2007-08-30 at 21:09 -0700, Linus Torvalds wrote:
>> On Fri, 31 Aug 2007, Timo Sirainen wrote:
>>>> Perhaps because your patch was using a totally nonstandard and slow
>>>> interface, and had nasty string declaration issues, as people even pointed
>>>> out to you.
>>> Slow?
>> Having a string library, and then implementing "str_append()" with a 
>> strlen() sounds pretty disgusting to me. 
>>
>> Gcc could have optimized the strlen() away for constant string arguments, 
>> but since you made the thing out-of-line, it can't do that any more.
>>
>> So yes, I bet there are faster string libraries out there.
> 
> Oh, well that's easy to fix. But I don't think the speed matters much in
> string manipulation, it's usually not done in performance critical
> paths.
> 

In git it is, as strings are manipulated en masse in order to traverse
history, look up paths from index/filesystem etc, etc.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

  reply	other threads:[~2007-08-31  9:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-30 19:26 Buffer overflows Timo Sirainen
2007-08-30 20:26 ` Lukas Sandström
2007-08-30 20:46 ` Linus Torvalds
2007-08-30 21:08   ` Timo Sirainen
2007-08-30 21:35     ` Reece Dunn
2007-08-30 21:51       ` Timo Sirainen
2007-08-30 22:34         ` Reece Dunn
2007-08-31 10:52           ` Wincent Colaiuta
2007-08-31 12:48             ` Simon 'corecode' Schubert
2007-08-30 22:14       ` Junio C Hamano
2007-08-30 22:36         ` Pierre Habouzit
2007-08-30 22:41         ` Timo Sirainen
2007-09-02 13:42         ` Johan Herland
2007-09-02 15:11           ` Reece Dunn
2007-09-02 15:19             ` David Kastrup
2007-09-02 15:35               ` Reece Dunn
2007-09-03  0:19               ` Jakub Narebski
2007-09-03  0:31                 ` Junio C Hamano
2007-09-02 17:17           ` René Scharfe
2007-09-02 17:39             ` Lukas Sandström
2007-08-31  4:09     ` Linus Torvalds
2007-08-31  5:00       ` Timo Sirainen
2007-08-31  9:53         ` Andreas Ericsson [this message]
2007-08-31 10:06         ` Johannes Schindelin
2007-08-30 21:48 ` [PATCH] Temporary fix for stack smashing in mailinfo Alex Riesen
2007-08-30 22:53   ` Junio C Hamano

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=46D7E512.2010905@op5.se \
    --to=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tss@iki.fi \
    /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.