Dear Rob, In message <1397157488-8695-2-git-send-email-robherri...@gmail.com> you wrote: > > Various commands that load images have no checks that a loaded image > does not exceed the available RAM space and will happily continue > overwriting u-boot or other RAM that should not be touched. Also, > some commands such as USB DFU or fastboot need to know the maximum > buffer size, but there is no common way to define this.
You are mixing some pretty much unrelated things here, which is IMO not a good idea. Limiting the size for load operations is one thing, but buffer size is something totally different. These must not be mixed up. Please keep in mind that there is (or at least should be) no need to load the whole file into a buffer. [Limitations of the implementation should be fixed rather than supported.] > Introduce a global load_size and environment variable loadsize to > specify the size. The default is ~0UL which is effectively unlimited. I think this feature should be made optional. I don;t think I want to have this on all systems. > + loadsize - Maximum load size for commands like "bootp", > + "rarpboot", "tftpboot", "loadb" or "diskboot" Um... what makes these operations different from any other operations that read images or other data to memory? Like loading from NOR or NAND flash, from USB, IDE or SATA storage devices, from any of the supported file system types? I feel we should either support this consequently everywhere, or not at all. My personal preference is the second option, as otherwise you will just add a lot of code in too many places for too little benefit. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de No man knows what true happiness is until he gets married. By then, of course, its too late. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot