linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/22] crypto: add check for xts input length equal to zero
@ 2020-08-07 16:19 Andrei Botila
  2020-08-07 16:19 ` [PATCH 01/22] crypto: arm/aes-ce - " Andrei Botila
                   ` (21 more replies)
  0 siblings, 22 replies; 33+ messages in thread
From: Andrei Botila @ 2020-08-07 16:19 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller
  Cc: linux-crypto, linux-arm-kernel, linux-kernel, linuxppc-dev,
	linux-s390, x86, linux-arm-kernel, Andrei Botila

From: Andrei Botila <andrei.botila@nxp.com>

This patch set is a follow-up on the previous RFC discussion which can be found
here: https://lore.kernel.org/r/4145904.A5P2xsN9yQ@tauon.chronox.de

This series converts all XTS implementations to return 0 when the input length
is equal to 0. This change is necessary in order to standardize the way
skcipher algorithms handle this corner case. This check is made for other
algorithms such as CBC, ARC4, CFB, OFB, SALSA20, CTR, ECB and PCBC, XTS being
the outlier here.

Although some drivers do not explicitly check for requests with zero input
length, their implementations might be able to deal with this case.
Since we don't have the HW to test which ones are able and which ones are not
we rely on the maintainers of these drivers to verify and comment if the changes
are necessary in their driver or not.

One important thing to keep in mind is that in some implementations we make
this check only for XTS algorithms although probably all skcipher algorithms
should return 0 in case of zero input length.

This fix has been tested only on ARMv8 CE, the rest of the patches have
been build tested *only*, and should be tested on actual hardware before
being merged.

Andrei Botila (22):
  crypto: arm/aes-ce - add check for xts input length equal to zero
  crypto: arm/aes-neonbs - add check for xts input length equal to zero
  crypto: arm64/aes - add check for xts input length equal to zero
  crypto: arm64/aes-neonbs - add check for xts input length equal to
    zero
  crypto: powerpc/aes-spe - add check for xts input length equal to zero
  crypto: s390/aes - add check for xts input length equal to zero
  crypto: s390/paes - add check for xts input length equal to zero
  crypto: x86/glue_helper - add check for xts input length equal to zero
  crypto: xts - add check for block length equal to zero
  crypto: atmel-aes - add check for xts input length equal to zero
  crypto: artpec6 - add check for xts input length equal to zero
  crypto: bcm - add check for xts input length equal to zero
  crypto: cavium/cpt - add check for xts input length equal to zero
  crypto: cavium/nitrox - add check for xts input length equal to zero
  crypto: ccp - add check for xts input length equal to zero
  crypto: ccree - add check for xts input length equal to zero
  crypto: chelsio - add check for xts input length equal to zero
  crypto: hisilicon/sec - add check for xts input length equal to zero
  crypto: inside-secure - add check for xts input length equal to zero
  crypto: octeontx - add check for xts input length equal to zero
  crypto: qce - add check for xts input length equal to zero
  crypto: vmx - add check for xts input length equal to zero

 arch/arm/crypto/aes-ce-glue.c                    |  6 ++++++
 arch/arm/crypto/aes-neonbs-glue.c                |  3 +++
 arch/arm64/crypto/aes-glue.c                     |  6 ++++++
 arch/arm64/crypto/aes-neonbs-glue.c              |  3 +++
 arch/powerpc/crypto/aes-spe-glue.c               |  6 ++++++
 arch/s390/crypto/aes_s390.c                      |  3 +++
 arch/s390/crypto/paes_s390.c                     |  3 +++
 arch/x86/crypto/glue_helper.c                    |  3 +++
 crypto/xts.c                                     |  6 ++++++
 drivers/crypto/atmel-aes.c                       |  4 ++++
 drivers/crypto/axis/artpec6_crypto.c             |  6 ++++++
 drivers/crypto/bcm/cipher.c                      |  3 +++
 drivers/crypto/cavium/cpt/cptvf_algs.c           |  4 ++++
 drivers/crypto/cavium/nitrox/nitrox_skcipher.c   |  6 ++++++
 drivers/crypto/ccp/ccp-crypto-aes-xts.c          |  3 +++
 drivers/crypto/ccree/cc_cipher.c                 | 11 ++++++-----
 drivers/crypto/chelsio/chcr_algo.c               |  4 ++++
 drivers/crypto/hisilicon/sec/sec_algs.c          |  4 ++++
 drivers/crypto/inside-secure/safexcel_cipher.c   |  6 ++++++
 drivers/crypto/marvell/octeontx/otx_cptvf_algs.c |  5 +++++
 drivers/crypto/qce/skcipher.c                    |  3 +++
 drivers/crypto/vmx/aes_xts.c                     |  3 +++
 22 files changed, 96 insertions(+), 5 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2020-08-12  0:37 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07 16:19 [PATCH 00/22] crypto: add check for xts input length equal to zero Andrei Botila
