When qcedev module is exiting, it disconnects SPS.
At this times, crypto clocks need to be turned on
or it will cause a synchronous abort.
Tests: rmmod on the qcedev module.
Change-Id: I1721fe408392ef81b07a6c08d2196b2413ba2b2f
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Signed-off-by: Nageswara reddy Karnati <quic_nkarnati@quicinc.com>
check the num_fds passed into unmap buf ioctl,
or else it can lead to an out of bounds access.
Test: Build compilation. qcedev tests.
Change-Id: I206ba01dfa989346ade769a0f68b372b21f84043
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Signed-off-by: Pranav Lavhate <quic_plavhate@quicinc.com>
Adding fix to check the upper limit on the length
of the destination array while copying elements
from source address to avoid stack out of bound error.
Change-Id: I39d5768fa97f9d269cfb101a389bb771d13c7538
Signed-off-by: Monika Singh <monising@codeaurora.org>
This change solves compilation issues that
came up while enabling qcedev driver in
sdxlemur.
Change-Id: Iaa261681a3cef421dcb21908e1402b146e912a55
Signed-off-by: Anmolpreet Kaur <anmolpre@codeaurora.org>
Adding fix to check the upper limit on the length
of the destination array while copying elements from
source address to avoid stack out of bound error.
Change-Id: Ieb24e8f9b4a2b53fbc9442b25d790b12f737d471
Signed-off-by: Tanwee Kausar <tkausar@codeaurora.org>
qcrypto_init() and qcedev_init() should not be dependent on
DEBUG_FS API's returning success. Continue device init,when
DEBUG_FS is disabled.
Change-Id: I32cca791db545f5f2f9ea7871c091b121082dfbc
Signed-off-by: Prerna Kalla <prernak@codeaurora.org>
Make change to enable/disable clock just before/after crypto operation.
Change-Id: I0fad859b142ccc6250d597e07aff7c530d40154f
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Set the max value of num_fds to QCEDEV_MAX_BUFFERS to prevent
out of bound access of fd, fd_size, fd_offset array.
Change-Id: I88889472a4bd14f786588bd2c9e06e69a98e94c9
Signed-off-by: Prerna Kalla <prernak@codeaurora.org>
add snapshot of compat_qcedev.c and compat_qcedev.h from
msm-4.19 commit 52d84be6ae6e151ba ("crypto: msm: qcrypto:
Fix null pointer dereference error in qcrypto driver")
with changes to comply with msm-5.4 format requirement.
Change-Id: Ib80bc4fdec58392246bfcec1b08620dcde0a6608
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
There is already a qcrypto module defined in drivers/crypto/qce so
rename this one to qcrypto-msm to avoid an error while building with
'allmodconfig'.
Change-Id: Ic0dedbadb33e28eccd952c6f9c01c8b8208ad2ec
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
qcedev.c and qcedev_smmu.c are clearly not expected to be compiled
as separate modules so bundle them together as one.
Change-Id: Ic0dedbad96baebac00448edf4cf440d1e0edd41c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Fix an out of order definition of MODULE_DEVICE_TABLE, add missing
brackets to fix a suspect indentation warning and mark an
implcit switch fall through.
Fixes: 377c69bf3e ("crypto: msm: Add QTI crypto drivers")
Change-Id: Ic0dedbada33fd2e5c692e5f0d64fd0e7b7afb5f1
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Fix the following warning from gcc 7.4.1 with -Werror enabled:
drivers/crypto/msm/qce50.c:4668:28: error: ‘~’ on a boolean expression
[-Werror=bool-operation]
pce_dev->cadence_flag = ~pce_dev->cadence_flag;
drivers/crypto/msm/qce50.c:4668:28: note: did you mean to use logical not?.
Fixes: 377c69bf3e ("crypto: msm: Add QTI crypto drivers")
Change-Id: Ic0dedbad73c49d059d68d9412009b74583d33154
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
This is a snapshot of the crypto drivers as of msm-4.19
commit 52d84be6ae6e151ba ("crypto: msm: qcrypto: Fix null
pointer dereference error in qcrypto driver")
with changes to comply with msm-5.4 format requirement.
Change-Id: Ic566a15e41511d229a9e476c03962753da583946
Signed-off-by: Zhen Kong <zkong@codeaurora.org>