Re: [PATCH] lib/sha1: remove memsets and allocate workspace on the stack

2011-08-08 Thread Joe Perches
On Mon, 2011-08-08 at 16:07 -0700, Mandeep Singh Baines wrote: The previous implementation required the workspace to be passed in as a parameter. This prevents the compiler from being able to store the workspace in registers. I've also removed the memset since that also prevents the compiler

Re: [PATCH] lib/sha1: remove memsets and allocate workspace on the stack

2011-08-08 Thread Linus Torvalds
On Mon, Aug 8, 2011 at 4:07 PM, Mandeep Singh Baines m...@chromium.org wrote: There is no loss of security due to removing the memset. It would be a bug for the stack to leak to userspace. However, a defence-in-depth argument could be made for keeping the clearing of the workspace. So I'm

Re: [PATCH] lib/sha1: remove memsets and allocate workspace on the stack

2011-08-08 Thread Mandeep Singh Baines
Joe Perches (j...@perches.com) wrote: On Mon, 2011-08-08 at 16:07 -0700, Mandeep Singh Baines wrote: The previous implementation required the workspace to be passed in as a parameter. This prevents the compiler from being able to store the workspace in registers. I've also removed the