<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nvidia-tegra-modules.git/drivers/crypto, branch gpu-paging</title>
<subtitle>NVIDIA's kernel modules to support tegra chips (used in Jetson boards)</subtitle>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/'/>
<entry>
<title>crypto: tegra: return error upon wait timeout</title>
<updated>2021-09-24T13:24:54+00:00</updated>
<author>
<name>Harinarayan Bhatta</name>
<email>hbhatta@nvidia.com</email>
</author>
<published>2021-09-17T02:04:02+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=8eaae7f5c8647821846c217b5c8a8c6c0a10d1ee'/>
<id>8eaae7f5c8647821846c217b5c8a8c6c0a10d1ee</id>
<content type='text'>
Return an error value from process_crypt_req if
wait_for_completion_timeout returns 0 in case of a timeout waiting
for crypto operation to complete.

Bug 200771660

Change-Id: Ie7597a053274cace6b930895e3f969622a813d76
Signed-off-by: Harinarayan Bhatta &lt;hbhatta@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/#/c/linux-nvidia/+/2596050
(cherry picked from commit f62687d53e0437b6138c02a4463acee21361cd26)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2599867
Reviewed-by: svcacv &lt;svcacv@nvidia.com&gt;
Reviewed-by: Phoenix Jung &lt;pjung@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Return an error value from process_crypt_req if
wait_for_completion_timeout returns 0 in case of a timeout waiting
for crypto operation to complete.

Bug 200771660

Change-Id: Ie7597a053274cace6b930895e3f969622a813d76
Signed-off-by: Harinarayan Bhatta &lt;hbhatta@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/#/c/linux-nvidia/+/2596050
(cherry picked from commit f62687d53e0437b6138c02a4463acee21361cd26)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2599867
Reviewed-by: svcacv &lt;svcacv@nvidia.com&gt;
Reviewed-by: Phoenix Jung &lt;pjung@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: vse: fix rng generate return value</title>
<updated>2021-08-19T20:55:31+00:00</updated>
<author>
<name>Harinarayan Bhatta</name>
<email>hbhatta@nvidia.com</email>
</author>
<published>2021-08-11T11:21:48+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=73218645cb2c7a037e9e3f9ae4c0feccd67389b6'/>
<id>73218645cb2c7a037e9e3f9ae4c0feccd67389b6</id>
<content type='text'>
Fix the return value of rng generate() function according to the Linux
crypto framework's header file include/crypto/rng.h.

Also, return -EAGAIN error code if SE server returns timeout (-13) when
trying to acquire RNG1 mutex.

Bug 200753491

Change-Id: I29d13f457b15ee8c8d02d01b5c1216b694d70680
Signed-off-by: Harinarayan Bhatta &lt;hbhatta@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2574509
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the return value of rng generate() function according to the Linux
crypto framework's header file include/crypto/rng.h.

Also, return -EAGAIN error code if SE server returns timeout (-13) when
trying to acquire RNG1 mutex.

Bug 200753491

Change-Id: I29d13f457b15ee8c8d02d01b5c1216b694d70680
Signed-off-by: Harinarayan Bhatta &lt;hbhatta@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2574509
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tegra-hv-vse: Check ptr against NULL,before access.</title>
<updated>2021-08-13T20:11:08+00:00</updated>
<author>
<name>Achal Verma</name>
<email>achalv@nvidia.com</email>
</author>
<published>2021-05-11T09:44:57+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=35fe1101fc0bf0e423936d1adb40d9bb28eeee74'/>
<id>35fe1101fc0bf0e423936d1adb40d9bb28eeee74</id>
<content type='text'>
This fix coverity issue: 9625627

Bug 200741055

Change-Id: I33c686ae973a44fbd7ed86e4b5a36f18683568fd
Signed-off-by: Achal Verma &lt;achalv@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2527699
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dmitry Pervushin &lt;dpervushin@nvidia.com&gt;
Reviewed-by: Rahul Jain (SW-TEGRA) &lt;rahuljain@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2575325
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: Phoenix Jung &lt;pjung@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fix coverity issue: 9625627

