problems with stack sizes
Santiago Garcia Mantinan <[email protected]> Fri, 12 Aug 2005 21:06:49 +0200
| Newsgroups | gmane.network.etherboot.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi! Like I said a long time ago, I've been trying to add support for signature verification to etherboot for quite a while now. I've chosen to do so by using libtomcrypt, which seemed quite compact and suited for this. I chose to use sha1 with rsa signatures for this, this was chosen mainly to be compatible with current stable openssl. Well, I thought I was going on the good way till I got to face the problem that the mpi library that tom uses on libtomcrypt needs memory management functions (malloc, free, and realloc like functions), so chose to rewrite that so that these functions were not needed (by allocating the needed space in the variable definitions), and when I started to test that, I saw that the stack that etherboot has is not big enough to hold all the big numbers and calls to the functions. For what I have read on the development doc, there is not much space to be used, the stack grows towards the etherboot code and thus will overwrite it. But I also read this: "This gives us about 1 MB for code, data, and stack.". So I'm wondering if we have 1 meg... can't I make the stack bigger, if so, what do I have to change? I have played with the 4096 space for _stack on start32.S which I supposed was the right place, but didn't quite look like it, any pointers? If I cannot change the stack size or it is not recomended, can I reserve some memory for data so that I could somehow manage that space? Maybe I should forget about all that I have done till now with libtomcrypt and start searching for lighter code that doesn't need this kind of stuff, I saw the old sboot stuff, but the problem with that is that the rsa code it uses is not free, any comments on this? Well, as I'm new to etherboot I may be saying a lot of silly things, please correct me whenever it's the case. Thanks in advance! Regards... -- Manty/BestiaTester -> http://manty.net ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf