[Freedreno] [PATCH] drm: re-add deleted doc for drm_gem_open_ioctl

2020-07-28 Thread Steve Cohen
Add back the removed documentation for drm_gem_open_ioctl. This patch is submitted in response to [1]. [1] https://lore.kernel.org/linux-arm-msm/20200728085244.GY6419@phenom.ffwll.local/ Signed-off-by: Steve Cohen --- drivers/gpu/drm/drm_gem.c | 3 +++ 1 file changed, 3 insertions(+) diff

[Freedreno] [PATCH V2] drm: hold gem reference until object is no longer accessed

2020-07-20 Thread Steve Cohen
the potential security hole. Signed-off-by: Steve Cohen --- drivers/gpu/drm/drm_gem.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 7bf628e..ee2058a 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm

[Freedreno] [PATCH] drm: hold gem reference until object is no longer accessed

2020-07-10 Thread Steve Cohen
still be accessed to resolve this. Signed-off-by: Steve Cohen --- drivers/gpu/drm/drm_gem.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 7bf628e..4b2891c 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu

[Freedreno] [PATCH 1/3] drm: add driver hook for create blob limitations

2019-11-07 Thread Steve Cohen
Allow drivers with blob limitations to run checks before blobs are created. This can be used to limit how much memory can be allocated based on driver requirements. Signed-off-by: Steve Cohen --- drivers/gpu/drm/drm_property.c | 7 +++ include/drm/drm_drv.h | 9 + 2 files

[Freedreno] [PATCH 3/3] drm/msm/dpu: check blob limitations during create blob ioctl

2019-11-07 Thread Steve Cohen
Limit the blob size and number of blobs that can be allocated by a client. This prevents fuzzers from abusing this ioctl and exhausting the system memory. Signed-off-by: Steve Cohen --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 14 ++ 1 file changed, 14 insertions(+) diff --git

[Freedreno] [PATCH 2/3] drm/msm: add support for createblob_check driver hook

2019-11-07 Thread Steve Cohen
Allow msm_kms devices to register a hook to check blob count and blob size limitations before a new blob is created. Signed-off-by: Steve Cohen --- drivers/gpu/drm/msm/msm_drv.c | 25 + drivers/gpu/drm/msm/msm_kms.h | 1 + 2 files changed, 26 insertions(+) diff --git

[Freedreno] [PATCH 0/3] allow DRM drivers to limit creation of blobs

2019-11-07 Thread Steve Cohen
Fuzzers used in Android compliance testing repeatedly call the create blob IOCTL which eventually exhausts the system memory. This series adds a hook which allows drivers to impose their own limitations on the size and/or number of blobs created. Steve Cohen (3): drm: add driver hook for create