Bug 200741055

Change-Id: I33c686ae973a44fbd7ed86e4b5a36f18683568fd
Signed-off-by: Achal Verma &lt;achalv@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2527699
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dmitry Pervushin &lt;dpervushin@nvidia.com&gt;
Reviewed-by: Rahul Jain (SW-TEGRA) &lt;rahuljain@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2575325
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: Phoenix Jung &lt;pjung@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vse: unregister aes algorithm</title>
<updated>2021-07-16T19:54:13+00:00</updated>
<author>
<name>Chaitanya Namuduri</name>
<email>snamuduri@nvidia.com</email>
</author>
<published>2021-06-28T03:45:42+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=86ef751aa0926123f695748e4bf7c3436d1ba100'/>
<id>86ef751aa0926123f695748e4bf7c3436d1ba100</id>
<content type='text'>
Bug 200716783

Added module support.
Unregister all crypto alogrithms at module exit.
Clean up VSE kthread and memory allocations.

Change-Id: Ib1630037c8ab33c4636055aafaa9dfa64e9112ff
Signed-off-by: Chaitanya Namuduri &lt;snamuduri@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2550598
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: svcacv &lt;svcacv@nvidia.com&gt;
Reviewed-by: Harinarayan Bhatta &lt;hbhatta@nvidia.com&gt;
Reviewed-by: Dmitry Pervushin &lt;dpervushin@nvidia.com&gt;
Reviewed-by: Phoenix Jung &lt;pjung@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug 200716783

Added module support.
Unregister all crypto alogrithms at module exit.
Clean up VSE kthread and memory allocations.

Change-Id: Ib1630037c8ab33c4636055aafaa9dfa64e9112ff
Signed-off-by: Chaitanya Namuduri &lt;snamuduri@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2550598
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: svcacv &lt;svcacv@nvidia.com&gt;
Reviewed-by: Harinarayan Bhatta &lt;hbhatta@nvidia.com&gt;
Reviewed-by: Dmitry Pervushin &lt;dpervushin@nvidia.com&gt;
Reviewed-by: Phoenix Jung &lt;pjung@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: crypto: Update tegra-se to support FIPS</title>
<updated>2021-06-14T22:24:05+00:00</updated>
<author>
<name>Ankit Patel</name>
<email>anpatel@nvidia.com</email>
</author>
<published>2021-05-19T19:55:12+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=d8042f70260c1a872df51c5ed60d39377caad497'/>
<id>d8042f70260c1a872df51c5ed60d39377caad497</id>
<content type='text'>
In process of resolve the crash and erros update code as per below,

   o Re arranged tegra_se_elp_probe for mutex init
   o Re arranged tegra_se_probe for different crypto test
   o Remove bug in handling memory pointers
   o Set flags in internal crypto allocation while using it for sign
   o Change sequence in Makefile to delay probing sequence of elp
   o Change rsa crypto name to "rsa-pka1" in elp

Bug 3274911
Bug 200739154

Signed-off-by: Ankit Patel &lt;anpatel@nvidia.com&gt;
Change-Id: Iefc04d975a5d2c71bf41050f32e36e8cfec5c966
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2532028
Reviewed-by: svcacv &lt;svcacv@nvidia.com&gt;
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: Rakesh Babu Bodla &lt;rbodla@nvidia.com&gt;
Reviewed-by: Bibek Basu &lt;bbasu@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In process of resolve the crash and erros update code as per below,

   o Re arranged tegra_se_elp_probe for mutex init
   o Re arranged tegra_se_probe for different crypto test
   o Remove bug in handling memory pointers
   o Set flags in internal crypto allocation while using it for sign
   o Change sequence in Makefile to delay probing sequence of elp
   o Change rsa crypto name to "rsa-pka1" in elp

Bug 3274911
Bug 200739154

