Commit bc266799 authored by Eric Biggers's avatar Eric Biggers Committed by Treehugger Robot
Browse files

ANDROID: jump_label: disable jump labels in fips140.ko



The fips140 module doesn't support jump labels, as they would invalidate
the hash of the .text section.  So when building the module, switch to
the generic implementation that does not rely on arch-specific code
patching support.

This fixes a failure in check_fips140_module_hmac() caused by the module
containing a call to crypto_alg_put(), which is an inline function that
calls refcount_dec_and_test(), which on arm64 uses a jump label.

Note that the optimized definition of struct static_key is retained, to
ensure ABI compatibility across the FIPS140 module boundary.  To ensure
that static keys and their associated jump labels remain in a consistent
state, the fips140 module will not be able to manipulate static keys,
but only to check their state.

Bug: 153614920
Bug: 188620248
Change-Id: Ie834bbf2eed5d09bfae7f387b711a934bedf390d
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
[ardb: disable jump labels in generic code not in arm64 arch code]
Signed-off-by: default avatarArd Biesheuvel <ardb@google.com>
parent 82f82f1d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment