]> git.ipfire.org Git - thirdparty/openssl.git/commit
aes-s390x.pl: Initialize reserved and unused memory
authorHolger Dengler <dengler@linux.ibm.com>
Wed, 20 Aug 2025 15:55:43 +0000 (17:55 +0200)
committerNeil Horman <nhorman@openssl.org>
Fri, 29 Aug 2025 14:40:06 +0000 (10:40 -0400)
commite0bdd5faa8e08f0f5db57b262d96c08caafa04a8
tree4032983d3d8b8a0e50d8d39e0b1c366a75048956
parent741bb7be15bd70584880d960352a002da548a576
aes-s390x.pl: Initialize reserved and unused memory

The reserved bytes in the parameter block (bytes 0-11) for the KMA
instruction should be set to zero to be compatible in case of future
architecture changes.

While at it, also the following unused parts of the parameter block
(bytes 48-63) are also cleared to avoid false positives with various
memory checkers like valgrind.

As it makes - performance wise - no difference to process 12, 48 or 64
bytes with one XC call, but two XC calls are slower than one call, the
first 64 bytes of the parameter block will be cleared with a single XC
call. This will also initialize the counter in the parameter block
(bytes 12-15), although it is not strictly necessary.

Co-developed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28315)

(cherry picked from commit 899623b29caa02f25e069acbcef581d19fe0a64e)
crypto/aes/asm/aes-s390x.pl