On 26 February 2015 at 14:18, Anders Roxell <[email protected]> wrote:
> commit 4a4804a breaks on ARM 32-bit cross compile.
> odp_crypto.c: In function 'odp_crypto_session_destroy':
> odp_crypto.c:364:12: error: cast to pointer from integer of different
> size [-Werror=int-to-pointer-cast]
>   generic = (odp_crypto_generic_session_t *)session;
>
> Signed-off-by: Anders Roxell <[email protected]>
> ---
>  platform/linux-generic/odp_crypto.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/platform/linux-generic/odp_crypto.c 
> b/platform/linux-generic/odp_crypto.c
> index 0c38263..2f13e2f 100644
> --- a/platform/linux-generic/odp_crypto.c
> +++ b/platform/linux-generic/odp_crypto.c
> @@ -361,7 +361,7 @@ int odp_crypto_session_destroy(odp_crypto_session_t 
> session)
>  {
>         odp_crypto_generic_session_t *generic;
>
> -       generic = (odp_crypto_generic_session_t *)session;
> +       generic = (odp_crypto_generic_session_t *)(intptr_t)session;
>         memset(generic, 0, sizeof(*generic));
Why are we clearing the session structure before the free (as I assume
it is) below?
Shouldn't wipe on free be a generic malloc/free (conditional debug)
feature and not a mandatory part of some module that uses malloc?
Is the crypto session somehow considered sensitive data (it doesn't
contain any actual keys?) so we really want to wipe it as soon as it
is no longer needed?

>         free_session(generic);
>         return 0;
> --
> 2.1.4
>
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> http://lists.linaro.org/mailman/listinfo/lng-odp

_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to