linux/arch
Harald Freudenberger 3ac2939bc4 crypto: s390/phmac - Do not modify the req->nbytes value
The phmac implementation used the req->nbytes field on combined
operations (finup, digest) to track the state:
with req->nbytes > 0 the update needs to be processed,
while req->nbytes == 0 means to do the final operation. For
this purpose the req->nbytes field was set to 0 after successful
update operation. However, aead uses the req->nbytes field after a
successful hash operation to determine the amount of data to
en/decrypt. So an implementation must not modify the nbytes field.

Fixed by a slight rework on the phmac implementation. There is
now a new field async_op in the request context which tracks
the (asynch) operation to process. So the 'state' via req->nbytes
is not needed any more and now this field is untouched and may
be evaluated even after a request is processed by the phmac
implementation.

Fixes: cbbc675506 ("crypto: s390 - New s390 specific protected key hash phmac")
Reported-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Tested-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2025-10-23 12:53:23 +08:00
..
alpha assorted dead code removal around asm/pgtable.h 2025-10-03 11:37:50 -07:00
arc Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
arm ARM development for 6.18-rc1 2025-10-07 16:20:19 -07:00
arm64 arm64 fixes for -rc1 2025-10-07 08:59:25 -07:00
csky assorted dead code removal around asm/pgtable.h 2025-10-03 11:37:50 -07:00
hexagon Scheduler updates for v6.18: 2025-09-30 10:35:11 -07:00
loongarch hyperv-next for v6.18 2025-10-07 08:40:15 -07:00
m68k pci-v6.18-changes 2025-10-06 10:41:03 -07:00
microblaze assorted dead code removal around asm/pgtable.h 2025-10-03 11:37:50 -07:00
mips pci-v6.18-changes 2025-10-06 10:41:03 -07:00
nios2 Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
openrisc OpenRISC updates for 6.18 2025-10-05 10:02:54 -07:00
parisc parisc architecture updates for kernel v6.18-rc1: 2025-10-10 10:01:55 -07:00
powerpc Generic: 2025-10-06 12:37:34 -07:00
riscv hyperv-next for v6.18 2025-10-07 08:40:15 -07:00
s390 crypto: s390/phmac - Do not modify the req->nbytes value 2025-10-23 12:53:23 +08:00
sh Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
sparc pci-v6.18-changes 2025-10-06 10:41:03 -07:00
um updates for UML, notably 2025-10-06 12:10:55 -07:00
x86 - Remove a bunch of asm implementing condition flags testing in KVM's 2025-10-11 11:19:16 -07:00
xtensa Xtensa updates for v6.18 2025-10-10 11:20:19 -07:00
.gitignore
Kconfig Kbuild updates for 6.18 2025-10-01 20:58:51 -07:00