* [PATCH] drm/i915/userptr: reject zero user_size
@ 2018-05-02 18:16 Matthew Auld
2018-05-02 18:45 ` Chris Wilson
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Matthew Auld @ 2018-05-02 18:16 UTC (permalink / raw)
To: intel-gfx
Operating on a zero sized GEM userptr object will lead to explosions.
Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem_userptr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c
index d596a8302ca3..854bd51b9478 100644
--- a/drivers/gpu/drm/i915/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
@@ -778,6 +778,9 @@ i915_gem_userptr_ioctl(struct drm_device *dev,
I915_USERPTR_UNSYNCHRONIZED))
return -EINVAL;
+ if (!args->user_size)
+ return -EINVAL;
+
if (offset_in_page(args->user_ptr | args->user_size))
return -EINVAL;
--
2.17.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915/userptr: reject zero user_size
2018-05-02 18:16 [PATCH] drm/i915/userptr: reject zero user_size Matthew Auld
@ 2018-05-02 18:45 ` Chris Wilson
2018-05-02 18:52 ` ✓ Fi.CI.BAT: success for " Patchwork
` (4 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2018-05-02 18:45 UTC (permalink / raw)
To: Matthew Auld, intel-gfx
Quoting Matthew Auld (2018-05-02 19:16:17)
> Operating on a zero sized GEM userptr object will lead to explosions.
>
> Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
I could find no "but..." to save the day, so yes, it does look like we
would let a 0 sized object through to the guts that never expect to see
such a thing.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915/userptr: reject zero user_size
2018-05-02 18:16 [PATCH] drm/i915/userptr: reject zero user_size Matthew Auld
2018-05-02 18:45 ` Chris Wilson
@ 2018-05-02 18:52 ` Patchwork
2018-05-02 18:53 ` [PATCH] " Chris Wilson
` (3 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-05-02 18:52 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/userptr: reject zero user_size
URL : https://patchwork.freedesktop.org/series/42586/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4123 -> Patchwork_8879 =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_8879 need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_8879, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42586/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8879:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_gttfill@basic:
fi-pnv-d510: PASS -> SKIP
== Known issues ==
Here are the changes found in Patchwork_8879 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_suspend@basic-s4-devices:
fi-kbl-7500u: PASS -> DMESG-WARN (fdo#105128)
igt@kms_frontbuffer_tracking@basic:
fi-hsw-4200u: PASS -> DMESG-FAIL (fdo#106103, fdo#102614)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-snb-2520m: PASS -> INCOMPLETE (fdo#103713)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-ivb-3520m: PASS -> DMESG-WARN (fdo#106084)
fi-cnl-psr: PASS -> DMESG-WARN (fdo#104951)
igt@prime_vgem@basic-fence-flip:
fi-ilk-650: PASS -> FAIL (fdo#104008)
==== Possible fixes ====
igt@kms_chamelium@dp-edid-read:
fi-kbl-7500u: FAIL (fdo#103841) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-ivb-3520m: DMESG-WARN (fdo#106084) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#106084 https://bugs.freedesktop.org/show_bug.cgi?id=106084
fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
== Participating hosts (40 -> 37) ==
Missing (3): fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4123 -> Patchwork_8879
CI_DRM_4123: cbb6a0aa933f3323a8deb331aca503b7388abc06 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4456: 43761534c6482dc67b9c3d8eeecd425ef40b3c4c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8879: 31d4876d8d11dbee7ca1532848b0b8e84a123dab @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4456: 30b992bdc047073e1fe99b1ac622f026618a8081 @ git://anongit.freedesktop.org/piglit
== Linux commits ==
31d4876d8d11 drm/i915/userptr: reject zero user_size
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8879/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915/userptr: reject zero user_size
2018-05-02 18:16 [PATCH] drm/i915/userptr: reject zero user_size Matthew Auld
2018-05-02 18:45 ` Chris Wilson
2018-05-02 18:52 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-05-02 18:53 ` Chris Wilson
2018-05-02 19:50 ` Matthew Auld
` (2 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2018-05-02 18:53 UTC (permalink / raw)
To: Matthew Auld, intel-gfx
Quoting Matthew Auld (2018-05-02 19:16:17)
> Operating on a zero sized GEM userptr object will lead to explosions.
>
> Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
One thing missing for a user visible bug...
Testcase:
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] drm/i915/userptr: reject zero user_size
2018-05-02 18:16 [PATCH] drm/i915/userptr: reject zero user_size Matthew Auld
` (2 preceding siblings ...)
2018-05-02 18:53 ` [PATCH] " Chris Wilson
@ 2018-05-02 19:50 ` Matthew Auld
2018-05-08 11:25 ` Chris Wilson
2018-05-02 20:38 ` ✓ Fi.CI.BAT: success for drm/i915/userptr: reject zero user_size (rev2) Patchwork
2018-05-03 3:33 ` ✓ Fi.CI.IGT: " Patchwork
5 siblings, 1 reply; 12+ messages in thread
From: Matthew Auld @ 2018-05-02 19:50 UTC (permalink / raw)
To: intel-gfx
Operating on a zero sized GEM userptr object will lead to explosions.
Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
Testcase: igt/gem_userptr_blits/input-checking
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem_userptr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c
index d596a8302ca3..854bd51b9478 100644
--- a/drivers/gpu/drm/i915/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
@@ -778,6 +778,9 @@ i915_gem_userptr_ioctl(struct drm_device *dev,
I915_USERPTR_UNSYNCHRONIZED))
return -EINVAL;
+ if (!args->user_size)
+ return -EINVAL;
+
if (offset_in_page(args->user_ptr | args->user_size))
return -EINVAL;
--
2.17.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 12+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915/userptr: reject zero user_size (rev2)
2018-05-02 18:16 [PATCH] drm/i915/userptr: reject zero user_size Matthew Auld
` (3 preceding siblings ...)
2018-05-02 19:50 ` Matthew Auld
@ 2018-05-02 20:38 ` Patchwork
2018-05-03 3:33 ` ✓ Fi.CI.IGT: " Patchwork
5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-05-02 20:38 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/userptr: reject zero user_size (rev2)
URL : https://patchwork.freedesktop.org/series/42586/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4124 -> Patchwork_8882 =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_8882 need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_8882, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42586/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8882:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_gttfill@basic:
fi-pnv-d510: SKIP -> PASS
== Known issues ==
Here are the changes found in Patchwork_8882 that come from known issues:
=== IGT changes ===
==== Possible fixes ====
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS
igt@prime_vgem@basic-fence-flip:
fi-glk-j4005: FAIL (fdo#104008) -> PASS
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
== Participating hosts (39 -> 35) ==
Additional (1): fi-bxt-dsi
Missing (5): fi-byt-j1900 fi-cnl-y3 fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4124 -> Patchwork_8882
CI_DRM_4124: f8d7a96b18809b25ffc00bb9fd4245a0e826057b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4456: 43761534c6482dc67b9c3d8eeecd425ef40b3c4c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8882: 89127e9eb1cfe2972ef7f6d4baaeb47b742a3069 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4456: 30b992bdc047073e1fe99b1ac622f026618a8081 @ git://anongit.freedesktop.org/piglit
== Linux commits ==
89127e9eb1cf drm/i915/userptr: reject zero user_size
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8882/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915/userptr: reject zero user_size (rev2)
2018-05-02 18:16 [PATCH] drm/i915/userptr: reject zero user_size Matthew Auld
` (4 preceding siblings ...)
2018-05-02 20:38 ` ✓ Fi.CI.BAT: success for drm/i915/userptr: reject zero user_size (rev2) Patchwork
@ 2018-05-03 3:33 ` Patchwork
5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-05-03 3:33 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/userptr: reject zero user_size (rev2)
URL : https://patchwork.freedesktop.org/series/42586/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4124_full -> Patchwork_8882_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_8882_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_8882_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42586/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8882_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-blt:
shard-kbl: SKIP -> PASS +2
igt@gem_mocs_settings@mocs-rc6-render:
shard-kbl: PASS -> SKIP
== Known issues ==
Here are the changes found in Patchwork_8882_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#105363)
igt@kms_flip@modeset-vs-vblank-race:
shard-glk: PASS -> FAIL (fdo#103060)
igt@kms_flip@plain-flip-ts-check:
shard-glk: PASS -> FAIL (fdo#100368)
igt@kms_rotation_crc@sprite-rotation-270:
shard-apl: PASS -> FAIL (fdo#103925)
==== Possible fixes ====
igt@kms_cursor_crc@cursor-128x128-suspend:
shard-apl: FAIL (fdo#103375) -> PASS
igt@kms_cursor_crc@cursor-64x64-dpms:
shard-apl: FAIL (fdo#103232, fdo#104645) -> PASS
igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
shard-hsw: FAIL (fdo#104873) -> PASS
igt@kms_flip@flip-vs-expired-vblank:
shard-hsw: FAIL (fdo#105707) -> PASS
igt@kms_flip@plain-flip-ts-check-interruptible:
shard-hsw: FAIL (fdo#100368) -> PASS
igt@kms_vblank@pipe-a-accuracy-idle:
shard-hsw: FAIL (fdo#102583) -> PASS
=== Piglit changes ===
==== Issues hit ====
spec@arb_tessellation_shader@execution@variable-indexing@vs-output-array-float-index-wr-before-tcs:
pig-glk-j4005: NOTRUN -> FAIL (fdo#106148) +35
spec@glsl-1.40-compat@execution@built-in-constants:
pig-glk-j4005: NOTRUN -> FAIL (fdo#106277)
pig-hsw-4770r: NOTRUN -> FAIL (fdo#106277)
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102583 https://bugs.freedesktop.org/show_bug.cgi?id=102583
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#104645 https://bugs.freedesktop.org/show_bug.cgi?id=104645
fdo#104873 https://bugs.freedesktop.org/show_bug.cgi?id=104873
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105707 https://bugs.freedesktop.org/show_bug.cgi?id=105707
fdo#106148 https://bugs.freedesktop.org/show_bug.cgi?id=106148
fdo#106277 https://bugs.freedesktop.org/show_bug.cgi?id=106277
== Participating hosts (6 -> 8) ==
Additional (2): pig-glk-j4005 pig-hsw-4770r
== Build changes ==
* Linux: CI_DRM_4124 -> Patchwork_8882
CI_DRM_4124: f8d7a96b18809b25ffc00bb9fd4245a0e826057b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4456: 43761534c6482dc67b9c3d8eeecd425ef40b3c4c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8882: 89127e9eb1cfe2972ef7f6d4baaeb47b742a3069 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4456: 30b992bdc047073e1fe99b1ac622f026618a8081 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8882/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915/userptr: reject zero user_size
2018-05-02 19:50 ` Matthew Auld
@ 2018-05-08 11:25 ` Chris Wilson
0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2018-05-08 11:25 UTC (permalink / raw)
To: Matthew Auld, intel-gfx
Quoting Matthew Auld (2018-05-02 20:50:21)
> Operating on a zero sized GEM userptr object will lead to explosions.
>
> Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
> Testcase: igt/gem_userptr_blits/input-checking
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Picked up for pushing in the next wave. Thanks for the fix and testcase,
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915/userptr: reject zero user_size
2018-09-03 19:56 ` Loic
@ 2018-09-07 9:01 ` Greg KH
0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2018-09-07 9:01 UTC (permalink / raw)
To: Loic; +Cc: stable, matthew.auld
On Mon, Sep 03, 2018 at 09:56:42PM +0200, Loic wrote:
> Le 2018-09-03 18:17, Greg KH a �crit�:
> > On Sun, Sep 02, 2018 at 11:55:52PM +0200, Loic wrote:
> > > Hello,
> > >
> > > Tested without any problem so please picked up this.
> >
> > Pick this up for what stable kernel tree(s) exactly?
>
> Sorry about the lack of detail For 4.4, 4.9 and 4.14 please.
Now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915/userptr: reject zero user_size
2018-09-03 16:17 ` Greg KH
@ 2018-09-03 19:56 ` Loic
2018-09-07 9:01 ` Greg KH
0 siblings, 1 reply; 12+ messages in thread
From: Loic @ 2018-09-03 19:56 UTC (permalink / raw)
To: Greg KH; +Cc: stable, matthew.auld
Le 2018-09-03 18:17, Greg KH a écrit :
> On Sun, Sep 02, 2018 at 11:55:52PM +0200, Loic wrote:
>> Hello,
>>
>> Tested without any problem so please picked up this.
>
> Pick this up for what stable kernel tree(s) exactly?
Sorry about the lack of detail For 4.4, 4.9 and 4.14 please.
> thanks,
Thanks to you too.
>
> greg k-h
--
Best regards,
Loic
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915/userptr: reject zero user_size
2018-09-02 21:55 [PATCH] drm/i915/userptr: reject zero user_size Loic
@ 2018-09-03 16:17 ` Greg KH
2018-09-03 19:56 ` Loic
0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2018-09-03 16:17 UTC (permalink / raw)
To: Loic; +Cc: stable, matthew.auld
On Sun, Sep 02, 2018 at 11:55:52PM +0200, Loic wrote:
> Hello,
>
> Tested without any problem so please picked up this.
Pick this up for what stable kernel tree(s) exactly?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] drm/i915/userptr: reject zero user_size
@ 2018-09-02 21:55 Loic
2018-09-03 16:17 ` Greg KH
0 siblings, 1 reply; 12+ messages in thread
From: Loic @ 2018-09-02 21:55 UTC (permalink / raw)
To: stable; +Cc: matthew.auld
Hello,
Tested without any problem so please picked up this.
From: Matthew Auld
[ Upstream commit c11c7bfd213495784b22ef82a69b6489f8d0092f ]
Operating on a zero sized GEM userptr object will lead to explosions.
Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into
video memory (userptr) ioctl")
Testcase: igt/gem_userptr_blits/input-checking
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link:
https://patchwork.freedesktop.org/patch/msgid/20180502195021.30900-1-matthew.auld@intel.com
---
drivers/gpu/drm/i915/i915_gem_userptr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c
b/drivers/gpu/drm/i915/i915_gem_userptr.c
index d596a8302ca3c..854bd51b9478a 100644
--- a/drivers/gpu/drm/i915/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
@@ -778,6 +778,9 @@ i915_gem_userptr_ioctl(struct drm_device *dev,
I915_USERPTR_UNSYNCHRONIZED))
return -EINVAL;
+ if (!args->user_size)
+ return -EINVAL;
+
if (offset_in_page(args->user_ptr | args->user_size))
return -EINVAL;
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-09-07 13:42 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02 18:16 [PATCH] drm/i915/userptr: reject zero user_size Matthew Auld
2018-05-02 18:45 ` Chris Wilson
2018-05-02 18:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-05-02 18:53 ` [PATCH] " Chris Wilson
2018-05-02 19:50 ` Matthew Auld
2018-05-08 11:25 ` Chris Wilson
2018-05-02 20:38 ` ✓ Fi.CI.BAT: success for drm/i915/userptr: reject zero user_size (rev2) Patchwork
2018-05-03 3:33 ` ✓ Fi.CI.IGT: " Patchwork
2018-09-02 21:55 [PATCH] drm/i915/userptr: reject zero user_size Loic
2018-09-03 16:17 ` Greg KH
2018-09-03 19:56 ` Loic
2018-09-07 9:01 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.