Skip to content

crypto: skcipher - Remove VLA usage

Kees Cook ceph-devel linux-arm-kernel linux-block linux-crypto linux-nfs linux-ppp linux-s390 linux-usb linux-wireless linux-wpan linuxppc-dev lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest23 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23crypto: skcipher - Introduce crypto_sync_skciphercrypto/skcipher.c include/crypto/skcipher.h+99 -01 reply
2/23gss_krb5: Remove VLA usage of skcipherinclude/linux/sunrpc/gss_krb5.h net/sunrpc/auth_gss/gss_krb5_crypto.c net/sunrpc/auth_gss/gss_krb5_keys.c +3 more+108 -1090 replies
3/23lib80211: Remove VLA usage of skcipherdrivers/staging/rtl8192e/rtllib_crypt_tkip.c drivers/staging/rtl8192e/rtllib_crypt_wep.c drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c +3 more+89 -951 reply
4/23mac802154: Remove VLA usage of skciphernet/mac802154/llsec.c net/mac802154/llsec.h+9 -90 replies
5/23s390/crypto: Remove VLA usage of skcipherarch/s390/crypto/aes_s390.c+24 -240 replies
6/23x86/fpu: Remove VLA usage of skcipherarch/x86/crypto/fpu.c+16 -142 replies
7/23block: cryptoloop: Remove VLA usage of skcipherdrivers/block/cryptoloop.c+11 -117 replies
8/23libceph: Remove VLA usage of skciphernet/ceph/crypto.c net/ceph/crypto.h+7 -70 replies
9/23ppp: mppe: Remove VLA usage of skcipherdrivers/net/ppp/ppp_mppe.c+14 -130 replies
10/23rxrpc: Remove VLA usage of skciphernet/rxrpc/ar-internal.h net/rxrpc/rxkad.c+23 -230 replies
11/23wusb: Remove VLA usage of skcipherdrivers/usb/wusbcore/crypto.c+8 -81 reply
12/23crypto: ccp - Remove VLA usage of skcipherdrivers/crypto/ccp/ccp-crypto-aes-xts.c drivers/crypto/ccp/ccp-crypto.h+8 -70 replies
13/23crypto: vmx - Remove VLA usage of skcipherdrivers/crypto/vmx/aes_cbc.c drivers/crypto/vmx/aes_ctr.c drivers/crypto/vmx/aes_xts.c+29 -290 replies
14/23crypto: null - Remove VLA usage of skciphercrypto/algif_aead.c crypto/authenc.c crypto/authencesn.c +6 more+29 -300 replies
15/23crypto: cryptd - Remove VLA usage of skciphercrypto/cryptd.c+17 -150 replies
16/23crypto: sahara - Remove VLA usage of skcipherdrivers/crypto/sahara.c+15 -160 replies
17/23crypto: qce - Remove VLA usage of skcipherdrivers/crypto/qce/ablkcipher.c drivers/crypto/qce/cipher.h+7 -80 replies
18/23crypto: artpec6 - Remove VLA usage of skcipherdrivers/crypto/axis/artpec6_crypto.c+9 -101 reply
19/23crypto: chelsio - Remove VLA usage of skcipherdrivers/crypto/chelsio/chcr_algo.c drivers/crypto/chelsio/chcr_crypto.h+15 -140 replies
20/23crypto: mxs-dcp - Remove VLA usage of skcipherdrivers/crypto/mxs-dcp.c+10 -110 replies
21/23crypto: omap-aes - Remove VLA usage of skcipherdrivers/crypto/omap-aes.c drivers/crypto/omap-aes.h+9 -100 replies
22/23crypto: picoxcell - Remove VLA usage of skcipherdrivers/crypto/picoxcell_crypto.c+10 -110 replies
23/23crypto: skcipher - Remove SKCIPHER_REQUEST_ON_STACK()include/crypto/skcipher.h+0 -50 replies

Reviews trailers per patch

5 of 23 patches have a Reviewed-by or Acked-by.

PatchGreg Kroah-HartmanLars PerssonArd Biesheuvel
1/23R-b
2/23
3/23
4/23
5/23
6/23R-b
7/23A-b
8/23
9/23
10/23
11/23A-b
12/23
13/23
14/23
15/23
16/23
17/23
18/23A-b
19/23
20/23
21/23
22/23
23/23

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH crypto-next 00/23] crypto: skcipher - Remove VLA usage

This is the full follow-up to earlier discussions[1] that suggested adding a new struct crypto_sync_skcipher to handle the VLA removal from SKCIPHER_REQUEST_ON_STACK.

This series is effectively a no-op change: everything is a wrapper around struct crypto_skcipher, but provides compile-time enforcement for not putting an ASYNC skcipher on the stack, which allows us to declare the on-stack requests with a fixed stack size.

[1] https://lkml.kernel.org/r/CAGXu5j+bpLK=EQ9LHkO8V=sdaQwt==6fbGhgn2Vi1E9_WxSGRQ@mail.gmail.com

