Commit graph

6 commits

Author SHA1 Message Date
Jiten Patel
dd588625da ice: add return value for functions where ICE is disabled
Add proper return value for functions defined when Inline
Crypto Driver is not enabled. This ensures any test case
calling ICE functions to fail gracefully and avoid potential
PCNOC errors.

Tests: 1. Boot sdm660 LA4.0 target with change (FBE enabled)
       2. Run create_key test-> Test fails (expected), no crash observed
       3. Reboot device -> Device booted Successfully
       4. Boot sdm660 LA.4.0 target with change (FDE enabled)
       5. Run create_key test-> Test PASSED, no crash observed
       6. Reboot device -> Device booted Successfully

Change-Id: I35e5c151d5b2860e77c092e6502e25ab1839e567
Signed-off-by: Jiten Patel <jitepate@codeaurora.org>
2021-03-25 06:33:01 -07:00
Jiten Patel
f22e39f73c msm: ice: Fix stack-out-of-bound erros on kasan builds
ice_type defined in local scope and is passed to class_create
function where it saves the passed buffer as name identifier.
Due to local scope the passed buffer becomes invalid and if
read during uevent can cause in stack-out-of-bounds errors.

This change adds two variable is_sdcc_ice and is_ufscard_ice
which is used to determine corrrect ice instance name. ice
instance names are global macro which is passed to clas_create
which fix stack-out-of-bound issue due to local scope.

Change-Id: I59e617263801a0741e45d423401ce1232b3d65d1
Signed-off-by: Jiten Patel <jitepate@codeaurora.org>
2021-03-07 19:46:04 -08:00
Neeraj Soni
37c3300f52 Add support for block disk encryption
With new file encryption framework the crypto
vops should support crypto configuration for block
disk encryption feature as well.

Add ice.c and ice.h files, Ported and fixed the merged conflicts in
cqhci-crypto-qti.c file. (cherry picked from mainline kernel_msm-4.14
commit: 3317668)

Conflicts:-
drivers/mmc/host/cqhci-crypto-qti.c
drivers/crypto/msm/iceregs.h
drivers/crypto/msm/ice.c

new files added:-
drivers/crypto/msm/iceregs.h
drivers/crypto/msm/ice.c

Validations done:-
1) Device bootup successfully to UI.
2) Unlock device by PIN set on Q build.
3) adb shell getprop ro.crypto.state: encrypted
   adb shell getprop ro.crypto.type: block
4) After OTA check WIFI and BT scanning success.
5) Launch browser and do browsing(success).
6) Settings-> sound -> check the ringtones(old save ringtones retained).

Change-Id: I1504a023f91376b207d9af19ad097405a3a42c85
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
Signed-off-by: Jiten Patel <jitepate@codeaurora.org>
2020-10-13 18:17:43 +05:30
Prerna Kalla
650400b459 msm: ice: check for crypto engine state before processing request
Crypto engine can be put to suspend by host controller after workqueue
is scheduled. Also shutdown sequence can be ongoing while workqueue is
scheduled/executing. The request passed to crypto driver in these
cases can be invalidated by host device driver. So check for crypto
engine state before processing the pending requests.

Change-Id: I4aa2a211e439a876c8525ab062a7cb917b4e2d7e
Signed-off-by: Prerna Kalla <prernak@codeaurora.org>
2019-12-03 11:21:08 +05:30
Gaurav Kashyap
e2c6b3a39b security: Add ICE support for UFS card
Add ICE support for the new UFS card by
handling the ice device appropriately in
PFK.

Change-Id: I69f8d7b3560f854929f043d3f6f694cc28ff3dac
Signed-off-by: Gaurav Kashyap <gaurkash@codeaurora.org>
2019-06-20 13:37:41 -07:00
Zhen Kong
28cfbbcf6e qseecom: Add qseecom driver snapshot for kona
Add snapshot for qseecom from msm-4.14 commit 5d002609242c
("qseecom: listener unregister and register optimization").

Change-Id: I756d218259be9be328c863181059b67099dc1955
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2019-01-11 19:12:30 -08:00