Added required changes to fit properly android-4.19.79-95 crypto content into msm-4.19 branch. Modifications in abi_gki_aarch64.xml are discarded completely. The order of applying is bottom to top:1f876610feANDROID: dm: Add wrapped key support in dm-default-keyb785dbcb87ANDROID: dm: add support for passing through derive_raw_secret66b3c81270ANDROID: block: Prevent crypto fallback for wrapped keys36500bffb9fscrypt: support passing a keyring key to FS_IOC_ADD_ENCRYPTION_KEYb32863f17fANDROID: dm: add dm-default-key target for metadata encryption94706caf62ANDROID: dm: enable may_passthrough_inline_crypto on some targets44e1174c18ANDROID: dm: add support for passing through inline crypto supporte65d08ae68ANDROID: block: Introduce passthrough keyslot manager8f48f6657dANDROID: ext4, f2fs: enable direct I/O with inline encryptionbbee78199fFROMLIST: scsi: ufs: add program_key() variant op0f1c72a2f5ANDROID: block: export symbols needed for modules to use inline crypto35b62551b9ANDROID: block: fix some inline crypto bugs23b81578bfANDROID: fscrypt: add support for hardware-wrapped keysa076eebee0ANDROID: block: add KSM op to derive software secret from wrapped key3e8c41805fANDROID: block: provide key size as input to inline crypto APIsbb7f6203fbANDROID: ufshcd-crypto: export cap find APIb01c73ea71BACKPORT: FROMLIST: Update Inline Encryption from v5 to v6 of patch series Change-Id: Ic741913aa478500da94a52eace02bb9192e581b9 Git-repo: https://android.googlesource.com/kernel/common/+/refs/heads/android-4.19 Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org> Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
66 lines
1.4 KiB
C
66 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright 2019 Google LLC
|
|
*/
|
|
|
|
#ifndef __LINUX_BLK_CRYPTO_H
|
|
#define __LINUX_BLK_CRYPTO_H
|
|
|
|
#include <linux/bio.h>
|
|
|
|
#ifdef CONFIG_BLK_INLINE_ENCRYPTION
|
|
|
|
int blk_crypto_submit_bio(struct bio **bio_ptr);
|
|
|
|
bool blk_crypto_endio(struct bio *bio);
|
|
|
|
int blk_crypto_init_key(struct blk_crypto_key *blk_key,
|
|
const u8 *raw_key, unsigned int raw_key_size,
|
|
bool is_hw_wrapped,
|
|
enum blk_crypto_mode_num crypto_mode,
|
|
unsigned int data_unit_size);
|
|
|
|
int blk_crypto_evict_key(struct request_queue *q,
|
|
const struct blk_crypto_key *key);
|
|
|
|
#else /* CONFIG_BLK_INLINE_ENCRYPTION */
|
|
|
|
static inline int blk_crypto_submit_bio(struct bio **bio_ptr)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline bool blk_crypto_endio(struct bio *bio)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
#endif /* CONFIG_BLK_INLINE_ENCRYPTION */
|
|
|
|
#ifdef CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK
|
|
|
|
int blk_crypto_start_using_mode(enum blk_crypto_mode_num mode_num,
|
|
unsigned int data_unit_size,
|
|
struct request_queue *q);
|
|
|
|
int blk_crypto_fallback_init(void);
|
|
|
|
#else /* CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK */
|
|
|
|
static inline int
|
|
blk_crypto_start_using_mode(enum blk_crypto_mode_num mode_num,
|
|
unsigned int data_unit_size,
|
|
struct request_queue *q)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int blk_crypto_fallback_init(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
#endif /* CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK */
|
|
|
|
#endif /* __LINUX_BLK_CRYPTO_H */
|