aboutsummaryrefslogtreecommitdiff
path: root/crypto/api.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "crypto: api - prevent helper ciphers from being used"Mister Oyster2018-01-051-10/+0
| | | | This reverts commit 467b365068b0376fd670b1b97c22679e9a280bb1.
* crypto: api - prevent helper ciphers from being usedStephan Mueller2017-12-141-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several hardware related cipher implementations are implemented as follows: a "helper" cipher implementation is registered with the kernel crypto API. Such helper ciphers are never intended to be called by normal users. In some cases, calling them via the normal crypto API may even cause failures including kernel crashes. In a normal case, the "wrapping" ciphers that use the helpers ensure that these helpers are invoked such that they cannot cause any calamity. Considering the AF_ALG user space interface, unprivileged users can call all ciphers registered with the crypto API, including these helper ciphers that are not intended to be called directly. That means, with AF_ALG user space may invoke these helper ciphers and may cause undefined states or side effects. To avoid any potential side effects with such helpers, the patch prevents the helpers to be called directly. A new cipher type flag is added: CRYPTO_ALG_INTERNAL. This flag shall be used to mark helper ciphers. These ciphers can only be used if the caller invoke the cipher with CRYPTO_ALG_INTERNAL in the type and mask field. Change-Id: I5fd76b3e7c83d064cce9f61340d57bdaa14171ba Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: api - Only abort operations on fatal signalHerbert Xu2016-08-261-3/+3
| | | | | | | | | | | | | | | | | | | | commit 3fc89adb9fa4beff31374a4bf50b3d099d88ae83 upstream. Currently a number of Crypto API operations may fail when a signal occurs. This causes nasty problems as the caller of those operations are often not in a good position to restart the operation. In fact there is currently no need for those operations to be interrupted by user signals at all. All we need is for them to be killable. This patch replaces the relevant calls of signal_pending with fatal_signal_pending, and wait_for_completion_interruptible with wait_for_completion_killable, respectively. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
* 3.10.66 -> 3.10.67Jan Engelmohr2016-08-261-2/+2
|
* first commitMeizu OpenSource2016-08-151-0/+605