> TBH I still think that simply setting READBUF_SIZE to 64K is the simplest > solution.
I would agree, but I was just a little concerned about allocating large buffer. I'm not sure whether GRUB is considered to be able to run on very resource constrained environments and it seemed that per-subpacket allocation is better. But if you are sure it is OK for 64K buffer I can rewrite the code to allocate it once before using it. > Just sign files and send new signatures and keys, I will commit them. Will send with updated patch. > This does more than just searching for keyid, it also hashes content, so name > is misleading. Any suggestions? > So you allocate full subpacket length anyway. Why not set READBUF_SIZE to max > size then from the very start? See the comment about large buffer. This does per-subpacket allocation, which should be less then overall subpacket length. _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel