Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-10-10 Thread Simon Glass
Hi Wolfgang, On Mon, Oct 10, 2011 at 1:36 PM, Wolfgang Denk wrote: > Dear Simon Glass, > > In message > you > wrote: >> >> Just to follow up this thread, I am going to drop the network patch >> and resubmit the rest of it. This will make snprintf() available in >> U-Boot. > > Without code that

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-10-10 Thread Wolfgang Denk
Dear Simon Glass, In message you wrote: > > Just to follow up this thread, I am going to drop the network patch > and resubmit the rest of it. This will make snprintf() available in > U-Boot. Without code that uses it? We don't accept dead code... Best regards, Wolfgang Denk -- DENX Softw

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-10-10 Thread Simon Glass
Hi, On Mon, Sep 26, 2011 at 11:52 PM, Albert ARIBAUD wrote: > On 27/09/2011 00:28, Scott Wood wrote: > >>> - users who actually wisht to limit outpout ca use either >> >> You say "actually wish to limit output" as if "let it corrupt memory if >> it's too large" is the normal thing to want. > > Wh

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-26 Thread Albert ARIBAUD
On 27/09/2011 00:28, Scott Wood wrote: >> - users who actually wisht to limit outpout ca use either > > You say "actually wish to limit output" as if "let it corrupt memory if > it's too large" is the normal thing to want. What I meant was "users who actually want to limit output explicitly by t

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-26 Thread Scott Wood
On 09/26/2011 06:20 AM, Albert ARIBAUD wrote: > Hi Simon, > > Le 25/09/2011 16:50, Simon Glass a écrit : > >>> Basically, printf family functions which do not have the 'n' are *know* by >>> all -- experienced enough :) -- programmers to be *unsafe* (but to require >>> less from the caller) print

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-26 Thread Wolfgang Denk
Dear Simon Glass, In message you wrote: > > For sprintf() I agree - this is well understood and people are aware > of it. For printf() I am not so sure. We are a resource limited boot loader. We got for a small footprint, and accept some resulting restrictions, if they are not really severe.

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-26 Thread Simon Glass
Hi Albert, On Mon, Sep 26, 2011 at 4:20 AM, Albert ARIBAUD wrote: > Hi Simon, > > Le 25/09/2011 16:50, Simon Glass a écrit : > >>> Basically, printf family functions which do not have the 'n' are *know* >>> by >>> all -- experienced enough :) -- programmers to be *unsafe* (but to >>> require >>>

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-26 Thread Simon Glass
Hi Wolfgang, On Sun, Sep 25, 2011 at 1:04 PM, Wolfgang Denk wrote: > Dear Simon Glass, > > In message <1316799532-20761-1-git-send-email-...@chromium.org> you wrote: >> The printf family of functions in U-Boot cannot deal with a situation where >> the caller provides a buffer which turns out to b

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-26 Thread Albert ARIBAUD
Hi Simon, Le 25/09/2011 16:50, Simon Glass a écrit : >> Basically, printf family functions which do not have the 'n' are *know* by >> all -- experienced enough :) -- programmers to be *unsafe* (but to require >> less from the caller) and it should remain so: no programmer should ever >> encounter

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-25 Thread Wolfgang Denk
Dear Simon Glass, In message <1316799532-20761-1-git-send-email-...@chromium.org> you wrote: > The printf family of functions in U-Boot cannot deal with a situation where > the caller provides a buffer which turns out to be too small for the format > string. This can result in buffer overflows, st

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-25 Thread Simon Glass
Hi Albert, On Sun, Sep 25, 2011 at 1:40 AM, Albert ARIBAUD wrote: > Le 24/09/2011 16:00, Simon Glass a écrit : > >>> So basically the choice is between: >>> >>> - adding code to the printf() family to try and fix an issue that it is >>> fundamentally unable to properly fix, and for which a soluti

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-25 Thread Albert ARIBAUD
Le 24/09/2011 16:00, Simon Glass a écrit : >> So basically the choice is between: >> >> - adding code to the printf() family to try and fix an issue that it is >> fundamentally unable to properly fix, and for which a solution exists, or >> >> - grepping and fixing calls to *sprintf() in U-Boot tha

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-24 Thread Simon Glass
Hi Albert, On Sat, Sep 24, 2011 at 2:37 AM, Albert ARIBAUD wrote: > Le 23/09/2011 22:46, Simon Glass a écrit : >> >> Hi Albert, >> >> On Fri, Sep 23, 2011 at 1:40 PM, Albert ARIBAUD >>  wrote: >>> >>> Hi Simon, >>> >>> Le 23/09/2011 19:38, Simon Glass a écrit : The printf family of fun

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-24 Thread Albert ARIBAUD
Le 23/09/2011 22:46, Simon Glass a écrit : > Hi Albert, > > On Fri, Sep 23, 2011 at 1:40 PM, Albert ARIBAUD > wrote: >> Hi Simon, >> >> Le 23/09/2011 19:38, Simon Glass a écrit : >>> >>> The printf family of functions in U-Boot cannot deal with a situation >>> where >>> the caller provides a buff

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-23 Thread Simon Glass
Hi Albert, On Fri, Sep 23, 2011 at 1:40 PM, Albert ARIBAUD wrote: > Hi Simon, > > Le 23/09/2011 19:38, Simon Glass a écrit : >> >> The printf family of functions in U-Boot cannot deal with a situation >> where >> the caller provides a buffer which turns out to be too small for the >> format >> st

Re: [U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-23 Thread Albert ARIBAUD
Hi Simon, Le 23/09/2011 19:38, Simon Glass a écrit : > The printf family of functions in U-Boot cannot deal with a situation where > the caller provides a buffer which turns out to be too small for the format > string. This can result in buffer overflows, stack overflows and other bad > behavior.

[U-Boot] [PATCH 0/4] Buffer overruns in printf

2011-09-23 Thread Simon Glass
The printf family of functions in U-Boot cannot deal with a situation where the caller provides a buffer which turns out to be too small for the format string. This can result in buffer overflows, stack overflows and other bad behavior. This patch series tidies this up in the common vsprintf.c cod