Re: C tricks for efficient stack zeroing

2018-03-06 Thread Julia Cartwright
On Fri, Mar 02, 2018 at 08:50:17PM +0100, Jason A. Donenfeld wrote: [..] > What would be really nice would be to somehow keep track of the > maximum stack depth, and just before the function returns, clear from > the maximum depth to its stack base, all in one single call. This > would not only

Re: C tricks for efficient stack zeroing

2018-03-06 Thread Julia Cartwright
On Fri, Mar 02, 2018 at 08:50:17PM +0100, Jason A. Donenfeld wrote: [..] > What would be really nice would be to somehow keep track of the > maximum stack depth, and just before the function returns, clear from > the maximum depth to its stack base, all in one single call. This > would not only

Re: C tricks for efficient stack zeroing

2018-03-06 Thread Pavel Machek
Hi! > do_something(u8 *output, const u8 *input) > thing1(...) > thing2(...) > thinga(...) > thingb(...) >thingi(...) > thingc(...) > thing3(...) > thing4(...) > thinga(...) > thingc(...) > > Each one of these functions have a

Re: C tricks for efficient stack zeroing

2018-03-06 Thread Pavel Machek
Hi! > do_something(u8 *output, const u8 *input) > thing1(...) > thing2(...) > thinga(...) > thingb(...) >thingi(...) > thingc(...) > thing3(...) > thing4(...) > thinga(...) > thingc(...) > > Each one of these functions have a

Re: C tricks for efficient stack zeroing

2018-03-05 Thread Laura Abbott
On 03/02/2018 11:50 AM, Jason A. Donenfeld wrote: Hi list, I'm writing this email to solicit tricks for efficiently zeroing out the stack upon returning from a function. The reason this is often desirable is if the stack contains intermediate values that could assist in some form of

Re: C tricks for efficient stack zeroing

2018-03-05 Thread Laura Abbott
On 03/02/2018 11:50 AM, Jason A. Donenfeld wrote: Hi list, I'm writing this email to solicit tricks for efficiently zeroing out the stack upon returning from a function. The reason this is often desirable is if the stack contains intermediate values that could assist in some form of

Re: C tricks for efficient stack zeroing

2018-03-02 Thread Willy Tarreau
Hi Jason, On Fri, Mar 02, 2018 at 08:50:17PM +0100, Jason A. Donenfeld wrote: > Hi list, > > I'm writing this email to solicit tricks for efficiently zeroing out > the stack upon returning from a function. The reason this is often > desirable is if the stack contains intermediate values that

Re: C tricks for efficient stack zeroing

2018-03-02 Thread Willy Tarreau
Hi Jason, On Fri, Mar 02, 2018 at 08:50:17PM +0100, Jason A. Donenfeld wrote: > Hi list, > > I'm writing this email to solicit tricks for efficiently zeroing out > the stack upon returning from a function. The reason this is often > desirable is if the stack contains intermediate values that