]> git.ipfire.org Git - thirdparty/valgrind.git/commit
s390x: Add MSA support
authorAndreas Arnez <arnez@linux.ibm.com>
Tue, 10 Sep 2024 16:38:49 +0000 (18:38 +0200)
committerAndreas Arnez <arnez@linux.ibm.com>
Tue, 10 Sep 2024 16:38:49 +0000 (18:38 +0200)
commit5d404b97d44001565403c7ca4a6a2eebfde4413d
tree6a00abe2e30cfac41a77c52da516a3b65b2cb7f9
parent1a1343b132c8795c437b218bff8a5f8bbcfbac2f
s390x: Add MSA support

Handle instructions that were added to z/Architecture with the
message-security assist (MSA) facility or with one of its extensions up to
MSA extension 9:

   km -- ``cipher message''
   kmc -- ``cipher message with chaining''
   kimd -- ``compute intermediate message digest''
   klmd -- ``compute last message digest''
   kmac -- ``compute message authentication code''
   kmf -- ``cipher message with cipher feedback''
   kmctr -- ``cipher message with counter''
   kmo -- ``cipher message with output feedback''
   pcc -- ``perform cryptographic computation''
   kma -- ``cipher message with authentication''
   kdsa -- ``compute digital signature authentication''

Each of these instructions has multiple functions.  Support all functions
described by MSA levels up to extension 9.  Handle the instructions as
"extensions" and essentially forward them to the instructions themselves,
as long as they are available on the host.

Note that the MSA-3 instruction

   pkcmo -- ``perform cryptographic key management operation''

will not be handled by this change, since it is privileged and should not
occur in user-space programs.

The MSA facilities are typically used by cryptographic libraries like
OpenSSL or openCryptoki.  So far Valgrind suppresses the facility bits
indicating any MSA support, which causes such libraries to revert to a
software implementation.

This change enables running cryptographic applications under Valgrind
without reverting to an alternate code path.
NEWS
VEX/priv/guest_s390_toIR.c
VEX/pub/libvex_s390x_common.h
coregrind/m_extension/extension-s390x.c
docs/internals/s390-opcodes.csv
none/tests/s390x/stfle.c
none/tests/s390x/stfle.stdout.exp
none/tests/s390x/stfle.stdout.exp-z16