* [PATCH] drm/i915: Large page offsets for pread/pwrite
@ 2018-10-12 14:02 Chris Wilson
2018-10-12 14:12 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Chris Wilson @ 2018-10-12 14:02 UTC (permalink / raw)
To: intel-gfx; +Cc: Chris Wilson, Tvrtko Ursulin, stable
Handle integer overflow when computing the sub-page length for shmem
backed pread/pwrite.
Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/i915/i915_gem.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 7d45e71100bc..93d09282710d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1127,11 +1127,7 @@ i915_gem_shmem_pread(struct drm_i915_gem_object *obj,
offset = offset_in_page(args->offset);
for (idx = args->offset >> PAGE_SHIFT; remain; idx++) {
struct page *page = i915_gem_object_get_page(obj, idx);
- int length;
-
- length = remain;
- if (offset + length > PAGE_SIZE)
- length = PAGE_SIZE - offset;
+ unsigned int length = min_t(u64, remain, PAGE_SIZE - offset);
ret = shmem_pread(page, offset, length, user_data,
page_to_phys(page) & obj_do_bit17_swizzling,
@@ -1575,11 +1571,7 @@ i915_gem_shmem_pwrite(struct drm_i915_gem_object *obj,
offset = offset_in_page(args->offset);
for (idx = args->offset >> PAGE_SHIFT; remain; idx++) {
struct page *page = i915_gem_object_get_page(obj, idx);
- int length;
-
- length = remain;
- if (offset + length > PAGE_SIZE)
- length = PAGE_SIZE - offset;
+ unsigned int length = min_t(u64, remain, PAGE_SIZE - offset);
ret = shmem_pwrite(page, offset, length, user_data,
page_to_phys(page) & obj_do_bit17_swizzling,
--
2.19.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* ✗ Fi.CI.SPARSE: warning for drm/i915: Large page offsets for pread/pwrite
2018-10-12 14:02 [PATCH] drm/i915: Large page offsets for pread/pwrite Chris Wilson
@ 2018-10-12 14:12 ` Patchwork
2018-10-12 14:29 ` ✓ Fi.CI.BAT: success " Patchwork
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-10-12 14:12 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Large page offsets for pread/pwrite
URL : https://patchwork.freedesktop.org/series/50929/
State : warning
== Summary ==
$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/i915: Large page offsets for pread/pwrite
+drivers/gpu/drm/i915/i915_gem.c:1130:39: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_gem.c:1130:39: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_gem.c:1574:39: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_gem.c:1574:39: warning: expression using sizeof(void)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread* ✓ Fi.CI.BAT: success for drm/i915: Large page offsets for pread/pwrite
2018-10-12 14:02 [PATCH] drm/i915: Large page offsets for pread/pwrite Chris Wilson
2018-10-12 14:12 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
@ 2018-10-12 14:29 ` Patchwork
2018-10-12 14:41 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
2018-10-12 16:01 ` ✓ Fi.CI.IGT: success for " Patchwork
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-10-12 14:29 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Large page offsets for pread/pwrite
URL : https://patchwork.freedesktop.org/series/50929/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4976 -> Patchwork_10439 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50929/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_10439 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@debugfs_test@read_all_entries:
fi-icl-u: PASS -> DMESG-WARN (fdo#107724) +1
igt@drv_selftest@live_gem:
{fi-apl-guc}: NOTRUN -> INCOMPLETE (fdo#106693)
igt@gem_close_race@basic-process:
fi-skl-6770hq: PASS -> DMESG-WARN (fdo#105541)
==== Possible fixes ====
igt@kms_flip@basic-flip-vs-modeset:
fi-glk-j4005: DMESG-WARN (fdo#106097) -> PASS
igt@kms_pipe_crc_basic@read-crc-pipe-c:
fi-skl-6700k2: FAIL (fdo#107362, fdo#103191) -> PASS
igt@pm_rpm@module-reload:
fi-skl-6600u: INCOMPLETE (fdo#107807) -> PASS
fi-glk-j4005: FAIL (fdo#108338) -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#105541 https://bugs.freedesktop.org/show_bug.cgi?id=105541
fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097
fdo#106693 https://bugs.freedesktop.org/show_bug.cgi?id=106693
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807
fdo#108338 https://bugs.freedesktop.org/show_bug.cgi?id=108338
== Participating hosts (45 -> 41) ==
Additional (1): fi-apl-guc
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-pnv-d510
== Build changes ==
* Linux: CI_DRM_4976 -> Patchwork_10439
CI_DRM_4976: dec9886eff39d38332bb5ea438b9b053d6b2177c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4674: 93871c6fb3c25e5d350c9faf36ded917174214de @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10439: 05301e199ada97ed49db0cd56c6e77bf32a5f200 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
05301e199ada drm/i915: Large page offsets for pread/pwrite
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10439/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Intel-gfx] [PATCH] drm/i915: Large page offsets for pread/pwrite
2018-10-12 14:02 [PATCH] drm/i915: Large page offsets for pread/pwrite Chris Wilson
2018-10-12 14:12 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2018-10-12 14:29 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-10-12 14:41 ` Tvrtko Ursulin
2018-10-12 16:01 ` ✓ Fi.CI.IGT: success for " Patchwork
3 siblings, 0 replies; 5+ messages in thread
From: Tvrtko Ursulin @ 2018-10-12 14:41 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: stable
On 12/10/2018 15:02, Chris Wilson wrote:
> Handle integer overflow when computing the sub-page length for shmem
> backed pread/pwrite.
>
> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: stable@vger.kernel.org
> ---
> drivers/gpu/drm/i915/i915_gem.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 7d45e71100bc..93d09282710d 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1127,11 +1127,7 @@ i915_gem_shmem_pread(struct drm_i915_gem_object *obj,
> offset = offset_in_page(args->offset);
> for (idx = args->offset >> PAGE_SHIFT; remain; idx++) {
> struct page *page = i915_gem_object_get_page(obj, idx);
> - int length;
> -
> - length = remain;
> - if (offset + length > PAGE_SIZE)
> - length = PAGE_SIZE - offset;
> + unsigned int length = min_t(u64, remain, PAGE_SIZE - offset);
>
> ret = shmem_pread(page, offset, length, user_data,
> page_to_phys(page) & obj_do_bit17_swizzling,
> @@ -1575,11 +1571,7 @@ i915_gem_shmem_pwrite(struct drm_i915_gem_object *obj,
> offset = offset_in_page(args->offset);
> for (idx = args->offset >> PAGE_SHIFT; remain; idx++) {
> struct page *page = i915_gem_object_get_page(obj, idx);
> - int length;
> -
> - length = remain;
> - if (offset + length > PAGE_SIZE)
> - length = PAGE_SIZE - offset;
> + unsigned int length = min_t(u64, remain, PAGE_SIZE - offset);
>
> ret = shmem_pwrite(page, offset, length, user_data,
> page_to_phys(page) & obj_do_bit17_swizzling,
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
^ permalink raw reply [flat|nested] 5+ messages in thread* ✓ Fi.CI.IGT: success for drm/i915: Large page offsets for pread/pwrite
2018-10-12 14:02 [PATCH] drm/i915: Large page offsets for pread/pwrite Chris Wilson
` (2 preceding siblings ...)
2018-10-12 14:41 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
@ 2018-10-12 16:01 ` Patchwork
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-10-12 16:01 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Large page offsets for pread/pwrite
URL : https://patchwork.freedesktop.org/series/50929/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4976_full -> Patchwork_10439_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_10439_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_10439_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10439_full:
=== IGT changes ===
==== Warnings ====
igt@perf_pmu@rc6:
shard-kbl: PASS -> SKIP
== Known issues ==
Here are the changes found in Patchwork_10439_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_suspend@shrink:
shard-skl: NOTRUN -> INCOMPLETE (fdo#106886)
igt@gem_cpu_reloc@full:
shard-skl: NOTRUN -> INCOMPLETE (fdo#108073)
igt@gem_exec_schedule@pi-ringfull-render:
shard-skl: NOTRUN -> FAIL (fdo#103158) +1
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-skl: NOTRUN -> TIMEOUT (fdo#108039)
igt@gem_userptr_blits@readonly-unsync:
shard-skl: NOTRUN -> INCOMPLETE (fdo#108074)
igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
shard-skl: NOTRUN -> DMESG-WARN (fdo#107956) +2
igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
shard-snb: NOTRUN -> DMESG-WARN (fdo#107956) +1
igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
shard-skl: NOTRUN -> FAIL (fdo#105458) +1
igt@kms_chv_cursor_fail@pipe-c-256x256-top-edge:
shard-skl: NOTRUN -> FAIL (fdo#104671) +1
igt@kms_cursor_crc@cursor-128x42-sliding:
shard-skl: NOTRUN -> FAIL (fdo#103232) +2
igt@kms_cursor_crc@cursor-64x21-random:
shard-apl: PASS -> FAIL (fdo#103232) +3
igt@kms_cursor_crc@cursor-64x64-suspend:
shard-apl: PASS -> FAIL (fdo#103232, fdo#103191) +1
igt@kms_draw_crc@draw-method-rgb565-mmap-cpu-ytiled:
shard-skl: NOTRUN -> FAIL (fdo#103184)
igt@kms_fbcon_fbt@fbc:
shard-skl: NOTRUN -> FAIL (fdo#103833, fdo#105682)
igt@kms_fbcon_fbt@fbc-suspend:
shard-skl: NOTRUN -> INCOMPLETE (fdo#104108, fdo#107773)
igt@kms_fbcon_fbt@psr-suspend:
shard-skl: NOTRUN -> FAIL (fdo#107882) +1
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-wc:
shard-skl: NOTRUN -> FAIL (fdo#105682)
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt:
shard-apl: PASS -> FAIL (fdo#103167)
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
shard-glk: PASS -> FAIL (fdo#103167) +1
igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-render:
shard-skl: PASS -> FAIL (fdo#103167) +2
igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-wc:
shard-skl: NOTRUN -> FAIL (fdo#103167) +2
igt@kms_frontbuffer_tracking@psr-rgb565-draw-render:
shard-skl: SKIP -> FAIL (fdo#103167)
igt@kms_frontbuffer_tracking@psr-suspend:
shard-skl: NOTRUN -> INCOMPLETE (fdo#106978, fdo#107773, fdo#104108)
igt@kms_plane@pixel-format-pipe-a-planes:
shard-skl: NOTRUN -> DMESG-FAIL (fdo#106885, fdo#103166)
igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
shard-skl: NOTRUN -> FAIL (fdo#108145) +7
igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
shard-skl: PASS -> FAIL (fdo#108145)
igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
shard-skl: NOTRUN -> FAIL (fdo#108146) +1
igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
shard-apl: PASS -> FAIL (fdo#103166)
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
shard-skl: NOTRUN -> FAIL (fdo#99912)
igt@kms_sysfs_edid_timing:
shard-skl: NOTRUN -> FAIL (fdo#100047)
igt@pm_backlight@fade_with_suspend:
shard-skl: NOTRUN -> FAIL (fdo#107847)
igt@pm_rpm@gem-execbuf-stress:
shard-skl: NOTRUN -> INCOMPLETE (fdo#107803, fdo#107807)
igt@pm_rpm@system-suspend:
shard-skl: NOTRUN -> INCOMPLETE (fdo#104108, fdo#107807)
==== Possible fixes ====
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: INCOMPLETE (fdo#103665, fdo#106023) -> PASS
igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
shard-glk: FAIL (fdo#108145) -> PASS
igt@kms_cursor_crc@cursor-256x256-random:
shard-apl: FAIL (fdo#103232) -> PASS +3
igt@kms_cursor_crc@cursor-64x64-suspend:
shard-skl: INCOMPLETE (fdo#104108) -> PASS
igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
shard-hsw: FAIL (fdo#105767) -> PASS
igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
shard-glk: DMESG-WARN (fdo#105763, fdo#106538) -> PASS
igt@kms_flip@plain-flip-fb-recreate-interruptible:
shard-skl: FAIL (fdo#100368) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
shard-apl: FAIL (fdo#103167) -> PASS
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
shard-glk: FAIL (fdo#103167) -> PASS +6
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
shard-skl: INCOMPLETE (fdo#104108, fdo#107773) -> PASS +2
igt@kms_plane@plane-position-covered-pipe-a-planes:
shard-glk: FAIL (fdo#103166) -> PASS +1
igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
shard-apl: FAIL (fdo#103166) -> PASS
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103833 https://bugs.freedesktop.org/show_bug.cgi?id=103833
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#104671 https://bugs.freedesktop.org/show_bug.cgi?id=104671
fdo#105458 https://bugs.freedesktop.org/show_bug.cgi?id=105458
fdo#105682 https://bugs.freedesktop.org/show_bug.cgi?id=105682
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106885 https://bugs.freedesktop.org/show_bug.cgi?id=106885
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#106978 https://bugs.freedesktop.org/show_bug.cgi?id=106978
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
fdo#107803 https://bugs.freedesktop.org/show_bug.cgi?id=107803
fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807
fdo#107847 https://bugs.freedesktop.org/show_bug.cgi?id=107847
fdo#107882 https://bugs.freedesktop.org/show_bug.cgi?id=107882
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108039 https://bugs.freedesktop.org/show_bug.cgi?id=108039
fdo#108073 https://bugs.freedesktop.org/show_bug.cgi?id=108073
fdo#108074 https://bugs.freedesktop.org/show_bug.cgi?id=108074
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#108146 https://bugs.freedesktop.org/show_bug.cgi?id=108146
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (6 -> 6) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4976 -> Patchwork_10439
CI_DRM_4976: dec9886eff39d38332bb5ea438b9b053d6b2177c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4674: 93871c6fb3c25e5d350c9faf36ded917174214de @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10439: 05301e199ada97ed49db0cd56c6e77bf32a5f200 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10439/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-12 16:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-12 14:02 [PATCH] drm/i915: Large page offsets for pread/pwrite Chris Wilson
2018-10-12 14:12 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2018-10-12 14:29 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-12 14:41 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
2018-10-12 16:01 ` ✓ Fi.CI.IGT: success for " Patchwork
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.