summaryrefslogtreecommitdiff
path: root/scripts/gdb
diff options
context:
space:
mode:
authorKoby Elbaz <kelbaz@habana.ai>2022-12-23 16:02:05 +0300
committerOded Gabbay <ogabbay@kernel.org>2023-01-26 12:52:11 +0300
commit571d1a7222851ef5075f55702074ed7713dba304 (patch)
treea5b1a03dcaff79fc82addf0d54ed579824862b65 /scripts/gdb
parentc7d7b9aca2423d243748361cfb72e7fbdb8b37b9 (diff)
downloadlinux-571d1a7222851ef5075f55702074ed7713dba304.tar.xz
habanalabs: protect access to dynamic mem 'user_mappings'
When HL_INFO_USER_MAPPINGS IOCTL is called, we copy_to_user from a dynamically allocated memory - 'user_mappings'. Since freeing/allocating it happens in runtime (upon a page fault), it not unlikely to access it even before being initially allocated (i.e., accessing a NULL pointer). The solution is to simply mark the spot when the err info has been collected, and that way to know whether err info (either page fault or RAZWI) is available to be read. Signed-off-by: Koby Elbaz <kelbaz@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'scripts/gdb')
0 files changed, 0 insertions, 0 deletions