]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: tegra: Add return code checks and increase debugfs size
authorTimo Alho <talho@nvidia.com>
Sun, 12 Jul 2020 10:01:14 +0000 (11:01 +0100)
committerThierry Reding <treding@nvidia.com>
Tue, 14 Jul 2020 15:56:28 +0000 (17:56 +0200)
commit54f18af8d30c4e147859baa9d2e052af24719d63
tree94c4576d57991dad8283776982eb217a16369329
parent74a27a5f5a99e6b5adfd790053b6cccac3270c76
firmware: tegra: Add return code checks and increase debugfs size

Add checking of the BPMP-FW return code values for MRQ_DEBUGFS calls.

Also, development versions of the firmware may have debugfs with a
directory structure larger than 256 KiB. Hence increase the size of the
memory buffer to accommodate those firmware revisions.

And finally, ensure that no access outside of allocated memory buffer
happens in case BPMP-FW returns an invalid response size (nbytes) from
mrq_debugfs_dumpdir() call.

Signed-off-by: Timo Alho <talho@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/firmware/tegra/bpmp-debugfs.c