Nagaraj P N
a45f684085
vse: allocate priv struct during init
...
Also, update gmac crypto ctx free logic
Bug 4881474
Change-Id: I5e2f10814b3a1f41ff098f2c602ee2de431f6cf5
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3287699
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Reviewed-by: Ambika Prasad <ambikap@nvidia.com >
2025-07-24 10:19:17 +00:00
Khushi
62431fc5f3
VSE/Cryptodev: prefix driver name for driver print
...
ESSS-1756
Signed-off-by: Khushi <khushi@nvidia.com >
Change-Id: I5f65e77cda381189f59cabad04d340e795f01021
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315502
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2025-07-24 10:19:16 +00:00
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
f552a45569
cryptodev: update buf addr check for SHA requests
...
Input buffer VA needs to be checked only for
non-zero copy IVC queues.
Bug 4999798
Change-Id: Ic8bcc44abb65f8e2d614f6734870e81a8d5ec03c
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306711
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@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
f148b0cc15
Bug Fix: Memory leak for HMAC_SHA_SIGN_VERIFY
...
Free hmac_sha_sv_ctl before releasing the lock
Bug 4881474
Change-Id: I8272ccb841e2cc156650bbfcecbddbdbc54c7f4a
Signed-off-by: Khushi <khushi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292556
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
2025-07-24 10:19:14 +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
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
yong zhang
7af5789560
nvvse: Extend DRNG data length range
...
- From 512 to 1024
JIRA MAKO-8039
Bug 4839934
Change-Id: Ie949b2abe549174a3c2872aa2daecc9d72de9e8b
Signed-off-by: yong zhang <yongz@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197637
Reviewed-by: Leo Chiu <lchiu@nvidia.com >
Reviewed-by: Ian Reid <ireid@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2025-07-24 10:19:07 +00:00
Yash Bhatt
4a1b0df1df
crypto: Fix stack frame size exceeded error in fuzzing build
...
Enabling KASAN is causing stack frame size exceeded error in crypto
driver, Fix this by allocating struct get_ivc_db dynamically while
enabling KASAN for fuzzing build.
Bug 4615347
Change-Id: Ie1959b3c79c8ca2f31f79ea76aeb55490bd9917b
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196965
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2025-07-24 10:19:06 +00: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
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
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
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
ef1bc16ac8
nvidia: fix memory leak issue in vse driver
...
fixing memory leak driver by using krealloc API
to reutilize the previously allocated memory
Bug 4334915
Change-Id: I4ad88f32152da7527033679b1eed414574cad4e5
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010174
Reviewed-by: Advaya Andhare <aandhare@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-11-06 11:58:25 -08:00
Manish Bhardwaj
d6745fa37c
nvidia: handle zero size sha buffer gracefully
...
Using this patch we are fixing below issue on debug build
where sg_init_one API is getting failed when zero sha buffer
size is passed leading to below crash.
[ 144.941668] kernel BUG at include/linux/scatterlist.h:163!
[ 144.941673] Internal error: Oops - BUG: 00000000f2000800 [#1 ] PREEMPT_RT SMP
[ 144.941766] CPU: 7 PID: 6178 Comm: nvvse_test Tainted: G W O 6.1.9-rt7-debug-rt-tegra #1
[ 144.941769] Hardware name: p3710-0010 (DT)
[ 144.941770] pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 144.941773] pc : sg_init_one+0x3c/0xb0
[ 144.941782] lr : 0xffff800001515e30
[ 144.941788] sp : ffff800022723cd0
[ 144.941788] x29: ffff800022723cd0 x28: 0000aaaabfca6300 x27: ffff0000af767850
[ 144.941791] x26: ffff0000af766900 x25: ffff800001518460 x24: ffff0000afd8f700
[ 144.941792] x23: ffff0000af767a00 x22: ffff0000afe81d80 x21: 0000000000000010
[ 144.941794] x20: 0001000000000010 x19: ffff800022723d88 x18: 0000000000000000
[ 144.941796] x17: 0000000000000000 x16: ffff800001515410 x15: 0000aaaabfca6300
[ 144.941798] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[ 144.941800] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
[ 144.941802] x8 : ffff0000afd8f780 x7 : 0000000000000000 x6 : 0000000000000010
[ 144.941804] x5 : 0000000000000010 x4 : ffff0000afe81d80 x3 : 0000000000000000
[ 144.941806] x2 : 0000000000000000 x1 : 00007fffffffffff x0 : 0001000000000000
[ 144.941808] Call trace:
[ 144.941810] sg_init_one+0x3c/0xb0
[ 144.941813] 0xffff800001515e30
[ 144.941815] __arm64_sys_ioctl+0xa8/0x100
[ 144.941820] invoke_syscall+0x40/0x120
[ 144.941825] el0_svc_common.constprop.0+0x40/0xf0
[ 144.941828] do_el0_svc+0x28/0xd0
[ 144.941830] el0_svc+0x28/0x90
[ 144.941835] el0t_64_sync_handler+0xc0/0xd0
[ 144.941837] el0t_64_sync+0x164/0x168
[ 144.941841] Code: b240bbe1 eb01029f f9000e7f 54000049 (d4210000)
Bug 4355159
Change-Id: I1855c418ee41725f93b3c8d27bb0becbfcbfbcad
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010170
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Advaya Andhare <aandhare@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
2023-11-06 11:58:20 -08:00
Manish Bhardwaj
558dc30461
nvvse: handle failure case gracefully
...
Observing the crash in failure path when already
freed memory is being used. handling the failure
scenario gracefully with this patch.
Bug 4355159
Change-Id: Ie39dab2572067eab0c139323ed86bae9490a8878
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3008896
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Advaya Andhare <aandhare@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
2023-11-06 11:58:15 -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
1b6b4f8746
crypto: Fix compilation warning
...
Bug 4213877
Change-Id: Ic7fd0496473c5e3225e6235a18176faa8fe3e1be
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2982158
Reviewed-by: Ashutosh Patel <ashutoshp@nvidia.com >
Reviewed-by: Vipin Kumar <vipink@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-09-21 21:32:13 -07:00
Advaya Andhare
7d1a687636
nvvse: Allowing multiple access to dev node
...
- This CL partially reverts the changes done in CL - 2891721
- Current implementation checks if multiple process/threads/apps
try to access same dev node when it is already open by another
process/thread/app, and throws an error if condition is true causing
new process/threads/apps to fail as in bug mentioned below
- This change allows multiple process/threads/apps to access the same
dev node.
bug 4126726
jira ESSS-759
Change-Id: Ibe18449014e69148ae2feebd854b6c5d278f5bc4
Signed-off-by: Advaya Andhare <aandhare@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2946094
(cherry picked from commit 615a1aba49e2662d767a23e47fed329627f6f91e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2956815
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com >
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-by: Vipin Kumar <vipink@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-08-17 20:29:44 -07:00
Neelansh Mittal
34288b623d
crypto: Single shot processing of input buffers
...
Support single shot processing for AES GMAC/CMAC/ENC/DEC
and SHA operations.
Bug 4155882
Bug 4086302
Change-Id: Ib2ef39b2fbb7493285947b118b9d1fcdeaefe5b6
Signed-off-by: Neelansh Mittal <neelanshm@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931625
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-by: Vipin Kumar <vipink@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-07-07 06:59:25 -07:00
Manish Bhardwaj
5e3551960b
crypto: fix cert error
...
Using this patch we are fixing below cert error:-
1. cert_mem30_c_violation: Dereferencing freed pointer ctx.
CID 660103
Bug 3512545
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Change-Id: I4a37aa7743d07669805254ec2fc088a3835f5f3e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2898370
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-04 11:50:45 -07:00
Manish Bhardwaj
afd475c259
crypto: perform only single SHA op at one time
...
perform single SHA operatin at one time. Multiple
SHA operations at single dev node lead to SHA failure
issues.
Bug 4075005
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Change-Id: Ifc610b278e6a74c82813f564c98c0ee16783b69e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891724
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Advaya Andhare <aandhare@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-26 09:42:31 -07:00
Manish Bhardwaj
e7075688b1
crypto: open nvvse node only once during operation
...
open nvvse node only once during vse operation,
if another thread try to open then return error.
Bug 4075005
Change-Id: Iea88799bf761442cecc8e6336e9743e0fe7cd6e2
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891721
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Advaya Andhare <aandhare@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-26 09:42:26 -07:00
Manish Bhardwaj
f9a0264f89
crypto: fix memory leak issue
...
Using this patch we are fixing memory leak
issue
Bug 4064812
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Change-Id: Ifd2e74e5d1b9b6cbd91a6ec65e45626066c9a1f5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2888604
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-20 06:47:15 -07:00
Manish Bhardwaj
fe2085dcef
crypto: fix compilation warning
...
local variables size is more then recommended values leading
to compilation warning. So usign this patch we are fixing
below compilation warnigs:-
nvidia-oot/drivers/crypto/tegra-nvvse-cryptodev.c:
In function ‘tnvvse_crypto_dev_ioctl’:
nvidia-oot/drivers/crypto/tegra-nvvse-cryptodev.c:2103:1:
warning: the frame size of 2224 bytes is larger than 2048 bytes
[-Wframe-larger-than=]
Bug 4064812
Change-Id: Ie5f0489c9733451f9a132e146790a18d3dd4d6f9
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2887287
Reviewed-by: Ashutosh Patel <ashutoshp@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-14 08:21:59 -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
ba066d3e58
crypto: fix memory leak in crypto driver
...
when SHA operation gets started using SHA_INIT and
it did not gets finished using SHA_FINAL leads to memory
leak. So Using this patch we are fixing the memory leak
in crypto driver.
Bug 4039712
Change-Id: I3ef9f93afc7677f3a7317c85d82cbab44d1fed82
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2878402
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com >
Reviewed-by: Sandeep Trasi <strasi@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-31 04:18:32 -07:00
Jon Hunter
cadbbe3f1f
nvvse: cryptodev: Fix build for Linux v6.3
...
Commit 255e48eb1768 ("crypto: api - Use data directly in completion
function") updates the typedef crypto_completion_t such that a pointer
to the data is directly passed to the completion function instead of a
structure of type crypto_async_request. This breaks building the Tegra
NVVSE Cryptodev driver for Linux v6.3 and so update the driver
accordingly to fix the build.
Bug 4014315
Change-Id: I6e9ed50f5c226548efa5f52d094243f466ad399d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2867127
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-18 16:18:49 -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
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
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
Manish Bhardwaj
27f17e56d1
crypto: sync crypto driver from kernel/nvidia
...
Using this patch we are pulling in the missing changes
from kernel/nvidia directory.
JIRA ESLC-6885
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
Change-Id: I9376e14971be0f4d40f759858fcc9db90a7b9d72
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2785534
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-10-06 17:22:00 -07:00
Akhil R
41a9763998
crypto: tegra: Add NVVSE Cryptodev
...
Add NVVSE cryptodev for Security Engine
Bug 3583641
Signed-off-by: Akhil R <akhilrajeev@nvidia.com >
Change-Id: Iec75fe4174d5fabeb4d22813042c3bca1171d161
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2768833
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-09-24 13:16:56 -07:00