2020-08-07 16:19 ` [PATCH 01/22] crypto: arm/aes-ce - " Andrei Botila
2020-08-07 16:19 ` [PATCH 02/22] crypto: arm/aes-neonbs " Andrei Botila
2020-08-07 16:19 ` [PATCH 03/22] crypto: arm64/aes " Andrei Botila
2020-08-07 16:19 ` [PATCH 04/22] crypto: arm64/aes-neonbs " Andrei Botila
2020-08-07 16:19 ` [PATCH 05/22] crypto: powerpc/aes-spe " Andrei Botila
2020-08-07 16:19 ` [PATCH 06/22] crypto: s390/aes " Andrei Botila
2020-08-07 16:19 ` [PATCH 07/22] crypto: s390/paes " Andrei Botila
2020-08-07 16:19 ` [PATCH 08/22] crypto: x86/glue_helper " Andrei Botila
2020-08-07 16:19 ` [PATCH 09/22] crypto: xts - add check for block " Andrei Botila
2020-08-07 16:19 ` [PATCH 10/22] crypto: atmel-aes - add check for xts input " Andrei Botila
2020-08-07 18:06   ` kernel test robot
2020-08-07 16:19 ` [PATCH 11/22] crypto: artpec6 " Andrei Botila
2020-08-07 16:20 ` [PATCH 12/22] crypto: bcm " Andrei Botila
2020-08-07 16:20 ` [PATCH 13/22] crypto: cavium/cpt " Andrei Botila
2020-08-07 16:20 ` [PATCH 14/22] crypto: cavium/nitrox " Andrei Botila
2020-08-07 16:20 ` [PATCH 15/22] crypto: ccp " Andrei Botila
2020-08-07 16:20 ` [PATCH 16/22] crypto: ccree " Andrei Botila
2020-08-08 12:10   ` Gilad Ben-Yossef
2020-08-07 16:20 ` [PATCH 17/22] crypto: chelsio " Andrei Botila
2020-08-07 16:20 ` [PATCH 18/22] crypto: hisilicon/sec " Andrei Botila
2020-08-07 16:20 ` [PATCH 19/22] crypto: inside-secure " Andrei Botila
2020-08-10 10:20   ` Van Leeuwen, Pascal
2020-08-10 13:45     ` Herbert Xu
2020-08-10 14:33       ` Horia Geantă
2020-08-10 17:03         ` Eric Biggers
2020-08-11 15:28           ` Horia Geantă
2020-08-12  0:36             ` Herbert Xu
2020-08-10 21:37         ` Van Leeuwen, Pascal
2020-08-07 16:20 ` [PATCH 20/22] crypto: octeontx " Andrei Botila
2020-08-07 16:20 ` [PATCH 21/22] crypto: qce " Andrei Botila
2020-08-07 17:59   ` Stanimir Varbanov
2020-08-07 16:20 ` [PATCH 22/22] crypto: vmx " Andrei Botila

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).