Re: [PATCH] lib/mpi: Fix kernel unaligned acces in mpi_write_to_sgl

From: Sowmini Varadhan
Date: Thu Apr 21 2016 - 13:45:24 EST


On (04/21/16 10:23), Tadeusz Struk wrote:
>
> What if the mpi_limb_t will happen to be 64 bit?
> Thanks,

When I checked this with cscope, I found

typedef unsigned long int mpi_limb_t;

thus I used the *32 functions.

But you obviously know better, since you wrote this code (and bug).
If you anticipate that mpi_limb_t in some environment today,
I can check for sizeof(mpi_limb_t), and predicate it to
use the *32 or *64 functions based on the result. Do you think that
is necessary?

Regards,
--Sowmini