Re: [PATCH] crypto: more robust crypto_memneq

2013-11-25 Thread Cesar Eduardo Barros
Em 25-11-2013 14:26, Daniel Borkmann escreveu: On 11/25/2013 04:59 PM, James Yonan wrote: This approach using __asm__ ("" : "=r" (var) : "0" (var)) to try to prevent compiler optimizations of var is interesting. I like the fact that it's finer-grained than -Os and doesn't preclude inlining. A

Re: [PATCH] crypto: more robust crypto_memneq

2013-11-25 Thread Cesar Eduardo Barros
Em 25-11-2013 13:59, James Yonan escreveu: On 24/11/2013 14:12, Cesar Eduardo Barros wrote: Disabling compiler optimizations can be fragile, since a new optimization could be added to -O0 or -Os that breaks the assumptions the code is making. Instead of disabling compiler optimizations, use a d

Re: [PATCH] crypto: more robust crypto_memneq

2013-11-25 Thread Daniel Borkmann
On 11/25/2013 04:59 PM, James Yonan wrote: On 24/11/2013 14:12, Cesar Eduardo Barros wrote: Disabling compiler optimizations can be fragile, since a new optimization could be added to -O0 or -Os that breaks the assumptions the code is making. Instead of disabling compiler optimizations, use a d

Re: [PATCH] crypto: more robust crypto_memneq

2013-11-25 Thread James Yonan
On 24/11/2013 14:12, Cesar Eduardo Barros wrote: Disabling compiler optimizations can be fragile, since a new optimization could be added to -O0 or -Os that breaks the assumptions the code is making. Instead of disabling compiler optimizations, use a dummy inline assembly (based on RELOC_HIDE) t

[PATCH] crypto: more robust crypto_memneq

2013-11-24 Thread Cesar Eduardo Barros
Disabling compiler optimizations can be fragile, since a new optimization could be added to -O0 or -Os that breaks the assumptions the code is making. Instead of disabling compiler optimizations, use a dummy inline assembly (based on RELOC_HIDE) to block the problematic kinds of optimization, whil