Signed-off-by: Ankit Patel &lt;anpatel@nvidia.com&gt;
Change-Id: Iefc04d975a5d2c71bf41050f32e36e8cfec5c966
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2532028
Reviewed-by: svcacv &lt;svcacv@nvidia.com&gt;
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: Rakesh Babu Bodla &lt;rbodla@nvidia.com&gt;
Reviewed-by: Bibek Basu &lt;bbasu@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cryptodev: Add mutex lock for synchronization</title>
<updated>2021-05-13T01:44:54+00:00</updated>
<author>
<name>Rakesh Babu Bodla</name>
<email>rbodla@nvidia.com</email>
</author>
<published>2021-04-30T11:08:56+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=90335911c82543d7db68ec92f1cb2f8c9589d87c'/>
<id>90335911c82543d7db68ec92f1cb2f8c9589d87c</id>
<content type='text'>
There is a possibility of race condition between
different crypto operations which can lead to
accessing dangling pointers and can lead to crash.
Add mutex lock for synchronization.

Bug 3308522
Bug 3299723


Signed-off-by: Rakesh Babu Bodla &lt;rbodla@nvidia.com&gt;
Change-Id: Id12097b816373025d06fc760e7a85362e1d1cd4b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2527329
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Reviewed-by: svcacv &lt;svcacv@nvidia.com&gt;
Reviewed-by: Bitan Biswas &lt;bbiswas@nvidia.com&gt;
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a possibility of race condition between
different crypto operations which can lead to
accessing dangling pointers and can lead to crash.
Add mutex lock for synchronization.

Bug 3308522
Bug 3299723


Signed-off-by: Rakesh Babu Bodla &lt;rbodla@nvidia.com&gt;
Change-Id: Id12097b816373025d06fc760e7a85362e1d1cd4b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2527329
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Reviewed-by: svcacv &lt;svcacv@nvidia.com&gt;
Reviewed-by: Bitan Biswas &lt;bbiswas@nvidia.com&gt;
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
</pre>
</div>
</content>
</entry>
<entry>
<title>tegra: se-nvhost: Added key slot link head check</title>
<updated>2021-05-03T08:41:31+00:00</updated>
<author>
<name>Jason Mei</name>
<email>jianjunm@nvidia.com</email>
</author>
<published>2021-04-25T07:00:12+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=ca054691d0629b7aaedcfdddc52960353f54c7f2'/>
<id>ca054691d0629b7aaedcfdddc52960353f54c7f2</id>
<content type='text'>
There are more the one secure engines, use the 16 public key-slots.
Every secure engine may initialize the key-slots according to the
supported algorithm, to avoid key-slots wrong initializing, check
the key_slot list head.

Bug 3279249

Change-Id: Id58a993292e28884acb115bf6cf207d8bd990c60
Signed-off-by: Jason Mei &lt;jianjunm@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2520081
Reviewed-by: svcacv &lt;svcacv@nvidia.com&gt;
Reviewed-by: Jackie Chen &lt;jackchen@nvidia.com&gt;
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: Rakesh Babu Bodla &lt;rbodla@nvidia.com&gt;
Reviewed-by: Bibek Basu &lt;bbasu@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are more the one secure engines, use the 16 public key-slots.
Every secure engine may initialize the key-slots according to the
supported algorithm, to avoid key-slots wrong initializing, check
the key_slot list head.

Bug 3279249

Change-Id: Id58a993292e28884acb115bf6cf207d8bd990c60
Signed-off-by: Jason Mei &lt;jianjunm@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2520081
Reviewed-by: svcacv &lt;svcacv@nvidia.com&gt;
Reviewed-by: Jackie Chen &lt;jackchen@nvidia.com&gt;
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: Rakesh Babu Bodla &lt;rbodla@nvidia.com&gt;
Reviewed-by: Bibek Basu &lt;bbasu@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: tegra-hv-vse: fix a data abort</title>
<updated>2021-04-05T09:54:30+00:00</updated>
<author>
<name>ByungKuk Seo</name>
<email>bseo@nvidia.com</email>
</author>
<published>2021-03-23T08:30:43+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=ee1c50e0d2921c59934364dba605cdcc21267034'/>
<id>ee1c50e0d2921c59934364dba605cdcc21267034</id>
<content type='text'>
In tegra_hv_vse_probe(), the initialization of mempool for AES1
blkcipher ops was done after AES1 was registered to be ready for use by
kernel crypto framework.

This results in a data abort when mempool_alloc() is attempted in a
setup having the ko module loaded as late as cryptsetup or similar app
is launched.

Bug 3279914

Change-Id: Ic2805043c16c8f6c03ff0d151700273f38f12e28
Signed-off-by: ByungKuk Seo &lt;bseo@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2507605
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Reviewed-by: svcacv &lt;svcacv@nvidia.com&gt;
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: Harinarayan Bhatta &lt;hbhatta@nvidia.com&gt;
Reviewed-by: Phoenix Jung &lt;pjung@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In tegra_hv_vse_probe(), the initialization of mempool for AES1
blkcipher ops was done after AES1 was registered to be ready for use by
kernel crypto framework.

This results in a data abort when mempool_alloc() is attempted in a
setup having the ko module loaded as late as cryptsetup or similar app
is launched.

Bug 3279914

Change-Id: Ic2805043c16c8f6c03ff0d151700273f38f12e28
Signed-off-by: ByungKuk Seo &lt;bseo@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2507605
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Reviewed-by: svcacv &lt;svcacv@nvidia.com&gt;
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: Harinarayan Bhatta &lt;hbhatta@nvidia.com&gt;
Reviewed-by: Phoenix Jung &lt;pjung@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
</pre>
</div>
</content>
</entry>
<entry>
<title>vse: Fix null pointer dereference.</title>
<updated>2021-03-30T20:41:56+00:00</updated>
<author>
<name>Achal Verma</name>
<email>achalv@nvidia.com</email>
</author>
<published>2021-01-27T06:13:13+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=699508e9dc6f39c963ccc7ee8b4e816bcee455cc'/>
<id>699508e9dc6f39c963ccc7ee8b4e816bcee455cc</id>
<content type='text'>
Fix null pointer dereferencing in an error print
before pointer is assigned to non null value.

This fix coverity issue: 2448554

Bug 200689436

Change-Id: If85e16d50d7286b3fa67d2d9a7162b22fe048616
Signed-off-by: Achal Verma &lt;achalv@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2475949
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Dmitry Pervushin &lt;dpervushin@nvidia.com&gt;
Reviewed-by: Rahul Jain (SW-TEGRA) &lt;rahuljain@nvidia.com&gt;
Tested-by: Smriti Sharma &lt;smritis@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
(cherry picked from commit 559dc2257bc22855010b690f31272e321deeda73)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2499890
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: Phoenix Jung &lt;pjung@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix null pointer dereferencing in an error print
before pointer is assigned to non null value.

This fix coverity issue: 2448554

Bug 200689436

Change-Id: If85e16d50d7286b3fa67d2d9a7162b22fe048616
Signed-off-by: Achal Verma &lt;achalv@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2475949
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Dmitry Pervushin &lt;dpervushin@nvidia.com&gt;
Reviewed-by: Rahul Jain (SW-TEGRA) &lt;rahuljain@nvidia.com&gt;
Tested-by: Smriti Sharma &lt;smritis@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
(cherry picked from commit 559dc2257bc22855010b690f31272e321deeda73)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2499890
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: Phoenix Jung &lt;pjung@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: vse: fix on a cyclic deadlock</title>
<updated>2020-11-23T16:40:24+00:00</updated>
<author>
<name>ByungKuk Seo</name>
<email>bseo@nvidia.com</email>
</author>
<published>2020-11-12T01:45:04+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=b0974b2314e693dd2c326b4c26b2451aebc35870'/>
<id>b0974b2314e693dd2c326b4c26b2451aebc35870</id>
<content type='text'>
kmalloc(GFP_KERNEL) attempts to perform filesystem operations by
flushing caches to secure more memory. However, if this request
originates from filesystem like dm-crypt, then this can become
recursive by trying to free up the page caches where vse crypto
operations are in progress.

