- current module
- fixed-size length of signature
- fixed-size magic string
In that case you go to the end of the file (maybe refuse to load modules larger than size Z ?), get the last X bytes, check if it is the magic string. Then take the Y bytes before it and use that as a length (obviously checking some boundry and that the size isn't bigger than the file). And get the signature that way. Everything else is just the module.
Wouldn't that be very little code with very few things to check ?
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds