Akhil R
f725f36d1e
crypto: tegra: Use separate buffer for setkey
...
The buffer which sends the commands to host1x was shared for all tasks
in the engine. This causes a problem with the setkey() function as it
gets called asynchronous to the crypto engine queue. Modifying the same
cmdbuf in setkey() will corrupt the ongoing host1x task and in turn
break the encryption/decryption operation. Hence use a separate cmdbuf
for setkey().
Bug 4883011
Signed-off-by: Akhil R <akhilrajeev@nvidia.com >
Change-Id: Ia6a5376e2c8dfc98e11414666ebf9ade41f10fee
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328437
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
2025-07-24 10:19:18 +00:00
Akhil R
a628affd69
Revert "crypto: tegra: Use separate buffer for each host1x command"
...
This reverts commit f75887b0c0e9340c3dd92b19dab99ed92f36bcb0.
Reason: To align with the upstream changes pushed as part of
https://lore.kernel.org/lkml/20250224091610.49683-1-akhilrajeev@nvidia.com/
Bug 4883011
Change-Id: If79728d00d3e8e3c8ad3e26a8170a7c1fa95414c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3347660
Reviewed-by: Akhil R <akhilrajeev@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: Akhil R <akhilrajeev@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2025-07-24 10:19:18 +00:00
Christophe JAILLET
6b5633fb93
crypto: tegra - Remove an incorrect iommu_fwspec_free() call in tegra_se_remove()
...
The only iommu function call in this driver is a
tegra_dev_iommu_get_stream_id() which does not allocate anything and does
not take any reference.
So there is no point in calling iommu_fwspec_free() in the remove function.
Remove this incorrect function call.
Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Tested-by: Akhil R <akhilrajeev@nvidia.com >
Acked-by: Akhil R <akhilrajeev@nvidia.com >
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au >
JIRA LINQPJ14-47
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Change-Id: I1d511caa5cff07b936d1f347c2768c43a6f1c1e3
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328426
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Akhil R <akhilrajeev@nvidia.com >
2025-07-24 10:19:17 +00:00
Akhil R
a49c68b4e2
crypto: tegra: Use separate buffer for each host1x command
...
Allocate separate buffer for each host1x command. The single buffer used
for host1x commands can get corrupted when independent crypto operations
overlap.
Bug 4883011
Signed-off-by: Akhil R <akhilrajeev@nvidia.com >
Change-Id: I43029364c8e65e5014a5b7068cb45225c039aaf8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3251597
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2025-07-24 10:19:10 +00:00
Akhil R
a29b51cd58
crypto: tegra: Add Tegra SE driver for T264
...
Add Tegra Security Engine driver which supports AES-ECB/CBC/CTR/XTS
SHA1/SHA2/SHA3 AES-GCM, AES CCM, SM4, SM3 algorithms.
Signed-off-by: Akhil R <akhilrajeev@nvidia.com >
Change-Id: I86be2fcc485c31988496395183cb44a386907668
2025-07-24 10:19:09 +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
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
Akhil R
abb0a027b2
crypto: tegra: Align with upstream
...
Fix the known bugs in the SE driver and align the driver with upstream
add Makefile flags so it will build SE driver for v6.1 or less
Bug 4488964
Signed-off-by: Akhil R <akhilrajeev@nvidia.com >
Change-Id: I6efa471b6efcd161d36167a0784185f3e0266d7c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3124250
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2024-07-25 06:13:31 -07:00
Akhil R
2659fcd46a
crypto: tegra: Add updated Tegra SE driver
...
Add the updated Tegra SE driver with the below improvements.
- Remove dependency with nvhost apis and use upstream Host1x APIs.
- Implement software fallbacks for keys/plaintexts unsupported by
hardware.
- Support only T234 and later. Prior chips will use tegra-se-nvhost
driver.
Bug 4221414
Bug 3579794
Signed-off-by: Akhil R <akhilrajeev@nvidia.com >
Change-Id: I398a5b7cc3f752b44d01d6d1c81f813f862e4cd9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2977810
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-10-03 18:59:24 -07:00