Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Nov 2017 18:52:09 +0000 (10:52 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Nov 2017 18:52:09 +0000 (10:52 -0800)
Pull crypto updates from Herbert Xu:
 "Here is the crypto update for 4.15:

  API:

   - Disambiguate EBUSY when queueing crypto request by adding ENOSPC.
     This change touches code outside the crypto API.
   - Reset settings when empty string is written to rng_current.

  Algorithms:

   - Add OSCCA SM3 secure hash.

  Drivers:

   - Remove old mv_cesa driver (replaced by marvell/cesa).
   - Enable rfc3686/ecb/cfb/ofb AES in crypto4xx.
   - Add ccm/gcm AES in crypto4xx.
   - Add support for BCM7278 in iproc-rng200.
   - Add hash support on Exynos in s5p-sss.
   - Fix fallback-induced error in vmx.
   - Fix output IV in atmel-aes.
   - Fix empty GCM hash in mediatek.

  Others:

   - Fix DoS potential in lib/mpi.
   - Fix potential out-of-order issues with padata"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (162 commits)
  lib/mpi: call cond_resched() from mpi_powm() loop
  crypto: stm32/hash - Fix return issue on update
  crypto: dh - Remove pointless checks for NULL 'p' and 'g'
  crypto: qat - Clean up error handling in qat_dh_set_secret()
  crypto: dh - Don't permit 'key' or 'g' size longer than 'p'
  crypto: dh - Don't permit 'p' to be 0
  crypto: dh - Fix double free of ctx->p
  hwrng: iproc-rng200 - Add support for BCM7278
  dt-bindings: rng: Document BCM7278 RNG200 compatible
  crypto: chcr - Replace _manual_ swap with swap macro
  crypto: marvell - Add a NULL entry at the end of mv_cesa_plat_id_table[]
  hwrng: virtio - Virtio RNG devices need to be re-registered after suspend/resume
  crypto: atmel - remove empty functions
  crypto: ecdh - remove empty exit()
  MAINTAINERS: update maintainer for qat
  crypto: caam - remove unused param of ctx_map_to_sec4_sg()
  crypto: caam - remove unneeded edesc zeroization
  crypto: atmel-aes - Reset the controller before each use
  crypto: atmel-aes - properly set IV after {en,de}crypt
  hwrng: core - Reset user selected rng by writing "" to rng_current
  ...

17 files changed:
1  2 
MAINTAINERS
crypto/Kconfig
crypto/Makefile
crypto/xts.c
drivers/crypto/Makefile
drivers/crypto/caam/compat.h
drivers/crypto/caam/desc.h
drivers/crypto/cavium/nitrox/nitrox_hal.c
drivers/crypto/marvell/cesa.h
drivers/crypto/stm32/stm32-hash.c
drivers/md/dm-verity-target.c
drivers/net/ethernet/chelsio/cxgb4/sge.c
fs/cifs/smb2ops.c
fs/crypto/fname.c
fs/crypto/fscrypt_private.h
fs/crypto/keyinfo.c
security/integrity/ima/ima_crypto.c

diff --combined MAINTAINERS
@@@ -873,7 -873,7 +873,7 @@@ F: drivers/android
  F:    drivers/staging/android/
  
  ANDROID GOLDFISH RTC DRIVER
 -M:    Miodrag Dinic <miodrag.dinic@imgtec.com>
 +M:    Miodrag Dinic <miodrag.dinic@mips.com>
  S:    Supported
  F:    Documentation/devicetree/bindings/rtc/google,goldfish-rtc.txt
  F:    drivers/rtc/rtc-goldfish.c
@@@ -2896,13 -2896,6 +2896,13 @@@ S:    Supporte
  F:    drivers/gpio/gpio-brcmstb.c
  F:    Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt
  
 +BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER
 +M:    Al Cooper <alcooperx@gmail.com>
 +L:    linux-kernel@vger.kernel.org
 +L:    bcm-kernel-feedback-list@broadcom.com
 +S:    Maintained
 +F:    drivers/phy/broadcom/phy-brcm-usb*
 +
  BROADCOM GENET ETHERNET DRIVER
  M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    netdev@vger.kernel.org
@@@ -3451,8 -3444,7 +3451,8 @@@ M:      Thomas Gleixner <tglx@linutronix.de
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
  S:    Supported
 -F:    drivers/clocksource
 +F:    drivers/clocksource/
 +F:    Documentation/devicetree/bindings/timer/
  
  CMPC ACPI DRIVER
  M:    Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
@@@ -3644,8 -3636,6 +3644,8 @@@ F:      drivers/cpufreq/arm_big_little_dt.
  
  CPU POWER MONITORING SUBSYSTEM
  M:    Thomas Renninger <trenn@suse.com>
 +M:    Shuah Khan <shuahkh@osg.samsung.com>
 +M:    Shuah Khan <shuah@kernel.org>
  L:    linux-pm@vger.kernel.org
  S:    Maintained
  F:    tools/power/cpupower/
@@@ -4244,7 -4234,7 +4244,7 @@@ S:      Maintaine
  F:    drivers/dma/
  F:    include/linux/dmaengine.h
  F:    Documentation/devicetree/bindings/dma/
 -F:    Documentation/dmaengine/
 +F:    Documentation/driver-api/dmaengine/
  T:    git git://git.infradead.org/users/vkoul/slave-dma.git
  
  DMA MAPPING HELPERS
@@@ -4916,19 -4906,13 +4916,19 @@@ L:   linux-edac@vger.kernel.or
  S:    Maintained
  F:    drivers/edac/highbank*
  
 -EDAC-CAVIUM
 +EDAC-CAVIUM OCTEON
  M:    Ralf Baechle <ralf@linux-mips.org>
  M:    David Daney <david.daney@cavium.com>
  L:    linux-edac@vger.kernel.org
  L:    linux-mips@linux-mips.org
  S:    Supported
  F:    drivers/edac/octeon_edac*
 +
 +EDAC-CAVIUM THUNDERX
 +M:    David Daney <david.daney@cavium.com>
 +M:    Jan Glauber <jglauber@cavium.com>
 +L:    linux-edac@vger.kernel.org
 +S:    Supported
  F:    drivers/edac/thunderx_edac*
  
  EDAC-CORE
@@@ -5229,7 -5213,8 +5229,7 @@@ F:      fs/ext4
  
  Extended Verification Module (EVM)
  M:    Mimi Zohar <zohar@linux.vnet.ibm.com>
 -L:    linux-ima-devel@lists.sourceforge.net
 -L:    linux-security-module@vger.kernel.org
 +L:    linux-integrity@vger.kernel.org
  S:    Supported
  F:    security/integrity/evm/
  
@@@ -5274,8 -5259,7 +5274,8 @@@ S:      Maintaine
  F:    drivers/iommu/exynos-iommu.c
  
  EZchip NPS platform support
 -M:    Noam Camus <noamc@ezchip.com>
 +M:    Elad Kanfi <eladkan@mellanox.com>
 +M:    Vineet Gupta <vgupta@synopsys.com>
  S:    Supported
  F:    arch/arc/plat-eznps
  F:    arch/arc/boot/dts/eznps.dts
@@@ -5361,7 -5345,9 +5361,7 @@@ M:      "J. Bruce Fields" <bfields@fieldses.
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
  F:    include/linux/fcntl.h
 -F:    include/linux/fs.h
  F:    include/uapi/linux/fcntl.h
 -F:    include/uapi/linux/fs.h
  F:    fs/fcntl.c
  F:    fs/locks.c
  
@@@ -5370,8 -5356,6 +5370,8 @@@ M:      Alexander Viro <viro@zeniv.linux.org
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
  F:    fs/*
 +F:    include/linux/fs.h
 +F:    include/uapi/linux/fs.h
  
  FINTEK F75375S HARDWARE MONITOR AND FAN CONTROLLER DRIVER
  M:    Riku Voipio <riku.voipio@iki.fi>
@@@ -5484,7 -5468,7 +5484,7 @@@ F:      include/uapi/linux/fb.
  
  FREESCALE CAAM (Cryptographic Acceleration and Assurance Module) DRIVER
  M:    Horia Geantă <horia.geanta@nxp.com>
- M:    Dan Douglass <dan.douglass@nxp.com>
+ M:    Aymen Sghaier <aymen.sghaier@nxp.com>
  L:    linux-crypto@vger.kernel.org
  S:    Maintained
  F:    drivers/crypto/caam/
@@@ -6686,7 -6670,7 +6686,7 @@@ F:      include/net/ieee802154_netdev.
  F:    Documentation/networking/ieee802154.txt
  
  IFE PROTOCOL
 -M:    Yotam Gigi <yotamg@mellanox.com>
 +M:    Yotam Gigi <yotam.gi@gmail.com>
  M:    Jamal Hadi Salim <jhs@mojatatu.com>
  F:    net/ife
  F:    include/net/ife.h
@@@ -6748,13 -6732,13 +6748,13 @@@ S:   Maintaine
  F:    drivers/usb/atm/ueagle-atm.c
  
  IMGTEC ASCII LCD DRIVER
 -M:    Paul Burton <paul.burton@imgtec.com>
 +M:    Paul Burton <paul.burton@mips.com>
  S:    Maintained
  F:    Documentation/devicetree/bindings/auxdisplay/img-ascii-lcd.txt
  F:    drivers/auxdisplay/img-ascii-lcd.c
  
  IMGTEC IR DECODER DRIVER
 -M:    James Hogan <james.hogan@imgtec.com>
 +M:    James Hogan <jhogan@kernel.org>
  S:    Maintained
  F:    drivers/media/rc/img-ir/
  
@@@ -6856,7 -6840,9 +6856,7 @@@ L:      linux-crypto@vger.kernel.or
  INTEGRITY MEASUREMENT ARCHITECTURE (IMA)
  M:    Mimi Zohar <zohar@linux.vnet.ibm.com>
  M:    Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
 -L:    linux-ima-devel@lists.sourceforge.net
 -L:    linux-ima-user@lists.sourceforge.net
 -L:    linux-security-module@vger.kernel.org
 +L:    linux-integrity@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git
  S:    Supported
  F:    security/integrity/ima/
@@@ -7576,7 -7562,7 +7576,7 @@@ F:      arch/arm64/include/asm/kvm
  F:    arch/arm64/kvm/
  
  KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips)
 -M:    James Hogan <james.hogan@imgtec.com>
 +M:    James Hogan <jhogan@kernel.org>
  L:    linux-mips@linux-mips.org
  S:    Supported
  F:    arch/mips/include/uapi/asm/kvm*
@@@ -7584,7 -7570,7 +7584,7 @@@ F:      arch/mips/include/asm/kvm
  F:    arch/mips/kvm/
  
  KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc)
 -M:    Alexander Graf <agraf@suse.com>
 +M:    Paul Mackerras <paulus@ozlabs.org>
  L:    kvm-ppc@vger.kernel.org
  W:    http://www.linux-kvm.org/
  T:    git git://github.com/agraf/linux-2.6.git
@@@ -7639,7 -7625,8 +7639,7 @@@ F:      kernel/kexec
  
  KEYS-ENCRYPTED
  M:    Mimi Zohar <zohar@linux.vnet.ibm.com>
 -M:    David Safford <safford@us.ibm.com>
 -L:    linux-security-module@vger.kernel.org
 +L:    linux-integrity@vger.kernel.org
  L:    keyrings@vger.kernel.org
  S:    Supported
  F:    Documentation/security/keys/trusted-encrypted.rst
@@@ -7647,8 -7634,9 +7647,8 @@@ F:      include/keys/encrypted-type.
  F:    security/keys/encrypted-keys/
  
  KEYS-TRUSTED
 -M:    David Safford <safford@us.ibm.com>
  M:    Mimi Zohar <zohar@linux.vnet.ibm.com>
 -L:    linux-security-module@vger.kernel.org
 +L:    linux-integrity@vger.kernel.org
  L:    keyrings@vger.kernel.org
  S:    Supported
  F:    Documentation/security/keys/trusted-encrypted.rst
@@@ -7756,11 -7744,6 +7756,11 @@@ S:    Maintaine
  F:    Documentation/scsi/53c700.txt
  F:    drivers/scsi/53c700*
  
 +LEAKING_ADDRESSES
 +M:    Tobin C. Harding <me@tobin.cc>
 +S:    Maintained
 +F:    scripts/leaking_addresses.pl
 +
  LED SUBSYSTEM
  M:    Richard Purdie <rpurdie@rpsys.net>
  M:    Jacek Anaszewski <jacek.anaszewski@gmail.com>
@@@ -8281,12 -8264,6 +8281,12 @@@ L:    libertas-dev@lists.infradead.or
  S:    Orphan
  F:    drivers/net/wireless/marvell/libertas/
  
 +MARVELL MACCHIATOBIN SUPPORT
 +M:    Russell King <rmk@armlinux.org.uk>
 +L:    linux-arm-kernel@lists.infradead.org
 +S:    Maintained
 +F:    arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
 +
  MARVELL MV643XX ETHERNET DRIVER
  M:    Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
  L:    netdev@vger.kernel.org
@@@ -8759,7 -8736,7 +8759,7 @@@ Q:      http://patchwork.ozlabs.org/project/
  F:    drivers/net/ethernet/mellanox/mlxsw/
  
  MELLANOX FIRMWARE FLASH LIBRARY (mlxfw)
 -M:    Yotam Gigi <yotamg@mellanox.com>
 +M:    mlxsw@mellanox.com
  L:    netdev@vger.kernel.org
  S:    Supported
  W:    http://www.mellanox.com
@@@ -8908,7 -8885,7 +8908,7 @@@ F:      Documentation/devicetree/bindings/me
  T:    git git://linuxtv.org/media_tree.git
  
  METAG ARCHITECTURE
 -M:    James Hogan <james.hogan@imgtec.com>
 +M:    James Hogan <jhogan@kernel.org>
  L:    linux-metag@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag.git
  S:    Odd Fixes
@@@ -9009,7 -8986,7 +9009,7 @@@ F:      Documentation/mips
  F:    arch/mips/
  
  MIPS BOSTON DEVELOPMENT BOARD
 -M:    Paul Burton <paul.burton@imgtec.com>
 +M:    Paul Burton <paul.burton@mips.com>
  L:    linux-mips@linux-mips.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/clock/img,boston-clock.txt
@@@ -9019,7 -8996,7 +9019,7 @@@ F:      drivers/clk/imgtec/clk-boston.
  F:    include/dt-bindings/clock/boston-clock.h
  
  MIPS GENERIC PLATFORM
 -M:    Paul Burton <paul.burton@imgtec.com>
 +M:    Paul Burton <paul.burton@mips.com>
  L:    linux-mips@linux-mips.org
  S:    Supported
  F:    arch/mips/generic/
@@@ -9035,7 -9012,7 +9035,7 @@@ F:      drivers/*/*loongson1
  F:    drivers/*/*/*loongson1*
  
  MIPS RINT INSTRUCTION EMULATION
 -M:    Aleksandar Markovic <aleksandar.markovic@imgtec.com>
 +M:    Aleksandar Markovic <aleksandar.markovic@mips.com>
  L:    linux-mips@linux-mips.org
  S:    Supported
  F:    arch/mips/math-emu/sp_rint.c
@@@ -9229,6 -9206,7 +9229,6 @@@ F:      include/linux/isicom.
  MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER
  M:    Bin Liu <b-liu@ti.com>
  L:    linux-usb@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
  S:    Maintained
  F:    drivers/usb/musb/
  
@@@ -9376,7 -9354,7 +9376,7 @@@ NETWORK BLOCK DEVICE (NBD
  M:    Josef Bacik <jbacik@fb.com>
  S:    Maintained
  L:    linux-block@vger.kernel.org
 -L:    nbd-general@lists.sourceforge.net
 +L:    nbd@other.debian.org
  F:    Documentation/blockdev/nbd.txt
  F:    drivers/block/nbd.c
  F:    include/uapi/linux/nbd.h
@@@ -10047,11 -10025,7 +10047,11 @@@ T: git git://github.com/openrisc/linux.
  L:    openrisc@lists.librecores.org
  W:    http://openrisc.io
  S:    Maintained
 +F:    Documentation/devicetree/bindings/openrisc/
 +F:    Documentation/openrisc/
  F:    arch/openrisc/
 +F:    drivers/irqchip/irq-ompic.c
 +F:    drivers/irqchip/irq-or1k-*
  
  OPENVSWITCH
  M:    Pravin Shelar <pshelar@nicira.com>
@@@ -10069,7 -10043,7 +10069,7 @@@ M:   Stephen Boyd <sboyd@codeaurora.org
  L:    linux-pm@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git
 -F:    drivers/base/power/opp/
 +F:    drivers/opp/
  F:    include/linux/pm_opp.h
  F:    Documentation/power/opp.txt
  F:    Documentation/devicetree/bindings/opp/
@@@ -10199,6 -10173,7 +10199,6 @@@ F:   Documentation/parport*.tx
  
  PARAVIRT_OPS INTERFACE
  M:    Juergen Gross <jgross@suse.com>
 -M:    Chris Wright <chrisw@sous-sol.org>
  M:    Alok Kataria <akataria@vmware.com>
  M:    Rusty Russell <rusty@rustcorp.com.au>
  L:    virtualization@lists.linux-foundation.org
@@@ -10356,6 -10331,7 +10356,6 @@@ F:   drivers/pci/host/vmd.
  
  PCI DRIVER FOR MICROSEMI SWITCHTEC
  M:    Kurt Schwemmer <kurt.schwemmer@microsemi.com>
 -M:    Stephen Bates <stephen.bates@microsemi.com>
  M:    Logan Gunthorpe <logang@deltatee.com>
  L:    linux-pci@vger.kernel.org
  S:    Maintained
@@@ -10420,7 -10396,6 +10420,7 @@@ F:   drivers/pci/dwc/*keystone
  
  PCI ENDPOINT SUBSYSTEM
  M:    Kishon Vijay Abraham I <kishon@ti.com>
 +M:    Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
  L:    linux-pci@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kishon/pci-endpoint.git
  S:    Supported
@@@ -10472,15 -10447,6 +10472,15 @@@ F: include/linux/pci
  F:    arch/x86/pci/
  F:    arch/x86/kernel/quirks.c
  
 +PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS
 +M:    Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
 +L:    linux-pci@vger.kernel.org
 +Q:    http://patchwork.ozlabs.org/project/linux-pci/list/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git/
 +S:    Supported
 +F:    drivers/pci/host/
 +F:    drivers/pci/dwc/
 +
  PCIE DRIVER FOR AXIS ARTPEC
  M:    Niklas Cassel <niklas.cassel@axis.com>
  M:    Jesper Nilsson <jesper.nilsson@axis.com>
@@@ -10500,6 -10466,7 +10500,6 @@@ F:   drivers/pci/host/pci-thunder-
  
  PCIE DRIVER FOR HISILICON
  M:    Zhou Wang <wangzhou1@hisilicon.com>
 -M:    Gabriele Paoloni <gabriele.paoloni@huawei.com>
  L:    linux-pci@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
@@@ -10586,8 -10553,6 +10586,8 @@@ M:   Peter Zijlstra <peterz@infradead.org
  M:    Ingo Molnar <mingo@redhat.com>
  M:    Arnaldo Carvalho de Melo <acme@kernel.org>
  R:    Alexander Shishkin <alexander.shishkin@linux.intel.com>
 +R:    Jiri Olsa <jolsa@redhat.com>
 +R:    Namhyung Kim <namhyung@kernel.org>
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
  S:    Supported
@@@ -10711,9 -10676,10 +10711,9 @@@ S:  Maintaine
  F:    drivers/pinctrl/spear/
  
  PISTACHIO SOC SUPPORT
 -M:    James Hartley <james.hartley@imgtec.com>
 -M:    Ionela Voinescu <ionela.voinescu@imgtec.com>
 +M:    James Hartley <james.hartley@sondrel.com>
  L:    linux-mips@linux-mips.org
 -S:    Maintained
 +S:    Odd Fixes
  F:    arch/mips/pistachio/
  F:    arch/mips/include/asm/mach-pistachio/
  F:    arch/mips/boot/dts/img/pistachio*
@@@ -10917,7 -10883,7 +10917,7 @@@ S:   Maintaine
  F:    drivers/block/ps3vram.c
  
  PSAMPLE PACKET SAMPLING SUPPORT:
 -M:    Yotam Gigi <yotamg@mellanox.com>
 +M:    Yotam Gigi <yotam.gi@gmail.com>
  S:    Maintained
  F:    net/psample
  F:    include/net/psample.h
@@@ -11060,7 -11026,6 +11060,6 @@@ F:   drivers/mtd/nand/pxa3xx_nand.
  
  QAT DRIVER
  M:    Giovanni Cabiddu <giovanni.cabiddu@intel.com>
- M:    Salvatore Benedetto <salvatore.benedetto@intel.com>
  L:    qat-linux@intel.com
  S:    Supported
  F:    drivers/crypto/qat/
@@@ -11793,7 -11758,7 +11792,7 @@@ L:   linux-crypto@vger.kernel.or
  L:    linux-samsung-soc@vger.kernel.org
  S:    Maintained
  F:    drivers/crypto/exynos-rng.c
- F:    Documentation/devicetree/bindings/rng/samsung,exynos-rng4.txt
+ F:    Documentation/devicetree/bindings/crypto/samsung,exynos-rng4.txt
  
  SAMSUNG FRAMEBUFFER DRIVER
  M:    Jingoo Han <jingoohan1@gmail.com>
@@@ -12076,12 -12041,6 +12075,12 @@@ L: linux-mmc@vger.kernel.or
  S:    Maintained
  F:    drivers/mmc/host/sdhci-spear.c
  
 +SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) TI OMAP DRIVER
 +M:    Kishon Vijay Abraham I <kishon@ti.com>
 +L:    linux-mmc@vger.kernel.org
 +S:    Maintained
 +F:    drivers/mmc/host/sdhci-omap.c
 +
  SECURE ENCRYPTING DEVICE (SED) OPAL DRIVER
  M:    Scott Bauer <scott.bauer@intel.com>
  M:    Jonathan Derrick <jonathan.derrick@intel.com>
@@@ -12971,9 -12930,9 +12970,9 @@@ F:   drivers/mmc/host/dw_mmc
  SYNOPSYS HSDK RESET CONTROLLER DRIVER
  M:    Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
  S:    Supported
 -F:    drivers/reset/reset-hsdk-v1.c
 -F:    include/dt-bindings/reset/snps,hsdk-v1-reset.h
 -F:    Documentation/devicetree/bindings/reset/snps,hsdk-v1-reset.txt
 +F:    drivers/reset/reset-hsdk.c
 +F:    include/dt-bindings/reset/snps,hsdk-reset.h
 +F:    Documentation/devicetree/bindings/reset/snps,hsdk-reset.txt
  
  SYSTEM CONFIGURATION (SYSCON)
  M:    Lee Jones <lee.jones@linaro.org>
@@@ -13632,14 -13591,23 +13631,14 @@@ F:        drivers/platform/x86/toshiba-wmi.
  
  TPM DEVICE DRIVER
  M:    Peter Huewe <peterhuewe@gmx.de>
 -M:    Marcel Selhorst <tpmdd@selhorst.net>
  M:    Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
  R:    Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
 -W:    http://tpmdd.sourceforge.net
 -L:    tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers)
 -Q:    https://patchwork.kernel.org/project/tpmdd-devel/list/
 +L:    linux-integrity@vger.kernel.org
 +Q:    https://patchwork.kernel.org/project/linux-integrity/list/
  T:    git git://git.infradead.org/users/jjs/linux-tpmdd.git
  S:    Maintained
  F:    drivers/char/tpm/
  
 -TPM IBM_VTPM DEVICE DRIVER
 -M:    Ashley Lai <ashleydlai@gmail.com>
 -W:    http://tpmdd.sourceforge.net
 -L:    tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers)
 -S:    Maintained
 -F:    drivers/char/tpm/tpm_ibmvtpm*
 -
  TRACING
  M:    Steven Rostedt <rostedt@goodmis.org>
  M:    Ingo Molnar <mingo@redhat.com>
@@@ -14349,7 -14317,6 +14348,7 @@@ L:   virtualization@lists.linux-foundatio
  L:    kvm@vger.kernel.org
  S:    Supported
  F:    drivers/s390/virtio/
 +F:    arch/s390/include/uapi/asm/virtio-ccw.h
  
  VIRTIO GPU DRIVER
  M:    David Airlie <airlied@linux.ie>
diff --combined crypto/Kconfig
@@@ -1,4 -1,3 +1,4 @@@
 +# SPDX-License-Identifier: GPL-2.0
  #
  # Generic algorithms support
  #
@@@ -860,6 -859,17 +860,17 @@@ config CRYPTO_SHA
          References:
          http://keccak.noekeon.org/
  
+ config CRYPTO_SM3
+       tristate "SM3 digest algorithm"
+       select CRYPTO_HASH
+       help
+         SM3 secure hash function as defined by OSCCA GM/T 0004-2012 SM3).
+         It is part of the Chinese Commercial Cryptography suite.
+         References:
+         http://www.oscca.gov.cn/UpFile/20101222141857786.pdf
+         https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash
  config CRYPTO_TGR192
        tristate "Tiger digest algorithms"
        select CRYPTO_HASH
diff --combined crypto/Makefile
@@@ -1,4 -1,3 +1,4 @@@
 +# SPDX-License-Identifier: GPL-2.0
  #
  # Cryptographic API
  #
@@@ -71,6 -70,7 +71,7 @@@ obj-$(CONFIG_CRYPTO_SHA1) += sha1_gener
  obj-$(CONFIG_CRYPTO_SHA256) += sha256_generic.o
  obj-$(CONFIG_CRYPTO_SHA512) += sha512_generic.o
  obj-$(CONFIG_CRYPTO_SHA3) += sha3_generic.o
+ obj-$(CONFIG_CRYPTO_SM3) += sm3_generic.o
  obj-$(CONFIG_CRYPTO_WP512) += wp512.o
  CFLAGS_wp512.o := $(call cc-option,-fno-schedule-insns)  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149
  obj-$(CONFIG_CRYPTO_TGR192) += tgr192.o
diff --combined crypto/xts.c
@@@ -269,9 -269,7 +269,7 @@@ static int do_encrypt(struct skcipher_r
                      crypto_skcipher_encrypt(subreq) ?:
                      post_crypt(req);
  
-               if (err == -EINPROGRESS ||
-                   (err == -EBUSY &&
-                    req->base.flags & CRYPTO_TFM_REQ_MAY_BACKLOG))
+               if (err == -EINPROGRESS || err == -EBUSY)
                        return err;
        }
  
@@@ -321,9 -319,7 +319,7 @@@ static int do_decrypt(struct skcipher_r
                      crypto_skcipher_decrypt(subreq) ?:
                      post_crypt(req);
  
-               if (err == -EINPROGRESS ||
-                   (err == -EBUSY &&
-                    req->base.flags & CRYPTO_TFM_REQ_MAY_BACKLOG))
+               if (err == -EINPROGRESS || err == -EBUSY)
                        return err;
        }
  
@@@ -554,10 -550,8 +550,10 @@@ static int create(struct crypto_templat
                ctx->name[len - 1] = 0;
  
                if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME,
 -                           "xts(%s)", ctx->name) >= CRYPTO_MAX_ALG_NAME)
 -                      return -ENAMETOOLONG;
 +                           "xts(%s)", ctx->name) >= CRYPTO_MAX_ALG_NAME) {
 +                      err = -ENAMETOOLONG;
 +                      goto err_drop_spawn;
 +              }
        } else
                goto err_drop_spawn;
  
diff --combined drivers/crypto/Makefile
@@@ -1,4 -1,3 +1,4 @@@
 +# SPDX-License-Identifier: GPL-2.0
  obj-$(CONFIG_CRYPTO_DEV_ATMEL_AES) += atmel-aes.o
  obj-$(CONFIG_CRYPTO_DEV_ATMEL_SHA) += atmel-sha.o
  obj-$(CONFIG_CRYPTO_DEV_ATMEL_TDES) += atmel-tdes.o
@@@ -15,7 -14,6 +15,6 @@@ obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode
  obj-$(CONFIG_CRYPTO_DEV_HIFN_795X) += hifn_795x.o
  obj-$(CONFIG_CRYPTO_DEV_IMGTEC_HASH) += img-hash.o
  obj-$(CONFIG_CRYPTO_DEV_IXP4XX) += ixp4xx_crypto.o
- obj-$(CONFIG_CRYPTO_DEV_MV_CESA) += mv_cesa.o
  obj-$(CONFIG_CRYPTO_DEV_MARVELL_CESA) += marvell/
  obj-$(CONFIG_CRYPTO_DEV_MEDIATEK) += mediatek/
  obj-$(CONFIG_CRYPTO_DEV_MXS_DCP) += mxs-dcp.o
@@@ -1,4 -1,3 +1,4 @@@
 +/* SPDX-License-Identifier: GPL-2.0 */
  /*
   * Copyright 2008-2011 Freescale Semiconductor, Inc.
   */
@@@ -32,6 -31,7 +32,7 @@@
  #include <crypto/aes.h>
  #include <crypto/ctr.h>
  #include <crypto/des.h>
+ #include <crypto/gcm.h>
  #include <crypto/sha.h>
  #include <crypto/md5.h>
  #include <crypto/internal/aead.h>
@@@ -1,4 -1,3 +1,4 @@@
 +/* SPDX-License-Identifier: GPL-2.0 */
  /*
   * CAAM descriptor composition header
   * Definitions to support CAAM descriptor instruction generation
  #define MATH_SRC1_REG2                (0x02 << MATH_SRC1_SHIFT)
  #define MATH_SRC1_REG3                (0x03 << MATH_SRC1_SHIFT)
  #define MATH_SRC1_IMM         (0x04 << MATH_SRC1_SHIFT)
- #define MATH_SRC1_DPOVRD      (0x07 << MATH_SRC0_SHIFT)
+ #define MATH_SRC1_DPOVRD      (0x07 << MATH_SRC1_SHIFT)
  #define MATH_SRC1_INFIFO      (0x0a << MATH_SRC1_SHIFT)
  #define MATH_SRC1_OUTFIFO     (0x0b << MATH_SRC1_SHIFT)
  #define MATH_SRC1_ONE         (0x0c << MATH_SRC1_SHIFT)
@@@ -1,4 -1,3 +1,4 @@@
 +// SPDX-License-Identifier: GPL-2.0
  #include <linux/delay.h>
  
  #include "nitrox_dev.h"
@@@ -127,7 -126,7 +127,7 @@@ void nitrox_config_pkt_input_rings(stru
                 * size and interrupt threshold.
                 */
                offset = NPS_PKT_IN_INSTR_BADDRX(i);
-               nitrox_write_csr(ndev, NPS_PKT_IN_INSTR_BADDRX(i), cmdq->dma);
+               nitrox_write_csr(ndev, offset, cmdq->dma);
  
                /* configure ring size */
                offset = NPS_PKT_IN_INSTR_RSIZEX(i);
@@@ -1,10 -1,10 +1,11 @@@
 +/* SPDX-License-Identifier: GPL-2.0 */
  #ifndef __MARVELL_CESA_H__
  #define __MARVELL_CESA_H__
  
  #include <crypto/algapi.h>
  #include <crypto/hash.h>
  #include <crypto/internal/hash.h>
+ #include <crypto/internal/skcipher.h>
  
  #include <linux/crypto.h>
  #include <linux/dmapool.h>
@@@ -373,7 -373,7 +374,7 @@@ struct mv_cesa_engine
  struct mv_cesa_caps {
        int nengines;
        bool has_tdma;
-       struct crypto_alg **cipher_algs;
+       struct skcipher_alg **cipher_algs;
        int ncipher_algs;
        struct ahash_alg **ahash_algs;
        int nahash_algs;
@@@ -539,12 -539,12 +540,12 @@@ struct mv_cesa_sg_std_iter 
  };
  
  /**
-  * struct mv_cesa_ablkcipher_std_req - cipher standard request
+  * struct mv_cesa_skcipher_std_req - cipher standard request
   * @op:               operation context
   * @offset:   current operation offset
   * @size:     size of the crypto operation
   */
- struct mv_cesa_ablkcipher_std_req {
+ struct mv_cesa_skcipher_std_req {
        struct mv_cesa_op_ctx op;
        unsigned int offset;
        unsigned int size;
  };
  
  /**
-  * struct mv_cesa_ablkcipher_req - cipher request
+  * struct mv_cesa_skcipher_req - cipher request
   * @req:      type specific request information
   * @src_nents:        number of entries in the src sg list
   * @dst_nents:        number of entries in the dest sg list
   */
- struct mv_cesa_ablkcipher_req {
+ struct mv_cesa_skcipher_req {
        struct mv_cesa_req base;
-       struct mv_cesa_ablkcipher_std_req std;
+       struct mv_cesa_skcipher_std_req std;
        int src_nents;
        int dst_nents;
  };
@@@ -764,7 -764,7 +765,7 @@@ static inline int mv_cesa_req_needs_cle
         * the backlog and will be processed later. There's no need to
         * clean it up.
         */
-       if (ret == -EBUSY && req->flags & CRYPTO_TFM_REQ_MAY_BACKLOG)
+       if (ret == -EBUSY)
                return false;
  
        /* Request wasn't queued, we need to clean it up */
@@@ -869,11 -869,11 +870,11 @@@ extern struct ahash_alg mv_ahmac_md5_al
  extern struct ahash_alg mv_ahmac_sha1_alg;
  extern struct ahash_alg mv_ahmac_sha256_alg;
  
- extern struct crypto_alg mv_cesa_ecb_des_alg;
- extern struct crypto_alg mv_cesa_cbc_des_alg;
- extern struct crypto_alg mv_cesa_ecb_des3_ede_alg;
- extern struct crypto_alg mv_cesa_cbc_des3_ede_alg;
- extern struct crypto_alg mv_cesa_ecb_aes_alg;
- extern struct crypto_alg mv_cesa_cbc_aes_alg;
+ extern struct skcipher_alg mv_cesa_ecb_des_alg;
+ extern struct skcipher_alg mv_cesa_cbc_des_alg;
+ extern struct skcipher_alg mv_cesa_ecb_des3_ede_alg;
+ extern struct skcipher_alg mv_cesa_cbc_des3_ede_alg;
+ extern struct skcipher_alg mv_cesa_ecb_aes_alg;
+ extern struct skcipher_alg mv_cesa_cbc_aes_alg;
  
  #endif /* __MARVELL_CESA_H__ */
@@@ -553,9 -553,9 +553,9 @@@ static int stm32_hash_dma_send(struct s
  {
        struct stm32_hash_request_ctx *rctx = ahash_request_ctx(hdev->req);
        struct scatterlist sg[1], *tsg;
 -      int err = 0, len = 0, reg, ncp;
 +      int err = 0, len = 0, reg, ncp = 0;
        unsigned int i;
 -      const u32 *buffer = (const u32 *)rctx->buffer;
 +      u32 *buffer = (void *)rctx->buffer;
  
        rctx->sg = hdev->req->src;
        rctx->total = hdev->req->nbytes;
                reg |= HASH_CR_DMAA;
                stm32_hash_write(hdev, HASH_CR, reg);
  
 -              for (i = 0; i < DIV_ROUND_UP(ncp, sizeof(u32)); i++)
 -                      stm32_hash_write(hdev, HASH_DIN, buffer[i]);
 -
 -              stm32_hash_set_nblw(hdev, ncp);
 +              if (ncp) {
 +                      memset(buffer + ncp, 0,
 +                             DIV_ROUND_UP(ncp, sizeof(u32)) - ncp);
 +                      writesl(hdev->io_base + HASH_DIN, buffer,
 +                              DIV_ROUND_UP(ncp, sizeof(u32)));
 +              }
 +              stm32_hash_set_nblw(hdev, DIV_ROUND_UP(ncp, sizeof(u32)));
                reg = stm32_hash_read(hdev, HASH_STR);
                reg |= HASH_STR_DCAL;
                stm32_hash_write(hdev, HASH_STR, reg);
@@@ -895,7 -892,6 +895,6 @@@ static int stm32_hash_enqueue(struct ah
  static int stm32_hash_update(struct ahash_request *req)
  {
        struct stm32_hash_request_ctx *rctx = ahash_request_ctx(req);
-       int ret;
  
        if (!req->nbytes || !(rctx->flags & HASH_FLAGS_CPU))
                return 0;
                return 0;
        }
  
-       ret = stm32_hash_enqueue(req, HASH_OP_UPDATE);
-       if (rctx->flags & HASH_FLAGS_FINUP)
-               return ret;
-       return 0;
+       return stm32_hash_enqueue(req, HASH_OP_UPDATE);
  }
  
  static int stm32_hash_final(struct ahash_request *req)
@@@ -1070,7 -1061,6 +1064,6 @@@ static int stm32_hash_cra_sha256_init(s
  static irqreturn_t stm32_hash_irq_thread(int irq, void *dev_id)
  {
        struct stm32_hash_dev *hdev = dev_id;
-       int err;
  
        if (HASH_FLAGS_CPU & hdev->flags) {
                if (HASH_FLAGS_OUTPUT_READY & hdev->flags) {
        return IRQ_HANDLED;
  
  finish:
-       /*Finish current request */
-       stm32_hash_finish_req(hdev->req, err);
+       /* Finish current request */
+       stm32_hash_finish_req(hdev->req, 0);
  
        return IRQ_HANDLED;
  }
@@@ -1411,11 -1401,10 +1404,10 @@@ MODULE_DEVICE_TABLE(of, stm32_hash_of_m
  static int stm32_hash_get_of_match(struct stm32_hash_dev *hdev,
                                   struct device *dev)
  {
-       const struct of_device_id *match;
        int err;
  
-       match = of_match_device(stm32_hash_of_match, dev);
-       if (!match) {
+       hdev->pdata = of_device_get_match_data(dev);
+       if (!hdev->pdata) {
                dev_err(dev, "no compatible OF match\n");
                return -EINVAL;
        }
        err = of_property_read_u32(dev->of_node, "dma-maxburst",
                                   &hdev->dma_maxburst);
  
-       hdev->pdata = match->data;
        return err;
  }
  
@@@ -92,74 -92,33 +92,33 @@@ static sector_t verity_position_at_leve
        return block >> (level * v->hash_per_block_bits);
  }
  
- /*
-  * Callback function for asynchrnous crypto API completion notification
-  */
- static void verity_op_done(struct crypto_async_request *base, int err)
- {
-       struct verity_result *res = (struct verity_result *)base->data;
-       if (err == -EINPROGRESS)
-               return;
-       res->err = err;
-       complete(&res->completion);
- }
- /*
-  * Wait for async crypto API callback
-  */
- static inline int verity_complete_op(struct verity_result *res, int ret)
- {
-       switch (ret) {
-       case 0:
-               break;
-       case -EINPROGRESS:
-       case -EBUSY:
-               ret = wait_for_completion_interruptible(&res->completion);
-               if (!ret)
-                       ret = res->err;
-               reinit_completion(&res->completion);
-               break;
-       default:
-               DMERR("verity_wait_hash: crypto op submission failed: %d", ret);
-       }
-       if (unlikely(ret < 0))
-               DMERR("verity_wait_hash: crypto op failed: %d", ret);
-       return ret;
- }
  static int verity_hash_update(struct dm_verity *v, struct ahash_request *req,
                                const u8 *data, size_t len,
-                               struct verity_result *res)
+                               struct crypto_wait *wait)
  {
        struct scatterlist sg;
  
        sg_init_one(&sg, data, len);
        ahash_request_set_crypt(req, &sg, NULL, len);
  
-       return verity_complete_op(res, crypto_ahash_update(req));
+       return crypto_wait_req(crypto_ahash_update(req), wait);
  }
  
  /*
   * Wrapper for crypto_ahash_init, which handles verity salting.
   */
  static int verity_hash_init(struct dm_verity *v, struct ahash_request *req,
-                               struct verity_result *res)
+                               struct crypto_wait *wait)
  {
        int r;
  
        ahash_request_set_tfm(req, v->tfm);
        ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_SLEEP |
                                        CRYPTO_TFM_REQ_MAY_BACKLOG,
-                                       verity_op_done, (void *)res);
-       init_completion(&res->completion);
+                                       crypto_req_done, (void *)wait);
+       crypto_init_wait(wait);
  
-       r = verity_complete_op(res, crypto_ahash_init(req));
+       r = crypto_wait_req(crypto_ahash_init(req), wait);
  
        if (unlikely(r < 0)) {
                DMERR("crypto_ahash_init failed: %d", r);
        }
  
        if (likely(v->salt_size && (v->version >= 1)))
-               r = verity_hash_update(v, req, v->salt, v->salt_size, res);
+               r = verity_hash_update(v, req, v->salt, v->salt_size, wait);
  
        return r;
  }
  
  static int verity_hash_final(struct dm_verity *v, struct ahash_request *req,
-                            u8 *digest, struct verity_result *res)
+                            u8 *digest, struct crypto_wait *wait)
  {
        int r;
  
        if (unlikely(v->salt_size && (!v->version))) {
-               r = verity_hash_update(v, req, v->salt, v->salt_size, res);
+               r = verity_hash_update(v, req, v->salt, v->salt_size, wait);
  
                if (r < 0) {
                        DMERR("verity_hash_final failed updating salt: %d", r);
        }
  
        ahash_request_set_crypt(req, NULL, digest, 0);
-       r = verity_complete_op(res, crypto_ahash_final(req));
+       r = crypto_wait_req(crypto_ahash_final(req), wait);
  out:
        return r;
  }
@@@ -196,17 -155,17 +155,17 @@@ int verity_hash(struct dm_verity *v, st
                const u8 *data, size_t len, u8 *digest)
  {
        int r;
-       struct verity_result res;
+       struct crypto_wait wait;
  
-       r = verity_hash_init(v, req, &res);
+       r = verity_hash_init(v, req, &wait);
        if (unlikely(r < 0))
                goto out;
  
-       r = verity_hash_update(v, req, data, len, &res);
+       r = verity_hash_update(v, req, data, len, &wait);
        if (unlikely(r < 0))
                goto out;
  
-       r = verity_hash_final(v, req, digest, &res);
+       r = verity_hash_final(v, req, digest, &wait);
  
  out:
        return r;
@@@ -389,7 -348,7 +348,7 @@@ out
   * Calculates the digest for the given bio
   */
  int verity_for_io_block(struct dm_verity *v, struct dm_verity_io *io,
-                       struct bvec_iter *iter, struct verity_result *res)
+                       struct bvec_iter *iter, struct crypto_wait *wait)
  {
        unsigned int todo = 1 << v->data_dev_block_bits;
        struct bio *bio = dm_bio_from_per_bio_data(io, v->ti->per_io_data_size);
                 */
                sg_set_page(&sg, bv.bv_page, len, bv.bv_offset);
                ahash_request_set_crypt(req, &sg, NULL, len);
-               r = verity_complete_op(res, crypto_ahash_update(req));
+               r = crypto_wait_req(crypto_ahash_update(req), wait);
  
                if (unlikely(r < 0)) {
                        DMERR("verity_for_io_block crypto op failed: %d", r);
@@@ -482,7 -441,7 +441,7 @@@ static int verity_verify_io(struct dm_v
        struct dm_verity *v = io->v;
        struct bvec_iter start;
        unsigned b;
-       struct verity_result res;
+       struct crypto_wait wait;
  
        for (b = 0; b < io->n_blocks; b++) {
                int r;
                        continue;
                }
  
-               r = verity_hash_init(v, req, &res);
+               r = verity_hash_init(v, req, &wait);
                if (unlikely(r < 0))
                        return r;
  
                start = io->iter;
-               r = verity_for_io_block(v, io, &io->iter, &res);
+               r = verity_for_io_block(v, io, &io->iter, &wait);
                if (unlikely(r < 0))
                        return r;
  
                r = verity_hash_final(v, req, verity_io_real_digest(v, io),
-                                       &res);
+                                       &wait);
                if (unlikely(r < 0))
                        return r;
  
@@@ -589,7 -548,7 +548,7 @@@ static void verity_prefetch_io(struct w
                verity_hash_at_level(v, pw->block, i, &hash_block_start, NULL);
                verity_hash_at_level(v, pw->block + pw->n_blocks - 1, i, &hash_block_end, NULL);
                if (!i) {
 -                      unsigned cluster = ACCESS_ONCE(dm_verity_prefetch_cluster);
 +                      unsigned cluster = READ_ONCE(dm_verity_prefetch_cluster);
  
                        cluster >>= v->data_dev_block_bits;
                        if (unlikely(!cluster))
@@@ -405,7 -405,7 +405,7 @@@ void free_tx_desc(struct adapter *adap
   */
  static inline int reclaimable(const struct sge_txq *q)
  {
 -      int hw_cidx = ntohs(ACCESS_ONCE(q->stat->cidx));
 +      int hw_cidx = ntohs(READ_ONCE(q->stat->cidx));
        hw_cidx -= q->cidx;
        return hw_cidx < 0 ? hw_cidx + q->size : hw_cidx;
  }
@@@ -1375,7 -1375,7 +1375,7 @@@ out_free:       dev_kfree_skb_any(skb)
   */
  static inline void reclaim_completed_tx_imm(struct sge_txq *q)
  {
 -      int hw_cidx = ntohs(ACCESS_ONCE(q->stat->cidx));
 +      int hw_cidx = ntohs(READ_ONCE(q->stat->cidx));
        int reclaim = hw_cidx - q->cidx;
  
        if (reclaim < 0)
@@@ -1537,7 -1537,13 +1537,13 @@@ int t4_mgmt_tx(struct adapter *adap, st
   */
  static inline int is_ofld_imm(const struct sk_buff *skb)
  {
-       return skb->len <= MAX_IMM_TX_PKT_LEN;
+       struct work_request_hdr *req = (struct work_request_hdr *)skb->data;
+       unsigned long opcode = FW_WR_OP_G(ntohl(req->wr_hi));
+       if (opcode == FW_CRYPTO_LOOKASIDE_WR)
+               return skb->len <= SGE_MAX_WR_LEN;
+       else
+               return skb->len <= MAX_IMM_TX_PKT_LEN;
  }
  
  /**
diff --combined fs/cifs/smb2ops.c
@@@ -522,7 -522,6 +522,7 @@@ smb2_query_eas(const unsigned int xid, 
        struct cifs_open_parms oparms;
        struct cifs_fid fid;
        struct smb2_file_full_ea_info *smb2_data;
 +      int ea_buf_size = SMB2_MIN_EA_BUF;
  
        utf16_path = cifs_convert_path_to_utf16(path, cifs_sb);
        if (!utf16_path)
                return rc;
        }
  
 -      smb2_data = kzalloc(SMB2_MAX_EA_BUF, GFP_KERNEL);
 -      if (smb2_data == NULL) {
 -              SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid);
 -              return -ENOMEM;
 +      while (1) {
 +              smb2_data = kzalloc(ea_buf_size, GFP_KERNEL);
 +              if (smb2_data == NULL) {
 +                      SMB2_close(xid, tcon, fid.persistent_fid,
 +                                 fid.volatile_fid);
 +                      return -ENOMEM;
 +              }
 +
 +              rc = SMB2_query_eas(xid, tcon, fid.persistent_fid,
 +                                  fid.volatile_fid,
 +                                  ea_buf_size, smb2_data);
 +
 +              if (rc != -E2BIG)
 +                      break;
 +
 +              kfree(smb2_data);
 +              ea_buf_size <<= 1;
 +
 +              if (ea_buf_size > SMB2_MAX_EA_BUF) {
 +                      cifs_dbg(VFS, "EA size is too large\n");
 +                      SMB2_close(xid, tcon, fid.persistent_fid,
 +                                 fid.volatile_fid);
 +                      return -ENOMEM;
 +              }
        }
  
 -      rc = SMB2_query_eas(xid, tcon, fid.persistent_fid, fid.volatile_fid,
 -                          smb2_data);
        SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid);
  
        if (!rc)
@@@ -2087,22 -2068,6 +2087,6 @@@ init_sg(struct smb_rqst *rqst, u8 *sign
        return sg;
  }
  
- struct cifs_crypt_result {
-       int err;
-       struct completion completion;
- };
- static void cifs_crypt_complete(struct crypto_async_request *req, int err)
- {
-       struct cifs_crypt_result *res = req->data;
-       if (err == -EINPROGRESS)
-               return;
-       res->err = err;
-       complete(&res->completion);
- }
  static int
  smb2_get_enc_key(struct TCP_Server_Info *server, __u64 ses_id, int enc, u8 *key)
  {
@@@ -2143,12 -2108,10 +2127,10 @@@ crypt_message(struct TCP_Server_Info *s
        struct aead_request *req;
        char *iv;
        unsigned int iv_len;
-       struct cifs_crypt_result result = {0, };
+       DECLARE_CRYPTO_WAIT(wait);
        struct crypto_aead *tfm;
        unsigned int crypt_len = le32_to_cpu(tr_hdr->OriginalMessageSize);
  
-       init_completion(&result.completion);
        rc = smb2_get_enc_key(server, tr_hdr->SessionId, enc, key);
        if (rc) {
                cifs_dbg(VFS, "%s: Could not get %scryption key\n", __func__,
        aead_request_set_ad(req, assoc_data_len);
  
        aead_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
-                                 cifs_crypt_complete, &result);
+                                 crypto_req_done, &wait);
  
-       rc = enc ? crypto_aead_encrypt(req) : crypto_aead_decrypt(req);
-       if (rc == -EINPROGRESS || rc == -EBUSY) {
-               wait_for_completion(&result.completion);
-               rc = result.err;
-       }
+       rc = crypto_wait_req(enc ? crypto_aead_encrypt(req)
+                               : crypto_aead_decrypt(req), &wait);
  
        if (!rc && enc)
                memcpy(&tr_hdr->Signature, sign, SMB2_SIGNATURE_SIZE);
diff --combined fs/crypto/fname.c
@@@ -1,4 -1,3 +1,4 @@@
 +// SPDX-License-Identifier: GPL-2.0
  /*
   * This contains functions for filename crypto management
   *
  #include "fscrypt_private.h"
  
  /**
-  * fname_crypt_complete() - completion callback for filename crypto
-  * @req: The asynchronous cipher request context
-  * @res: The result of the cipher operation
-  */
- static void fname_crypt_complete(struct crypto_async_request *req, int res)
- {
-       struct fscrypt_completion_result *ecr = req->data;
-       if (res == -EINPROGRESS)
-               return;
-       ecr->res = res;
-       complete(&ecr->completion);
- }
- /**
   * fname_encrypt() - encrypt a filename
   *
   * The caller must have allocated sufficient memory for the @oname string.
@@@ -41,7 -25,7 +26,7 @@@ static int fname_encrypt(struct inode *
                        const struct qstr *iname, struct fscrypt_str *oname)
  {
        struct skcipher_request *req = NULL;
-       DECLARE_FS_COMPLETION_RESULT(ecr);
+       DECLARE_CRYPTO_WAIT(wait);
        struct fscrypt_info *ci = inode->i_crypt_info;
        struct crypto_skcipher *tfm = ci->ci_ctfm;
        int res = 0;
        }
        skcipher_request_set_callback(req,
                        CRYPTO_TFM_REQ_MAY_BACKLOG | CRYPTO_TFM_REQ_MAY_SLEEP,
-                       fname_crypt_complete, &ecr);
+                       crypto_req_done, &wait);
        sg_init_one(&sg, oname->name, cryptlen);
        skcipher_request_set_crypt(req, &sg, &sg, cryptlen, iv);
  
        /* Do the encryption */
-       res = crypto_skcipher_encrypt(req);
-       if (res == -EINPROGRESS || res == -EBUSY) {
-               /* Request is being completed asynchronously; wait for it */
-               wait_for_completion(&ecr.completion);
-               res = ecr.res;
-       }
+       res = crypto_wait_req(crypto_skcipher_encrypt(req), &wait);
        skcipher_request_free(req);
        if (res < 0) {
                printk_ratelimited(KERN_ERR
@@@ -111,7 -90,7 +91,7 @@@ static int fname_decrypt(struct inode *
                                struct fscrypt_str *oname)
  {
        struct skcipher_request *req = NULL;
-       DECLARE_FS_COMPLETION_RESULT(ecr);
+       DECLARE_CRYPTO_WAIT(wait);
        struct scatterlist src_sg, dst_sg;
        struct fscrypt_info *ci = inode->i_crypt_info;
        struct crypto_skcipher *tfm = ci->ci_ctfm;
        }
        skcipher_request_set_callback(req,
                CRYPTO_TFM_REQ_MAY_BACKLOG | CRYPTO_TFM_REQ_MAY_SLEEP,
-               fname_crypt_complete, &ecr);
+               crypto_req_done, &wait);
  
        /* Initialize IV */
        memset(iv, 0, FS_CRYPTO_BLOCK_SIZE);
        sg_init_one(&src_sg, iname->name, iname->len);
        sg_init_one(&dst_sg, oname->name, oname->len);
        skcipher_request_set_crypt(req, &src_sg, &dst_sg, iname->len, iv);
-       res = crypto_skcipher_decrypt(req);
-       if (res == -EINPROGRESS || res == -EBUSY) {
-               wait_for_completion(&ecr.completion);
-               res = ecr.res;
-       }
+       res = crypto_wait_req(crypto_skcipher_decrypt(req), &wait);
        skcipher_request_free(req);
        if (res < 0) {
                printk_ratelimited(KERN_ERR
@@@ -1,4 -1,3 +1,4 @@@
 +/* SPDX-License-Identifier: GPL-2.0 */
  /*
   * fscrypt_private.h
   *
@@@ -70,16 -69,6 +70,6 @@@ typedef enum 
  #define FS_CTX_REQUIRES_FREE_ENCRYPT_FL               0x00000001
  #define FS_CTX_HAS_BOUNCE_BUFFER_FL           0x00000002
  
- struct fscrypt_completion_result {
-       struct completion completion;
-       int res;
- };
- #define DECLARE_FS_COMPLETION_RESULT(ecr) \
-       struct fscrypt_completion_result ecr = { \
-               COMPLETION_INITIALIZER_ONSTACK((ecr).completion), 0 }
  /* crypto.c */
  extern int fscrypt_initialize(unsigned int cop_flags);
  extern struct workqueue_struct *fscrypt_read_workqueue;
diff --combined fs/crypto/keyinfo.c
@@@ -1,4 -1,3 +1,4 @@@
 +// SPDX-License-Identifier: GPL-2.0
  /*
   * key management facility for FS encryption support.
   *
  
  static struct crypto_shash *essiv_hash_tfm;
  
- static void derive_crypt_complete(struct crypto_async_request *req, int rc)
- {
-       struct fscrypt_completion_result *ecr = req->data;
-       if (rc == -EINPROGRESS)
-               return;
-       ecr->res = rc;
-       complete(&ecr->completion);
- }
  /**
   * derive_key_aes() - Derive a key using AES-128-ECB
   * @deriving_key: Encryption key used for derivation.
@@@ -43,7 -31,7 +32,7 @@@ static int derive_key_aes(u8 deriving_k
  {
        int res = 0;
        struct skcipher_request *req = NULL;
-       DECLARE_FS_COMPLETION_RESULT(ecr);
+       DECLARE_CRYPTO_WAIT(wait);
        struct scatterlist src_sg, dst_sg;
        struct crypto_skcipher *tfm = crypto_alloc_skcipher("ecb(aes)", 0, 0);
  
@@@ -60,7 -48,7 +49,7 @@@
        }
        skcipher_request_set_callback(req,
                        CRYPTO_TFM_REQ_MAY_BACKLOG | CRYPTO_TFM_REQ_MAY_SLEEP,
-                       derive_crypt_complete, &ecr);
+                       crypto_req_done, &wait);
        res = crypto_skcipher_setkey(tfm, deriving_key,
                                        FS_AES_128_ECB_KEY_SIZE);
        if (res < 0)
        sg_init_one(&dst_sg, derived_raw_key, source_key->size);
        skcipher_request_set_crypt(req, &src_sg, &dst_sg, source_key->size,
                                   NULL);
-       res = crypto_skcipher_encrypt(req);
-       if (res == -EINPROGRESS || res == -EBUSY) {
-               wait_for_completion(&ecr.completion);
-               res = ecr.res;
-       }
+       res = crypto_wait_req(crypto_skcipher_encrypt(req), &wait);
  out:
        skcipher_request_free(req);
        crypto_free_skcipher(tfm);
@@@ -110,11 -94,6 +95,11 @@@ static int validate_user_key(struct fsc
                goto out;
        }
        ukp = user_key_payload_locked(keyring_key);
 +      if (!ukp) {
 +              /* key was revoked before we acquired its semaphore */
 +              res = -EKEYREVOKED;
 +              goto out;
 +      }
        if (ukp->datalen != sizeof(struct fscrypt_key)) {
                res = -EINVAL;
                goto out;
@@@ -374,7 -353,7 +359,7 @@@ void fscrypt_put_encryption_info(struc
        struct fscrypt_info *prev;
  
        if (ci == NULL)
 -              ci = ACCESS_ONCE(inode->i_crypt_info);
 +              ci = READ_ONCE(inode->i_crypt_info);
        if (ci == NULL)
                return;
  
  
  #include "ima.h"
  
- struct ahash_completion {
-       struct completion completion;
-       int err;
- };
  /* minimum file size for ahash use */
  static unsigned long ima_ahash_minsize;
  module_param_named(ahash_minsize, ima_ahash_minsize, ulong, 0644);
@@@ -196,30 -191,13 +191,13 @@@ static void ima_free_atfm(struct crypto
                crypto_free_ahash(tfm);
  }
  
- static void ahash_complete(struct crypto_async_request *req, int err)
+ static inline int ahash_wait(int err, struct crypto_wait *wait)
  {
-       struct ahash_completion *res = req->data;
  
-       if (err == -EINPROGRESS)
-               return;
-       res->err = err;
-       complete(&res->completion);
- }
+       err = crypto_wait_req(err, wait);
  
- static int ahash_wait(int err, struct ahash_completion *res)
- {
-       switch (err) {
-       case 0:
-               break;
-       case -EINPROGRESS:
-       case -EBUSY:
-               wait_for_completion(&res->completion);
-               reinit_completion(&res->completion);
-               err = res->err;
-               /* fall through */
-       default:
+       if (err)
                pr_crit_ratelimited("ahash calculation failed: err: %d\n", err);
-       }
  
        return err;
  }
@@@ -233,7 -211,7 +211,7 @@@ static int ima_calc_file_hash_atfm(stru
        int rc, read = 0, rbuf_len, active = 0, ahash_rc = 0;
        struct ahash_request *req;
        struct scatterlist sg[1];
-       struct ahash_completion res;
+       struct crypto_wait wait;
        size_t rbuf_size[2];
  
        hash->length = crypto_ahash_digestsize(tfm);
        if (!req)
                return -ENOMEM;
  
-       init_completion(&res.completion);
+       crypto_init_wait(&wait);
        ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG |
                                   CRYPTO_TFM_REQ_MAY_SLEEP,
-                                  ahash_complete, &res);
+                                  crypto_req_done, &wait);
  
-       rc = ahash_wait(crypto_ahash_init(req), &res);
+       rc = ahash_wait(crypto_ahash_init(req), &wait);
        if (rc)
                goto out1;
  
                         * read/request, wait for the completion of the
                         * previous ahash_update() request.
                         */
-                       rc = ahash_wait(ahash_rc, &res);
+                       rc = ahash_wait(ahash_rc, &wait);
                        if (rc)
                                goto out3;
                }
                         * read/request, wait for the completion of the
                         * previous ahash_update() request.
                         */
-                       rc = ahash_wait(ahash_rc, &res);
+                       rc = ahash_wait(ahash_rc, &wait);
                        if (rc)
                                goto out3;
                }
                        active = !active; /* swap buffers, if we use two */
        }
        /* wait for the last update request to complete */
-       rc = ahash_wait(ahash_rc, &res);
+       rc = ahash_wait(ahash_rc, &wait);
  out3:
        if (read)
                file->f_mode &= ~FMODE_READ;
  out2:
        if (!rc) {
                ahash_request_set_crypt(req, NULL, hash->digest, 0);
-               rc = ahash_wait(crypto_ahash_final(req), &res);
+               rc = ahash_wait(crypto_ahash_final(req), &wait);
        }
  out1:
        ahash_request_free(req);
@@@ -441,16 -419,6 +419,16 @@@ int ima_calc_file_hash(struct file *fil
        loff_t i_size;
        int rc;
  
 +      /*
 +       * For consistency, fail file's opened with the O_DIRECT flag on
 +       * filesystems mounted with/without DAX option.
 +       */
 +      if (file->f_flags & O_DIRECT) {
 +              hash->length = hash_digest_size[ima_hash_algo];
 +              hash->algo = ima_hash_algo;
 +              return -EINVAL;
 +      }
 +
        i_size = i_size_read(file_inode(file));
  
        if (ima_ahash_minsize && i_size >= ima_ahash_minsize) {
@@@ -537,7 -505,7 +515,7 @@@ static int calc_buffer_ahash_atfm(cons
  {
        struct ahash_request *req;
        struct scatterlist sg;
-       struct ahash_completion res;
+       struct crypto_wait wait;
        int rc, ahash_rc = 0;
  
        hash->length = crypto_ahash_digestsize(tfm);
        if (!req)
                return -ENOMEM;
  
-       init_completion(&res.completion);
+       crypto_init_wait(&wait);
        ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG |
                                   CRYPTO_TFM_REQ_MAY_SLEEP,
-                                  ahash_complete, &res);
+                                  crypto_req_done, &wait);
  
-       rc = ahash_wait(crypto_ahash_init(req), &res);
+       rc = ahash_wait(crypto_ahash_init(req), &wait);
        if (rc)
                goto out;
  
        ahash_rc = crypto_ahash_update(req);
  
        /* wait for the update request to complete */
-       rc = ahash_wait(ahash_rc, &res);
+       rc = ahash_wait(ahash_rc, &wait);
        if (!rc) {
                ahash_request_set_crypt(req, NULL, hash->digest, 0);
-               rc = ahash_wait(crypto_ahash_final(req), &res);
+               rc = ahash_wait(crypto_ahash_final(req), &wait);
        }
  out:
        ahash_request_free(req);