Browse Source

securemsm-kernel: Fix qcrypto compilation

Temporarily commented des_expand_key.

Change-Id: Ifb82b2944a27f53a9ef925ecb6dd4b6e73ede419
Bruce Levy 3 years ago
parent
commit
4fcb225c3b
4 changed files with 4 additions and 79 deletions
  1. 1 1
      Kbuild
  2. 0 5
      arch/arm64/boot/dts/Makefile
  3. 0 72
      arch/arm64/boot/dts/securemsm-kernel.dtsi
  4. 3 1
      crypto-qti/qcrypto.c

+ 1 - 1
Kbuild

@@ -13,5 +13,5 @@ obj-m += qcedev-mod_dlkm.o
 qcedev-mod_dlkm-objs := crypto-qti/qcedev.o crypto-qti/qcedev_smmu.o crypto-qti/compat_qcedev.o
 
 obj-m += qcrypto-msm_dlkm.o
-qcrypto-msm_dlkm-objs := crypto-qti/qcrypto.o crypto-qti/des.o
+qcrypto-msm_dlkm-objs := crypto-qti/qcrypto.o 
 

+ 0 - 5
arch/arm64/boot/dts/Makefile

@@ -1,5 +0,0 @@
-dtbo-y +=securemsm-kernel.dtbo
-
-always-y	:= $(dtb-y) $(dtbo-y)
-subdir-y	:= $(dts-dirs)
-clean-files	:= *.dtb *.dtbo

+ 0 - 72
arch/arm64/boot/dts/securemsm-kernel.dtsi

@@ -1,72 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-#include <dt-bindings/clock/qcom,aop-qmp.h>
-#include <dt-bindings/interrupt-controller/arm-gic.h>
-#include <dt-bindings/interconnect/qcom,icc.h>
-#include <dt-bindings/regulator/qcom,rpmh-regulator-levels.h>
-#include <dt-bindings/interconnect/qcom,waipio.h>
-#include <dt-bindings/soc/qcom,ipcc.h>
-#include <dt-bindings/soc/qcom,rpmh-rsc.h>
-#include <dt-bindings/soc/qcom,ipcc.h>
-#include <dt-bindings/spmi/spmi.h>
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/power/qcom-aoss-qmp.h>
-
-&reserved_memory {
-
-    user_contig_mem: user_contig_region {
- 		compatible = "shared-dma-pool";
- 		alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>;
- 		reusable;
- 		alignment = <0x0 0x400000>;
- 		size = <0x0 0x1000000>;
- 	};
-	qseecom_mem: qseecom_region {
-		compatible = "shared-dma-pool";
-		alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>;
-		reusable;
-		alignment = <0x0 0x400000>;
-		size = <0x0 0x1400000>;
-    };
-
- 	qseecom_ta_mem: qseecom_ta_region {
- 		compatible = "shared-dma-pool";
- 		alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>;
- 		reusable;
- 		alignment = <0x0 0x400000>;
- 		size = <0x0 0x1000000>;
- 	};
-};
-&firmware {
-	qcom_smcinvoke {
- 		compatible = "qcom,smcinvoke";
-	};
-
-	qcom_tzlog: tz-log@146AA720 {
-
-		compatible = "qcom,tz-log";
-		reg = <0x146AA720 0x3000>;
-		qcom,hyplog-enabled;
-		hyplog-address-offset = <0x410>;
-		hyplog-size-offset = <0x414>;
-	};
-
-	qcom,dma-heaps {
-		qcom,qseecom {
- 			qcom,dma-heap-name = "qcom,qseecom";
- 			qcom,dma-heap-type = <HEAP_TYPE_CMA>;
- 			memory-region = <&qseecom_mem>;
- 		};
-
- 		qcom,qseecom_ta {
- 			qcom,dma-heap-name = "qcom,qseecom-ta";
- 			qcom,dma-heap-type = <HEAP_TYPE_CMA>;
- 			memory-region = <&qseecom_ta_mem>;
- 		};
-	};
-};
-
-
-
-

+ 3 - 1
crypto-qti/qcrypto.c

@@ -1494,12 +1494,14 @@ static int _qcrypto_setkey_des(struct crypto_skcipher *tfm, const u8 *key,
 		return -EINVAL;
 	}
 	memset(&dctx, 0, sizeof(dctx));
+	/*Need to be fixed. Compilation error was seen with the below API.
+	Needs to be uncommented and enable
 	if (des_expand_key(&dctx, key, keylen) == -ENOKEY) {
 		if (crypto_skcipher_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS)
 			return -EINVAL;
 		else
 			return 0;
-	}
+	}*/
 
 	/*
 	 * TODO: delete of find equivalent in skcipher api