{"push_id":767098417,"size":1,"distinct_size":1,"ref":"refs/heads/M_staging","head":"edeae13bdbef330a090339268b770972dda68d1d","before":"2d22b03223cf2c1f8922b760cbcf863a12451348","commits":[{"sha":"edeae13bdbef330a090339268b770972dda68d1d","author":{"email":"9a64e8afc69b5e6d556e5efc11a0874f596bf4b0@cesarb.eti.br","name":"Cesar Eduardo Barros"},"message":"crypto: more robust crypto_memneq\n\ncommit fe8c8a126806fea4465c43d62a1f9d273a572bf5 upstream.\n\n[Only use the compiler.h portion of this patch, to get the\nOPTIMIZER_HIDE_VAR() macro, which we need for other -stable patches\n- gregkh]\n\nDisabling compiler optimizations can be fragile, since a new\noptimization could be added to -O0 or -Os that breaks the assumptions\nthe code is making.\n\nInstead of disabling compiler optimizations, use a dummy inline assembly\n(based on RELOC_HIDE) to block the problematic kinds of optimization,\nwhile still allowing other optimizations to be applied to the code.\n\nThe dummy inline assembly is added after every OR, and has the\naccumulator variable as its input and output. The compiler is forced to\nassume that the dummy inline assembly could both depend on the\naccumulator variable and change the accumulator variable, so it is\nforced to compute the value correctly before the inline assembly, and\ncannot assume anything about its value after the inline assembly.\n\nThis change should be enough to make crypto_memneq work correctly (with\ndata-independent timing) even if it is inlined at its call sites. That\ncan be done later in a followup patch.\n\nCompile-tested on x86_64.\n\nSigned-off-by: Cesar Eduardo Barros <cesarb@cesarb.eti.br>\nAcked-by: Daniel Borkmann <dborkman@redhat.com>\nSigned-off-by: Herbert Xu <herbert@gondor.apana.org.au>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>","distinct":true,"url":"https://api.github.com/repos/Starship-Android/android_kernel_moto_shamu/commits/edeae13bdbef330a090339268b770972dda68d1d"}]}