For the AES1 path called by dm-crypt, two changes are made as below:
1) Replace devm_kzalloc with mempool_alloc that can fall back to pre-
   allocated elements when kmalloc fails to allocate one.
2) Replace GFP_KERNEL with GFP_NOFS which does not allow making
   subsequent filesystem calls

[  984.136687] Workqueue: vse_work_q tegra_hv_vse_work_handler
[  984.136694] Call trace:
[  984.138297] [&lt;ffffff8008086214&gt;] __switch_to+0x9c/0xc0
[  984.140697] [&lt;ffffff8008d47230&gt;] __schedule+0x1e8/0x528
[  984.143173] [&lt;ffffff8008d475b0&gt;] schedule+0x40/0xa8
[  984.145558] [&lt;ffffff8008332c08&gt;] jbd2_log_wait_commit+0xb8/0x140
[  984.148215] [&lt;ffffff80083345a8&gt;] jbd2_complete_transaction+0x90/0xc0
[  984.151056] [&lt;ffffff80082e0d7c&gt;] ext4_evict_inode+0x2dc/0x530
[  984.153731] [&lt;ffffff80082567f0&gt;] evict+0xa8/0x168
[  984.156059] [&lt;ffffff80082568f8&gt;] dispose_list+0x48/0x60
[  984.158538] [&lt;ffffff8008257fe4&gt;] prune_icache_sb+0x6c/0x98
[  984.161057] [&lt;ffffff800823b2bc&gt;] super_cache_scan+0xf4/0x168
[  984.163597] [&lt;ffffff80081cd554&gt;] do_shrink_slab+0x14c/0x3d0
[  984.166091] [&lt;ffffff80081cdb68&gt;] shrink_slab.part.0+0xc0/0x130
[  984.168658] [&lt;ffffff80081cdc50&gt;] shrink_slab+0x78/0x90
[  984.171111] [&lt;ffffff80081d21bc&gt;] shrink_node+0xd4/0x338
[  984.173593] [&lt;ffffff80081d2500&gt;] do_try_to_free_pages+0xe0/0x360
[  984.176263] [&lt;ffffff80081d2878&gt;] try_to_free_pages+0xf8/0x298
[  984.178879] [&lt;ffffff80081c0ae8&gt;] __alloc_pages_nodemask+0x580/0xc18
[  984.181618] [&lt;ffffff80081e38f4&gt;] kmalloc_order+0x3c/0x80
[  984.184027] [&lt;ffffff80081e3974&gt;] kmalloc_order_trace+0x3c/0x110
[  984.186644] [&lt;ffffff800821a710&gt;] __kmalloc_track_caller+0x2c8/0x340
[  984.189454] [&lt;ffffff8008792730&gt;] devm_kmalloc+0x38/0x78
[  984.191927] [&lt;ffffff8008a90640&gt;] tegra_hv_vse_work_handler
					+0x190/0x498
[  984.194820] [&lt;ffffff80080c3880&gt;] process_one_work+0x1b8/0x460
[  984.197385] [&lt;ffffff80080c3b7c&gt;] worker_thread+0x54/0x488
[  984.199917] [&lt;ffffff80080ca900&gt;] kthread+0x100/0x108
[  984.202343] [&lt;ffffff8008083470&gt;] ret_from_fork+0x10/0x20

Bug 3170706

Change-Id: I31bed6f690ff8ba3fbe0bf7264ef6397e8963b65
Signed-off-by: ByungKuk Seo &lt;bseo@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2447570
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Reviewed-by: automaticguardword &lt;automaticguardword@nvidia.com&gt;
Reviewed-by: Alvin Park &lt;apark@nvidia.com&gt;
Reviewed-by: Harinarayan Bhatta &lt;hbhatta@nvidia.com&gt;
Reviewed-by: Phoenix Jung &lt;pjung@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kmalloc(GFP_KERNEL) attempts to perform filesystem operations by
flushing caches to secure more memory. However, if this request
originates from filesystem like dm-crypt, then this can become
recursive by trying to free up the page caches where vse crypto
operations are in progress.

