OpenCloudOS-Kernel/drivers/gpu/drm/virtio
Colin Ian King 74c1bda2f3 drm/virtio: fix another potential integer overflow on shift of a int
The left shift of unsigned int 32 bit integer constant 1 is evaluated
using 32 bit arithmetic and then assigned to a signed 64 bit integer.
In the case where value is 32 or more this can lead to an overflow
(value can be in range 0..MAX_CAPSET_ID (63). Fix this by shifting
the value 1ULL instead.

Addresses-Coverity: ("Uninitentional integer overflow")
Fixes: 4fb530e5ca ("drm/virtio: implement context init: support init ioctl")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210930102748.16922-1-colin.king@canonical.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-10-29 08:26:23 +02:00
..
Kconfig drivers: gpu: drm: virtio: fix dependency of DRM_VIRTIO_GPU on VIRTIO 2020-12-22 13:43:29 +01:00
Makefile drm/virtio: implement blob resources: implement vram object 2020-09-29 11:23:33 +02:00
virtgpu_debugfs.c drm/virtio: implement context init: probe for feature 2021-09-29 09:22:30 +02:00
virtgpu_display.c drm/virtio: fix the missed drm_gem_object_put() in virtio_gpu_user_framebuffer_create() 2021-10-11 11:16:45 +02:00
virtgpu_drv.c drm/virtio: implement context init: add virtio_gpu_fence_event 2021-09-29 09:22:31 +02:00
virtgpu_drv.h drm/virtio: implement context init: add virtio_gpu_fence_event 2021-09-29 09:22:31 +02:00
virtgpu_fence.c drm/virtio: implement context init: add virtio_gpu_fence_event 2021-09-29 09:22:31 +02:00
virtgpu_gem.c drm/virtio: Create Dumb BOs as guest Blobs (v3) 2021-04-15 10:55:18 +02:00
virtgpu_ioctl.c drm/virtio: fix another potential integer overflow on shift of a int 2021-10-29 08:26:23 +02:00
virtgpu_kms.c drm/virtio: implement context init: probe for feature 2021-09-29 09:22:30 +02:00
virtgpu_object.c drm/virtio: Create Dumb BOs as guest Blobs (v3) 2021-04-15 10:55:18 +02:00
virtgpu_plane.c drm/virtio: implement context init: plumb {base_fence_ctx, ring_idx} to virtio_gpu_fence_alloc 2021-09-29 09:22:30 +02:00
virtgpu_prime.c drm/virtio: support mapping exported vram 2021-08-16 14:09:40 +02:00
virtgpu_trace.h drm/virtio: add trace events for commands 2019-05-06 10:52:58 +02:00
virtgpu_trace_points.c drm/virtio: add trace events for commands 2019-05-06 10:52:58 +02:00
virtgpu_vq.c drm/virtio: implement context init: stop using drv->context when creating fence 2021-09-29 09:22:31 +02:00
virtgpu_vram.c drm/virtio: support mapping exported vram 2021-08-16 14:09:40 +02:00