mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu: "Here is the crypto update for 4.9: API: - The crypto engine code now supports hashes. Algorithms: - Allow keys >= 2048 bits in FIPS mode for RSA. Drivers: - Memory overwrite fix for vmx ghash. - Add support for building ARM sha1-neon in Thumb2 mode. - Reenable ARM ghash-ce code by adding import/export. - Reenable img-hash by adding import/export. - Add support for multiple cores in omap-aes. - Add little-endian support for sha1-powerpc. - Add Cavium HWRNG driver for ThunderX SoC" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (137 commits) crypto: caam - treat SGT address pointer as u64 crypto: ccp - Make syslog errors human-readable crypto: ccp - clean up data structure crypto: vmx - Ensure ghash-generic is enabled crypto: testmgr - add guard to dst buffer for ahash_export crypto: caam - Unmap region obtained by of_iomap crypto: sha1-powerpc - little-endian support crypto: gcm - Fix IV buffer size in crypto_gcm_setkey crypto: vmx - Fix memory corruption caused by p8_ghash crypto: ghash-generic - move common definitions to a new header file crypto: caam - fix sg dump hwrng: omap - Only fail if pm_runtime_get_sync returns < 0 crypto: omap-sham - shrink the internal buffer size crypto: omap-sham - add support for export/import crypto: omap-sham - convert driver logic to use sgs for data xmit crypto: omap-sham - change the DMA threshold value to a define crypto: omap-sham - add support functions for sg based data handling crypto: omap-sham - rename sgl to sgl_tmp for deprecation crypto: omap-sham - align algorithms on word offset crypto: omap-sham - add context export/import stubs ...
This commit is contained in:
commit
30066ce675
77 changed files with 3852 additions and 1654 deletions
|
|
@ -797,7 +797,8 @@ kernel crypto API | Caller
|
|||
include/linux/crypto.h and their definition can be seen below.
|
||||
The former function registers a single transformation, while
|
||||
the latter works on an array of transformation descriptions.
|
||||
The latter is useful when registering transformations in bulk.
|
||||
The latter is useful when registering transformations in bulk,
|
||||
for example when a driver implements multiple transformations.
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
|
|
@ -822,18 +823,31 @@ kernel crypto API | Caller
|
|||
</para>
|
||||
|
||||
<para>
|
||||
The bulk registration / unregistration functions require
|
||||
that struct crypto_alg is an array of count size. These
|
||||
functions simply loop over that array and register /
|
||||
unregister each individual algorithm. If an error occurs,
|
||||
the loop is terminated at the offending algorithm definition.
|
||||
That means, the algorithms prior to the offending algorithm
|
||||
are successfully registered. Note, the caller has no way of
|
||||
knowing which cipher implementations have successfully
|
||||
registered. If this is important to know, the caller should
|
||||
loop through the different implementations using the single
|
||||
instance *_alg functions for each individual implementation.
|
||||
The bulk registration/unregistration functions
|
||||
register/unregister each transformation in the given array of
|
||||
length count. They handle errors as follows:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
crypto_register_algs() succeeds if and only if it
|
||||
successfully registers all the given transformations. If an
|
||||
error occurs partway through, then it rolls back successful
|
||||
registrations before returning the error code. Note that if
|
||||
a driver needs to handle registration errors for individual
|
||||
transformations, then it will need to use the non-bulk
|
||||
function crypto_register_alg() instead.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
crypto_unregister_algs() tries to unregister all the given
|
||||
transformations, continuing on error. It logs errors and
|
||||
always returns zero.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1><title>Single-Block Symmetric Ciphers [CIPHER]</title>
|
||||
|
|
|
|||
Loading…
Reference in a new issue