For the AES1 path called by dm-crypt, two changes are made as below:
1) Replace devm_kzalloc with mempool_alloc that can fall back to pre-
   allocated elements when kmalloc fails to allocate one.
2) Replace GFP_KERNEL with GFP_NOFS which does not allow making
   subsequent filesystem calls

[  984.136687] Workqueue: vse_work_q tegra_hv_vse_work_handler
[  984.136694] Call trace:
[  984.138297] [&lt;ffffff8008086214&gt;] __switch_to+0x9c/0xc0
[  984.140697] [&lt;ffffff8008d47230&gt;] __schedule+0x1e8/0x528
[  984.143173] [&lt;ffffff8008d475b0&gt;] schedule+0x40/0xa8
[  984.145558] [&lt;ffffff8008332c08&gt;] jbd2_log_wait_commit+0xb8/0x140
[  984.148215] [&lt;ffffff80083345a8&gt;] jbd2_complete_transaction+0x90/0xc0
[  984.151056] [&lt;ffffff80082e0d7c&gt;] ext4_evict_inode+0x2dc/0x530
[  984.153731] [&lt;ffffff80082567f0&gt;] evict+0xa8/0x168
[  984.156059] [&lt;ffffff80082568f8&gt;] dispose_list+0x48/0x60
[  984.158538] [&lt;ffffff8008257fe4&gt;] prune_icache_sb+0x6c/0x98
[  984.161057] [&lt;ffffff800823b2bc&gt;] super_cache_scan+0xf4/0x168
[  984.163597] [&lt;ffffff80081cd554&gt;] do_shrink_slab+0x14c/0x3d0
[  984.166091] [&lt;ffffff80081cdb68&gt;] shrink_slab.part.0+0xc0/0x130
[  984.168658] [&lt;ffffff80081cdc50&gt;] shrink_slab+0x78/0x90
[  984.171111] [&lt;ffffff80081d21bc&gt;] shrink_node+0xd4/0x338
[  984.173593] [&lt;ffffff80081d2500&gt;] do_try_to_free_pages+0xe0/0x360
[  984.176263] [&lt;ffffff80081d2878&gt;] try_to_free_pages+0xf8/0x298
[  984.178879] [&lt;ffffff80081c0ae8&gt;] __alloc_pages_nodemask+0x580/0xc18
[  984.181618] [&lt;ffffff80081e38f4&gt;] kmalloc_order+0x3c/0x80
[  984.184027] [&lt;ffffff80081e3974&gt;] kmalloc_order_trace+0x3c/0x110
[  984.186644] [&lt;ffffff800821a710&gt;] __kmalloc_track_caller+0x2c8/0x340
[  984.189454] [&lt;ffffff8008792730&gt;] devm_kmalloc+0x38/0x78
[  984.191927] [&lt;ffffff8008a90640&gt;] tegra_hv_vse_work_handler
					+0x190/0x498
[  984.194820] [&lt;ffffff80080c3880&gt;] process_one_work+0x1b8/0x460
[  984.197385] [&lt;ffffff80080c3b7c&gt;] worker_thread+0x54/0x488
[  984.199917] [&lt;ffffff80080ca900&gt;] kthread+0x100/0x108
[  984.202343] [&lt;ffffff8008083470&gt;] ret_from_fork+0x10/0x20

Bug 3170706

Change-Id: I31bed6f690ff8ba3fbe0bf7264ef6397e8963b65
Signed-off-by: ByungKuk Seo &lt;bseo@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2447570
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Reviewed-by: automaticguardword &lt;automaticguardword@nvidia.com&gt;
Reviewed-by: Alvin Park &lt;apark@nvidia.com&gt;
Reviewed-by: Harinarayan Bhatta &lt;hbhatta@nvidia.com&gt;
Reviewed-by: Phoenix Jung &lt;pjung@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
</pre>
</div>
</content>
</entry>
</feed>
