Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d960b8f5 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Set the default slot for Full Disk Encryption key to 31"

parents 84d07e7a 35874599
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
/*
 * QTI Inline Crypto Engine (ICE) driver
 *
 * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2020, 2021 The Linux Foundation. All rights reserved.
 */

#include <linux/module.h>
@@ -59,6 +59,8 @@
#define ICE_CRYPTO_CXT_FDE 1
#define ICE_CRYPTO_CXT_FBE 2

#define ICE_FDE_KEY_INDEX 31

static int ice_fde_flag;

struct ice_clk_info {
@@ -103,6 +105,11 @@ static int qti_ice_setting_config(struct request *req,
			setting->encr_bypass = true;
			setting->decr_bypass = true;
		}
		/* Qseecom now sets the FDE key to slot 31 by default, instead
		 * of slot 0, so use the same slot here during read/write
		 */
		if (cxt == ICE_CRYPTO_CXT_FDE)
			setting->crypto_data.key_index = ICE_FDE_KEY_INDEX;
	}

	return 0;
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@
#define TWO 2
#define QSEECOM_UFS_ICE_CE_NUM 10
#define QSEECOM_SDCC_ICE_CE_NUM 20
#define QSEECOM_ICE_FDE_KEY_INDEX 0
#define QSEECOM_ICE_FDE_KEY_INDEX 31

#define PHY_ADDR_4G	(1ULL<<32)