[llvmlinux] VLAIS cleanup
renato.golin at linaro.org
Mon Mar 24 16:40:58 UTC 2014
On 24 March 2014 16:28, PaX Team <pageexec at freemail.hu> wrote:
> note the last field in struct shash_desc: void *__ctx CRYPTO_MINALIGN_ATTR;
> what the various callbacks in shash_alg structs do is that they call shash_desc_ctx()
> to convert the shash_desc ptr into the ctx ptr: return desc->__ctx;
Oh, and since desc's last member is a VLA, and it's in the same
position as sdesc's ctx, whatever goes in ctx, gets in __ctx. That's
But I see why it would be a lot faster than keeping it in a separate
argument, list, tables, etc.
And now I see how the patch fixes the issue without much trouble, and
not being any uglier.
More information about the LLVMLinux