mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Backport a fix from the v7 inline crypto patchset which ensures that the block layer knows the number of DUN bytes the inline encryption hardware supports, so that hardware isn't used when it shouldn't be. (This unfortunately means introducing some increasing long argument lists; this was all already fixed up in later versions of the patchset.) To avoid breaking the KMI for drivers, don't add a dun_bytes argument to keyslot_manager_create() but rather allow drivers to call keyslot_manager_set_max_dun_bytes() to override the default. Also, don't add dun_bytes as a new field in 'struct blk_crypto_key' but rather pack it into the existing 'hash' field which is for block layer use. Bug: 144046242 Bug: 153512828 Change-Id: I285f36557fb3eafc5f2f64727ef1740938b59dd7 Signed-off-by: Eric Biggers <ebiggers@google.com> Git-commit: 72091967bfbbc37fceb1a3208457ba26633606ae Git-repo: https://android.googlesource.com/kernel/common/+/refs/heads/android-4.14-stable [neersoni@codeaurora.org: back port the changes and update ufshcd-crypto-qti.c file to specify max dun byte support] Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>