Khushi
08f05cb80d
vse: Add vaildation checks for Algorithms
...
Bug 5058383
Change-Id: Ibeb1436938db0d87a5c4f99275aed6cec17dabe1
Signed-off-by: Khushi <khushi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3284860
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Vipin Kumar <vipink@nvidia.com >
2025-07-24 10:19:15 +00:00
Nagaraj P N
965bd044c6
vse/cryptodev: add memory map/unmap interface
...
- add support for zero copy SHA/GMAC operations
- add support to read zero copy nodes in DT
- support memory buf map/unmap ioctl interfaces
- unmap all memory buffers when FD corresponding
to device node is closed.
- support only one open call at a time for zero
copy nodes.
Bug 4999798
Change-Id: If110108a73b24ca9f523a8c67a47c02b922c3fd8
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292084
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
2025-07-24 10:19:15 +00:00
Khushi
69055dd639
vse:copy from/to user buffer only once in drivers
...
Directly copy user buffer to/from IOVA buffer instead
of coping user buffer to kernel buffer in
Cryptodev driver and then copy the kernel
buffer to IOVA buffer in VSE driver
Bug 5058383
JIRA ESSS-1496
Change-Id: I5bc7fc209687052811c330893a272f558e6a122c
Signed-off-by: Khushi <khushi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242512
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com >
2025-07-24 10:19:14 +00:00
Khushi
2a114f31d6
Bug Fix: Intermittent failure in NvVseTestAES
...
Fixed the issue caused by using common buffer in hwrng requests
which led to overwriting the buffer and mismatch during concurrent
AES operations
Bug Id: Bug 5015880
Change-Id: I52d6ae016fcc58cd9f2129d13d458d2ff9b3da59
Signed-off-by: Khushi <khushi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273901
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com >
Tested-by: Christoffer Arvidsson <carvidsson@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
2025-07-24 10:19:13 +00:00
Nagaraj P N
8e33949582
vse: update device nodes per hw instance/engine
...
Update cryptodev device names to indicate the hw instance
and engine name.
Update implementation to allow different DT instance ids and
driver device instance IDs.
Jira ESSS-1692
Change-Id: Ib1cf91202b41276ac8342f820e170884d139090c
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263604
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2025-07-24 10:19:13 +00:00
Nagaraj P N
9db0daab99
hv-vse: update err handling function
...
update err handling function to return -EINVAL in case of
unrecognized error code.
Bug 5015473
Change-Id: I0aa07721541bf59cb4e8cd8554e545196251e38f
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273654
(cherry picked from commit 3ac33a52485efc09054815b6824f43930de5c900)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3276070
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
2025-07-24 10:19:12 +00:00
Khushi
9aae5199d7
vse: allocate buffer during init 2
...
TSEC CMAC SV
RNG
HMAC SV
CMAC SV HW verify
GCM Enc/Dec HW verify
GMAC SV HW verify
JIRA ESSS-1495
Change-Id: I9cabee686d99d3c94d46e2a72d51151ae62e7630
Signed-off-by: Khushi <khushi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3227547
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
2025-07-24 10:19:11 +00:00
Nagaraj P N
13859c153d
vse: use new req format for tsec sign request
...
Jira ESSS-1569
Change-Id: I284c648bb9b171d65cfb2c45386df40ac7d3f123
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3206645
(cherry picked from commit 1077db9ad07b6db001b0cdfdd9bda86125926e9a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3224563
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Tested-by: Rounak Agarwal <rounaka@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
2025-07-24 10:19:10 +00:00
Rounak Agarwal
84c1be5f3c
vse: Changes for TSEC batch request
...
JIRA ESSS-1560
Change-Id: Ie76afb6eed36e12d4ff42d793afc3c4ccc73b010
Signed-off-by: Rounak Agarwal <rounaka@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3206546
(cherry picked from commit 89d290edcbe70ad734ba23deb5021d16ae116b05)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3224562
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2025-07-24 10:19:10 +00:00
Nagaraj P N
74e8b62f72
vse: sha: implement new sha_update API
...
- Initialize lock per device node and take lock at the
start of processing of each ioctl command. This is needed
because there is only one set of IOVA buffers allocated
during init per device node. Without lock it leads to
race conditions when more than one app uses the same
device node.
- Release tfm after each API call for both sha and hmac-sha
- Validate rng buffer size provided by user
- Support buf size up to HW supported limit for GCM-Dec req
if tag verify is supported by HW.
Jira ESSS-1517
Bug 4881474
Change-Id: I338558656ac00b91750e74990bb47c5a35f31e08
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233377
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
2025-07-24 10:19:10 +00:00
Khushi
e57f71b4d0
vse : GCSE1/2 AES Linux
...
Added engine id in linux vse driver for GCSE1/2 AES0/1
Jira ESSS-1413
Change-Id: Icb38941c2c17e04fe0979070c80abaac9d018e74
Signed-off-by: Rounak Agarwal <rounaka@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168936
Tested-by: Khushi . <khushi@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
2025-07-24 10:19:10 +00:00
Khushi
c68a2ed191
vse: GCSE1/2 SHA Linux
...
JIRA ESSS-1400
Change-Id: Ie18857f05275cf8063d735526079d815b62c76fb
Signed-off-by: Khushi <khushi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221278
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2025-07-24 10:19:09 +00:00
Nagaraj P N
71ccb24bdc
vse: hmac-sha: return error for hash mismatch
...
Jira ESSS-1632
Change-Id: Ib879b67f360750ca7a3961aee6740d8dcb411513
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3231084
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2025-07-24 10:19:08 +00:00
Jon Hunter
f01227d4ea
drivers: Drop inline from driver remove wrapper
...
The driver remove function is a function pointer and therefore, it does
not make sense to define the function as an 'inline'. Update the
coccinelle script and drivers to remove the inline statement.
Bug 4749580
Change-Id: Ia03691b75c4edffe609f27468b911a92a5ddbd68
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233980
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2025-07-24 10:19:08 +00:00
Nagaraj P N
bc6885d338
vse: allocate dma buffers during driver init
...
Use dma_alloc_coherent to allocate DMA buffers during probe
instead of on per request basis for SHA/AES requests.
Bug 4637856
Change-Id: I1321b224c61d2f0cda559525b7806504943a81d7
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
(cherry picked from commit ef746fdaec135d114ce04cb7418230c86c8746c1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3213894
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Tested-by: Khushi . <khushi@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
2025-07-24 10:19:07 +00:00
Nagaraj P N
ff7c18fc0b
vse: add mempool support for GCM decryption
...
Jira ESSS-359
Change-Id: I1e49b331ec5be2bde208ae0fcac40d7af2fd082a
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3132632
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3191163
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Vipin Kumar <vipink@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2024-08-16 10:52:17 -07:00
Nagaraj P N
97434deea4
vse: add support for SM4 GMAC
...
Jira ESSS-1417
Change-Id: Ica5cdb08f04e75fba50badb9bd3342f2cd2004b9
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3172038
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-08-14 17:48:41 -07:00
Prashant Parihar
afb2145beb
nvvse: Enable SM4 CMAC support
...
Jira ESSS-1409
Change-Id: Ib13b2901cbec8e4b9670fbe43960514e614a60c0
Signed-off-by: Prashant Parihar <pparihar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3170104
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-08-14 17:48:31 -07:00
Jon Hunter
951b2423a8
drivers: Fix platform_driver remove for Linux v6.11
...
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update all the impacted drivers
as necessary to fix this.
Bug 4749580
Change-Id: I3bb5c549777f7ccad0e3f870373fdd25726ad7ed
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3182878
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
Tested-by: Brad Griffis <bgriffis@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2024-08-11 17:20:34 -07:00
Prashant Parihar
a21f30c983
nvvse: Add SM4 implementation
...
- Add VSE driver and crypto driver changes for SM4
CBC/CTR functionality
- Utilize existing function for AES CBC/CTR for SM4
Jira ESSS-1409
Change-Id: Ifaab10dd81c33b047554c28a37c399a3cb0d3419
Signed-off-by: Prashant Parihar <pparihar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3143320
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
2024-07-28 12:47:58 -07:00
Nagaraj P N
0b77774c92
vse: Add support for HMAC SHA Sign/Verify
...
Add support for both old and new chip
Jira ESSS-1336
Jira ESSS-1371
Change-Id: Ie4010bc7f3d8f3b71e3f49197c21911cd11a6dea
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3144907
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
2024-07-17 06:01:20 -07:00
Pranjal Singh Mandloi
f95a7d53c4
NVVSE: GCM/GMAC Linux changes
...
Jira ESSS-1378
Change-Id: Ie47a432c73cc99ae209fb4b61dfc0acbe399aaff
Signed-off-by: Pranjal Singh Mandloi<pmandloi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3163800
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-07-13 21:37:56 -07:00
Nagaraj P N
e9f3b6f0aa
vse: rng: allocate buffer in generate callback
...
Allocation within init function cannot be performed as the
context structure does not have the node_id info populated
yet by cryptodev which causes the DMA buffer to be allocated
for the wrong engine/SID.
ESSS-1402
Change-Id: I58435cbe381812dfa314d86e6e46ee1e7ff77d0d
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3167473
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-07-08 15:58:27 -07:00
lchiu
d2a5a35cfe
vse: support 64 bit keyslot for tsec
...
Bug 4620571
Change-Id: Iea2f42167245308348a0a50e9fde14036c3f0736
Signed-off-by: lchiu <lchiu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130036
(cherry picked from commit ba8f79f3e14b755ebb99464de2ff8d1c2d173e24)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3140529
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-07-06 00:07:00 -07:00
Khushi
b7a1a14256
NVVSE SM3 Implementation
...
Implements SM3 in NVVSE crypto driver linux
ESSS-1346
Change-Id: I9f8b9bc18d7c30d8dac04e8f19941ef061aa8478
Signed-off-by: Khushi <khushi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3131643
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2024-07-04 09:23:09 -07:00
Ashutosh Patel
2cda57413f
NVVSE: Enable Linux IVC_DB Bringup
...
Changes:
- Enabled Linux IVC_DB changes
- Added Host1x compatible string
Jira ESSS-1389
Change-Id: I3032db25b53e230693813fb3bb096d59bafec7e9
Signed-off-by: Pranjal Singh Mandloi<pmandloi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3154005
Reviewed-by: svcacv <svcacv@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Ashutosh Patel <ashutoshp@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
2024-06-24 11:09:42 -07:00
Khushi
df2a7fda9c
CMAC for Linux
...
CMAC implementation for 64 bit addressing
Remove unsupported legacy cmac function
Implemented CMAC for new chip
ESSS-1375
Change-Id: I43bc4a03b03a5914ab1e4656bef90ad179744f1a
Signed-off-by: Khushi <khushi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3146556
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Tested-by: Pranjal Singh Mandloi <pmandloi@nvidia.com >
2024-06-22 07:43:34 -07:00
lchiu
d095031e8d
vse: Update AES IVC enc/dec msg
...
- Update addr to a single 64 bits variable
- Separate buf size to a new variable
Bug 4229291
Change-Id: If9b865c4a3a27219e5202dc367fbc553647353d8
Signed-off-by: lchiu <lchiu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3140142
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-05-21 16:34:33 -07:00
lchiu
81ba6d69ce
vse: Update interface for SHA
...
Bug 4229291
Change-Id: Ifefddf4a4ee0f26c8d1e558572d2e14abf99a825
Signed-off-by: lchiu <lchiu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3139037
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-05-20 08:04:56 -07:00
Pranjal Singh Mandloi
4d402f01c0
NVVSE: Change Hamming distance to 4
...
ESSS-1235
Change-Id: I6e1ab4b1db71f67f90399a65bfba65555b7e3811
Signed-off-by: Pranjal Singh Mandloi <pmandloi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3048850
(cherry picked from commit ee4dddcd2785bf6664b18c8085e4fb918f0e7d24)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3087029
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
2024-05-07 02:16:47 -07:00
Jon Hunter
ab65399274
drivers: Fix missing headers for Linux v6.8
...
For Linux v6.8, commit ef175b29a242 ("of: Stop circularly including
of_device.h and of_platform.h") updated the OF headers included by these
header files. This breaks the build for various drivers and so fix this
by including the headers that are actually needed for each driver.
Bug 4448428
Change-Id: Ia40ab13f865d5631c96855ecc49145848f99c996
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032442
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
Tested-by: Laxman Dewangan <ldewangan@nvidia.com >
2024-01-25 09:11:21 -08:00
Manish Bhardwaj
9b29abef53
vse: protect concurrent access of ivc queue
...
Bug 4421197
Change-Id: I9514deac25a6ad725ca12a57b2a304f64c5f0d3a
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3050469
Reviewed-by: Zuyi Hu <zuyih@nvidia.com >
Reviewed-by: Zuyu Liao <zuyul@nvidia.com >
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com >
Tested-by: Zuyi Hu <zuyih@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-01-20 19:26:24 -08:00
Advaya Andhare
df68c65bab
vse: crypto: Remove AES-ECB support
...
Jira ESSS-1185
Change-Id: I9f0c9d8bb6e2816da2a826d3678dbbfc8bec2b2c
Signed-off-by: Advaya Andhare <aandhare@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037693
(cherry picked from commit 035056a3e785251d03590f07fa30fae077a99cf0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3047736
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-by: Vipin Kumar <vipink@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-01-10 05:45:02 -08:00
Manish Bhardwaj
84443ed555
crypto: increase buffer support for SHA operation
...
Using this patches we are making below changes:-
1. increase buffer support for SHA operation from 1MB to 2MB
2. get the IVC DB during init call.
3. remove scatter gather implementation and allocate memory
in single call.
Bug 4141706
Change-Id: I6fc7f9bc564da31e458cf18230dedd3f21a284fa
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2984692
Reviewed-by: Advaya Andhare <aandhare@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3008976
2023-11-06 11:58:10 -08:00
Manish Bhardwaj
25bd4163f9
crypto: increase buffer support for SHA operation
...
Using this patches we are making below changes:-
1. increase buffer support for SHA operation from 1MB to 2MB
2. get the IVC DB during init call.
Bug 4141706
Change-Id: I8101430117569049f3420db58ed06e0158cc2dcc
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2984637
Reviewed-by: Advaya Andhare <aandhare@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-10-03 19:01:22 -07:00
Manish Bhardwaj
f6227e9c57
crypto: check buffer size before allocing DMA memory
...
Passing zero size to dma_alloc API is causing below crash.
Added check on requested size before sending request to
dma layer.
[ 4178.581558] sg_alloc_append_table_from_pages+0x28c/0x480
[ 4178.581790] sg_alloc_table_from_pages_segment+0x40/0xb0
[ 4178.582009] __iommu_dma_alloc_noncontiguous.isra.0+0x244/0x3a0
[ 4178.582258] iommu_dma_alloc+0x280/0x3b0
[ 4178.582424] dma_alloc_attrs+0xf8/0x110
[ 4178.582588] tegra_hv_vse_get_db+0x76c/0x70e0 [tegra_hv_vse_safety]
[ 4178.582850] hash_sendmsg+0xa8/0x290
[ 4178.583001] sock_sendmsg+0x68/0x90
[ 4178.583146] __sys_sendto+0xf0/0x170
[ 4178.583298] __arm64_sys_sendto+0x38/0x60
[ 4178.583466] invoke_syscall+0x5c/0x150
[ 4178.583628] el0_svc_common.constprop.0+0x100/0x120
[ 4178.583829] do_el0_svc+0x3c/0xb0
[ 4178.583966] el0_svc+0x20/0x70
[ 4178.584098] el0t_64_sync_handler+0xc0/0xd0
[ 4178.584270] el0t_64_sync+0x1a4/0x1a8
Bug 4259208
Change-Id: I134bc84e7b5cbda7db4ed7dbcad4e1c6955429d8
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2983402
Reviewed-by: Ashutosh Patel <ashutoshp@nvidia.com >
Reviewed-by: Vipin Kumar <vipink@nvidia.com >
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-09-22 20:08:52 -07:00
Advaya Andhare
883ddf60ca
NVVSE: protect shared resources through mutex
...
Concurrent access of shared variable causing the issue intermittently.
Conditions to wait/handle shared variable updated.
Added mutex locks to protect shared resources.
bug 4155882
Bug 4159212
jira ESSS-707
Change-Id: I3b50e39abf2dfec2ef33b813c7227fcd0634222a
Signed-off-by: Advaya Andhare <aandhare@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2928908
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: Vipin Kumar <vipink@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-07-12 04:42:12 -07:00
Advaya Andhare
967fa5d4b4
NVVSE: Implement dummy-message functionality
...
- Introduced interrupt state for dummy message functionality
- Added functionality for dummy-message
Change-Id: I3bac031159ea9398b4515ca354fdbc2c7d4274c6
Signed-off-by: Advaya Andhare <aandhare@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2913263
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: Vipin Kumar <vipink@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2913361
2023-07-12 04:42:06 -07:00
Laxman Dewangan
13556fa7d2
crypto: Use SPDX GPL 2.0 license format
...
Use SPDX license format for license and copyright
information. Update year also.
Bug 4078035
Change-Id: I8a5b0f60c702b7fb9a30b5b50ca4058165d38cc9
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2890632
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-21 11:40:45 -07:00
Rounak Agarwal
f5e605c3da
Use new numbers for VSE commands
...
In the change I527644b9f9b8b8ff7f5d1382e3fee0627b9deeb8, VSE commands
have been renumbered. This commit copies the new numbers to VSE driver.
JIRA ESSS-503
Change-Id: I9d6318ccfef6fc8d3a022dbf36200d1a1bb5ec39
Signed-off-by: Rounak Agarwal <rounaka@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2872675
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-10 20:47:13 -07:00
Manish Bhardwaj
ac315cf5ad
nvvse: Enable Multipart/Singlepart UserNonce
...
crypto: hvvse: UserNonce enable for CBC/CTR
- Using SE server for CBC mode
- Updating counter for CTR mode
- Copying IV to userspace from kernelspace only for non userNonce
Jira ESSS-467
crypto: Support Multipart CBC/CTR
- Updated update_counter function
- Added support for mulitpart CBC/CTR
Jira ESSS-525
Signed-off-by: Advaya Andhare <aandhare@nvidia.com >
Change-Id: I3a85f510d28a6bd26b4b6b5b216c2659ec4052c6
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2874482
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-05 05:59:35 -07:00
Manish Bhardwaj
d02c050207
crypto: use 4 byte keyhandle for tsec operation
...
TSEC operation is using 4 byte keyhandle only, whereas
other operations are using 16 byte keyhandle.
Bug 4031715
Bug 4030215
Change-Id: I19e2ca6afaef903824b6a0e99f94e6e68e533af7
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2873636
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-21 09:48:31 -07:00
Manish Bhardwaj
a14b439800
nvidia: fix ioctl call and tsec operation
...
Using this patch we are fixing below 2 issues:-
1. Fixes below issue of invalid ioctl call.
tnvvse_crypto_dev_ioctl(): invalid ioctl code(-1073440754[0xc004980e])
2. Fixes below crash issue once we introduced
[ 50.137568] Unable to handle kernel paging request at virtual address
ffffffffffffff80
l c00498[ 50.172247] Mem abort info:
[ 50.172248] printk: console [ttyS2]: printing thread stopped
[ 50.172773] ESR = 0x96000004
[ 50.178757] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000081c8f000
[ 50.202663] Hardware name: p3710-0010 (DT)
[ 50.203353] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 50.204464] pc : tegra_ivc_notified+0x1c/0x160
[ 50.205194] lr : tegra_ivc_notified+0x1c/0x160
[ 50.205890] sp : ffff8000136733c0
[ 50.218023] Call trace:
[ 50.218425] tegra_ivc_notified+0x1c/0x160
[ 50.219088] tegra_hv_ivc_channel_notified+0x24/0x1f0 [tegra_hv]
[ 50.220077] tegra_hv_vse_get_db+0x1f80/0x6680 [tegra_hv_vse_safety]
[ 50.221129] tegra_hv_vse_safety_tsec_get_keyload_status+0xf4/0x37c
[tegra_hv_vse_safety]
[ 50.222478] tnvvse_crypto_dev_ioctl+0x23bc/0x277c [tegra_nvvse_cryptodev]
Bug 4030215
Bug 4031715
Change-Id: I25be3ab0708a5238daf342dcd20e8a948ee39508
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2872785
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Kasinadha Dendukuri <kdendukuri@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Reviewed-by: Ashutosh Patel <ashutoshp@nvidia.com >
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-21 02:35:10 -07:00
Manish Bhardwaj
a8830def61
nvidia-oot: Increase keyslot size to 16 bytes
...
syncing changes b/w nvidia and nvidia-oot repo
Bug 3697677
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Change-Id: I0faa4d3107de5d9430ca91b407903990254e3b49
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2872402
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-17 10:18:08 -07:00
Manish Bhardwaj
c4ede4ec86
nvidia-oot: fix sparse error in vse driver.
...
Using this patch we are fixing below sparse
errors :-
1. drivers/crypto/tegra-hv-vse-safety.c:158:15:
warning: symbol 'gpcdma_dev' was not declared.
Should it be static?
Bug 3954363
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Change-Id: I00da50a74392fc43e6728cf57abed2545c509e4e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2863098
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-01 10:27:17 -08:00
Advaya Andhare
9fdc09d25a
nvvse: cryptodev: user nonce, TSEC alg, ivcDB
...
Updating Kernel 5.15 with recent linux driver changes.
Jira ESSS-504
bug 3979224
Mentioned below are the details of merging changes -
NVVSE: Added support for TSEC algorithm.
- Add support for TSEC CMAC Sign/Verify commands
- Add support for command to check TSEC Keyload status
- Don't use skip_key parameter as keyslot id is always needed by VSE driver
Jira ESSS-267
nvvse: cryptodev: Add support for user nonce
Changes:
- Add support for userNonce and zero copy flag for
TLS and zero copy features
- Updaeted encrypt/decrypt function call to use
user nonce.
Jira ESSS-415
nvvse: Updated IVCCFG offset, IVC DB parameters
- Reading max buffer size and gcm dec buffer size from DT
- Update elements of IVC DB.
Jira ESSS-417
Jira ESSS-484
Jira ESSS-468
bug 3974121
Signed-off-by: Advaya Andhare <aandhare@nvidia.com >
Change-Id: Ic7c4580dc4f443db9f7e4fabfb7ec49de2973ed3
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2862329
Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com >
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: Vipin Kumar <vipink@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-02-25 16:07:35 -08:00
Manish Bhardwaj
eb1d8b3b58
vse: update host1x driver compatibile string
...
Using this patch we are updating the host1x driver's
compatibility string since this has been changed for
upstream host1x driver
JIRA ESLC-7104
Change-Id: If1502c7639a0c4037cbcab6454a262e3990a74d1
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2824204
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-12-13 06:27:09 -08:00
Manish Bhardwaj
ac16d3a12b
nvidia-oot: sync vse driver with nvidia repo
...
Using this patch we are syncing changes of
vse driver from nvidia repo to nvidia-oot repo
JIRA ESLC-7104
Change-Id: I5d45f4b645ad9c002c8f3b178fc20eb6f7324cd3
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2824196
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-12-13 06:27:05 -08:00
Manish Bhardwaj
ddd988fbf6
nvidia-oot: add support for hv-vse driver
...
Using this patch we are adding support for
hv-vse driver in oot kernel.
List of commit ids still which we are using file from
nvidia repo.
4eb5988cde vse-safety: align gpcdma buffer to 64 bytes
4852794a4a crypto: fix array out-of-bound access defect
56e33f53c8 crypto: extend features in multi-IVC development
0b7c238968 (multi_ivc) crypto: check crypto ctx before handling
7e35a5739b crypto: check crypto request before handling
446c88152f Revert "crypto: vse: add multi-ivc support-10"
c33753cbd6 crypto: disable Power management for GPCDMA cfg
JIRA ESLC-6885
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Change-Id: I77c5abcff045e444ff320fbf2709b07f0ab383aa
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2794878
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-10-28 03:00:46 -07:00