-Kees

Kees Cook (23):
crypto: skcipher - Introduce crypto_sync_skcipher
gss_krb5: Remove VLA usage of skcipher
lib80211: Remove VLA usage of skcipher
mac802154: Remove VLA usage of skcipher s390/crypto: Remove VLA usage of skcipher x86/fpu: Remove VLA usage of skcipher
block: cryptoloop: Remove VLA usage of skcipher
libceph: Remove VLA usage of skcipher
ppp: mppe: Remove VLA usage of skcipher
rxrpc: Remove VLA usage of skcipher
wusb: Remove VLA usage of skcipher
crypto: ccp - Remove VLA usage of skcipher
crypto: vmx - Remove VLA usage of skcipher
crypto: null - Remove VLA usage of skcipher
crypto: cryptd - Remove VLA usage of skcipher
crypto: sahara - Remove VLA usage of skcipher
crypto: qce - Remove VLA usage of skcipher
crypto: artpec6 - Remove VLA usage of skcipher
crypto: chelsio - Remove VLA usage of skcipher
crypto: mxs-dcp - Remove VLA usage of skcipher
crypto: omap-aes - Remove VLA usage of skcipher
crypto: picoxcell - Remove VLA usage of skcipher
crypto: skcipher - Remove SKCIPHER_REQUEST_ON_STACK()

 arch/s390/crypto/aes_s390.c                   | 48 +++++-----
 arch/x86/crypto/fpu.c                         | 30 ++++---
 crypto/algif_aead.c                           | 12 +--
 crypto/authenc.c                              |  8 +-
 crypto/authencesn.c                           |  8 +-
 crypto/cryptd.c                               | 32 +++----
 crypto/crypto_null.c                          | 11 ++-
 crypto/echainiv.c                             |  4 +-
 crypto/gcm.c                                  |  8 +-
 crypto/seqiv.c                                |  4 +-
 crypto/skcipher.c                             | 24 +++++
 drivers/block/cryptoloop.c                    | 22 ++---
 drivers/crypto/axis/artpec6_crypto.c          | 19 ++--
 drivers/crypto/ccp/ccp-crypto-aes-xts.c       | 13 +--
 drivers/crypto/ccp/ccp-crypto.h               |  2 +-
 drivers/crypto/chelsio/chcr_algo.c            | 27 +++---
 drivers/crypto/chelsio/chcr_crypto.h          |  2 +-
 drivers/crypto/mxs-dcp.c                      | 21 +++--
 drivers/crypto/omap-aes.c                     | 17 ++--
 drivers/crypto/omap-aes.h                     |  2 +-
 drivers/crypto/picoxcell_crypto.c             | 21 +++--
 drivers/crypto/qce/ablkcipher.c               | 13 ++-
 drivers/crypto/qce/cipher.h                   |  2 +-
 drivers/crypto/sahara.c                       | 31 ++++---
 drivers/crypto/vmx/aes_cbc.c                  | 22 ++---
 drivers/crypto/vmx/aes_ctr.c                  | 18 ++--
 drivers/crypto/vmx/aes_xts.c                  | 18 ++--
 drivers/net/ppp/ppp_mppe.c                    | 27 +++---
 drivers/staging/rtl8192e/rtllib_crypt_tkip.c  | 34 ++++----
 drivers/staging/rtl8192e/rtllib_crypt_wep.c   | 28 +++---
 .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 34 ++++----
 .../rtl8192u/ieee80211/ieee80211_crypt_wep.c  | 26 +++---
 drivers/usb/wusbcore/crypto.c                 | 16 ++--
 include/crypto/internal/geniv.h               |  2 +-
 include/crypto/null.h                         |  2 +-
 include/crypto/skcipher.h                     | 74 +++++++++++++++-
 include/linux/sunrpc/gss_krb5.h               | 30 +++----
 net/ceph/crypto.c                             | 12 +--
 net/ceph/crypto.h                             |  2 +-
 net/mac802154/llsec.c                         | 16 ++--
 net/mac802154/llsec.h                         |  2 +-
 net/rxrpc/ar-internal.h                       |  2 +-
 net/rxrpc/rxkad.c                             | 44 +++++-----
 net/sunrpc/auth_gss/gss_krb5_crypto.c         | 87 ++++++++++---------
 net/sunrpc/auth_gss/gss_krb5_keys.c           |  9 +-
 net/sunrpc/auth_gss/gss_krb5_mech.c           | 53 ++++++-----
 net/sunrpc/auth_gss/gss_krb5_seqnum.c         | 18 ++--
 net/sunrpc/auth_gss/gss_krb5_wrap.c           | 20 ++---
 net/wireless/lib80211_crypt_tkip.c            | 34 ++++----
 net/wireless/lib80211_crypt_wep.c             | 28 +++---
 50 files changed, 563 insertions(+), 476 deletions(-)
Signature · 1 line
2.17.1