]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: proper handling of alloc size in coresight
authorOfir Bitton <obitton@habana.ai>
Thu, 6 Aug 2020 08:33:27 +0000 (11:33 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Sat, 22 Aug 2020 09:47:57 +0000 (12:47 +0300)
commit7b570c7180029e5eee9f8473ed19558085221af9
tree44166f350a9a7059d09edc184434d0eab49a02e6
parentc01365a9393fb6a31028802424037b879e36619f
habanalabs: proper handling of alloc size in coresight

Allocation size can go up to 64bit but truncated to 32bit,
we should make sure it is not truncated and validate no address
overflow.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/gaudi/gaudi_coresight.c
drivers/misc/habanalabs/goya/goya_coresight.c