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)
commit36545279f076afeb77104f5ffeab850da3b6d107
tree44166f350a9a7059d09edc184434d0eab49a02e6
parentf44d23b9095abd91dad9f5f3add2a3149833ec83
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