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.
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.