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: I783f8ab3eb5a94cf503f831df8325c214ca710e4
Signed-off-by: Tanwee Kausar <tkausar@codeaurora.org>
Integer overflow check is invalid when ULONG_MAX is used,
as ULONG_MAX has typeof 'unsigned long', while areq->assoclen,
q_req->crytlen, and qreq.ivsize are 'unsigned int'. Make change
to use UINT_MAX instead of ULONG_MAX.
Change-Id: If2bb1900c07af1ea162da362c913d4880b0bc755
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: Pradosh Das <prados@codeaurora.org>
This patch re-works bus scaling and clk management to respond to
the actual crypto engine usage. The driver suspend/resume are
integrated with overall driver clk and bus management.
Furthermore, two functions are added to the low level crypto driver. Low
level crypto driver is informed to save and restored hardware context if
necessary across PM suspend/resume.
Change-Id: Ic906e0c7e96dee847253d6ef57341d1a38e294cf
Acked-by: Chemin Hsieh <cheminh@qti.qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
According to the specification of AEAD, AEAD request cryptlen is
not a Fixed maximum and assoclen is also same. This could lead to
potential integer overflow, thus allocating less memory. So we
need to check potential integer overflow on AEAD request length.
Change-Id: I58a0c5e1a6e890bad30f7865e96b7db46337158c
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Add support for enabling clk before initiating crypto
operation and disabling clk after all crypto operations
are complete.
Expose qce_clk_enable() and qce_clk_disable() APIs for
qce clients (qcedev and qcrypto).
Add clk scaling and gating in the qcedev and qcrypto
driver modules.
Change-Id: I6ab96f6b62f2401bf721483448601d52af1be19e
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Add the "shared" field in the ce_hw_support data structure.
This field indicates if the crypto HW used by the HLOS crypto
driver is being shared across multiple execution environment(s).
Change-Id: Ie8038c6bc7268dab2353f3a7f24b59d37aad2bb8
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
PMEM functionality is deprecated.
Remove all references to CONFIG_ANDROID_PMEM.
Remove all pmem related functionalities.
Change-Id: I70e5e308e37d25f8b0e788dbad6617925e4331bd
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
sg_next() may find wrong scatter-gather buffer in crypto subsystem,
and this causes a kernel crash. scatterwalk_sg_next() should be used
instead in crypto related drivers.
Change-Id: Ibb454bc8a8b2c0318e55cd12ba3e4ca2f3647e36
Acked-by: Ho Lee <holee@qti.qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Add new register definitions for QCE5.0 Hardware
Add new HAL (qce50.c) for interfacing with CE 5.0 hardware:
-- Implement the new interface to BAM (instead of data mover).
-- Add support for multiple Pipes.
-- Add support for use of HW key.
Change-Id: I69dc3993f607553d4752f9f9fb4fdfe1a09a6345
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>