make cryptodev aware of alignment constraints
Certain hardware crypto engines need input data to be correctly aligned.
Due to copyless operation, data alignment has to be done in userspace.
To assist in that, find out the smallest possible alignment boundary
upon session creation, depending on the actual cipher/hash mode(s) being
selected (and the automatically chosen crypto backend, of course).
Since now the information is present internally, check directly used
(zero-copy) userspace buffers for correct alignment. Handling of
temporary, internal buffers is unclear for now. Maybe one should align
them to a high value (e.g. 64 bytes) to be sure. Allocating everything
dynamically instead is probably not a good alternative.
The only buffers userspace applications have to align are the 'src' and
'dst' fields of struct crypt_op. All other userspace buffers are copied
internally, since their small size doesn't justify the overhead of
mapping userspace pages for them.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>