This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: [ECOS] Re: Improving TFTP performance
- From: Andrew Lunn <andrew at lunn dot ch>
- To: ?yvind Harboe <oyvind dot harboe at zylin dot com>
- Cc: Jonathan Larmour <jifl at ecoscentric dot com>, eCos Disuss <ecos-patches at ecos dot sourceware dot org>
- Date: Sun, 6 Jan 2008 12:15:51 +0100
- Subject: Re: [ECOS] Re: Improving TFTP performance
- References: <c09652430712190104v180581bck61f9cdaf852f249e@mail.gmail.com> <c09652430712190238q3f36a54ai96a226983d82635e@mail.gmail.com> <20071219112458.GB5944@lunn.ch> <c09652430712190553x6f616723oefeb864abbc46d66@mail.gmail.com> <20071219141733.GD5944@lunn.ch> <c09652430712190647p2c401294y652b68caab87d475@mail.gmail.com> <20071219151107.GE5944@lunn.ch> <c09652430712210134l31588a3fqa418b1a5507892b6@mail.gmail.com> <476BE572.1020007@eCosCentric.com> <c09652430712270602p485bc42bg88886bd527ee8947@mail.gmail.com>
On Thu, Dec 27, 2007 at 03:02:03PM +0100, ?yvind Harboe wrote:
> On Dec 21, 2007 5:10 PM, Jonathan Larmour <jifl@ecoscentric.com> wrote:
> > ?yvind Harboe wrote:
> > > Switched to using memcpy() for tftp get, which matters w/larger packet sizes.
> >
> > Thanks.
> >
> > It would be good if you could tweak a few things: firstly, the use of
> > sprintf means the CDL will need to require CYGINT_ISO_STDIO_FORMATTED_IO.
>
> Fixed.
>
> >
> > Secondly, and I realise the problem was there before as well, but I am
> > concerned that there are no boundary checks on overrunning the end of
> > 'data', despite the variable length of filename (which could well originate
> > from user input, so it's up to us to enforce our own size limits). I think
> > this should be checked. Would you be able to do that?
>
> That will take some work + invalidate all the testing I've done.
> That's for another patch.
>
> > Finally, Since tftp_client_put is nearly identical in this respect, can you
> > make a similar change to it? Seems strange to do one and not the other.
>
> I think that makes sense after any followup patches to tftp get are in place.
I've committed this patch. I also tested it against a tftpd which does
not support this option and it did not break.
Andrew