* [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: don't trust the dma_buf->size
@ 2021-01-22 18:15 Matthew Auld
2021-01-22 18:15 ` [Intel-gfx] [PATCH 2/2] drm/i915: consolidate 2big error checking for object sizes Matthew Auld
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Matthew Auld @ 2021-01-22 18:15 UTC (permalink / raw)
To: intel-gfx
At least for the time being, we need to limit our object sizes such that
the number of pages can fit within a 32b signed int. It looks like we
should also apply the same restriction to any imported dma-buf.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
index 04e9c04545ad..dc11497f830b 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
@@ -244,6 +244,16 @@ struct drm_gem_object *i915_gem_prime_import(struct drm_device *dev,
}
}
+ /*
+ * XXX: There is a prevalence of the assumption that we fit the
+ * object's page count inside a 32bit _signed_ variable. Let's document
+ * this and catch if we ever need to fix it. In the meantime, if you do
+ * spot such a local variable, please consider fixing!
+ */
+
+ if (dma_buf->size >> PAGE_SHIFT > INT_MAX)
+ return ERR_PTR(-E2BIG);
+
/* need to attach */
attach = dma_buf_attach(dma_buf, dev->dev);
if (IS_ERR(attach))
--
2.26.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Intel-gfx] [PATCH 2/2] drm/i915: consolidate 2big error checking for object sizes
2021-01-22 18:15 [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: don't trust the dma_buf->size Matthew Auld
@ 2021-01-22 18:15 ` Matthew Auld
2021-01-22 18:25 ` Chris Wilson
2021-01-22 18:24 ` [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: don't trust the dma_buf->size Chris Wilson
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Matthew Auld @ 2021-01-22 18:15 UTC (permalink / raw)
To: intel-gfx
Throw it into a simple helper, and throw a warning if we encounter an
object which has been initialised with an object size that exceeds our
limit of INT_MAX pages.
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 9 +------
drivers/gpu/drm/i915/gem/i915_gem_object.h | 26 +++++++++++++++++++++
drivers/gpu/drm/i915/gem/i915_gem_region.c | 12 +---------
drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 16 +------------
4 files changed, 29 insertions(+), 34 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
index dc11497f830b..5cc8a0b2387f 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
@@ -244,14 +244,7 @@ struct drm_gem_object *i915_gem_prime_import(struct drm_device *dev,
}
}
- /*
- * XXX: There is a prevalence of the assumption that we fit the
- * object's page count inside a 32bit _signed_ variable. Let's document
- * this and catch if we ever need to fix it. In the meantime, if you do
- * spot such a local variable, please consider fixing!
- */
-
- if (dma_buf->size >> PAGE_SHIFT > INT_MAX)
+ if (i915_gem_object_size_2big(dma_buf->size))
return ERR_PTR(-E2BIG);
/* need to attach */
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
index d0ae834d787a..3411ad197fa6 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
@@ -16,6 +16,32 @@
#include "i915_gem_gtt.h"
#include "i915_vma_types.h"
+/*
+ * XXX: There is a prevalence of the assumption that we fit the
+ * object's page count inside a 32bit _signed_ variable. Let's document
+ * this and catch if we ever need to fix it. In the meantime, if you do
+ * spot such a local variable, please consider fixing!
+ *
+ * Aside from our own locals (for which we have no excuse!):
+ * - sg_table embeds unsigned int for num_pages
+ * - get_user_pages*() mixed ints with longs
+ */
+#define GEM_CHECK_SIZE_OVERFLOW(sz) \
+ GEM_WARN_ON((sz) >> PAGE_SHIFT > INT_MAX)
+
+static inline bool i915_gem_object_size_2big(u64 size)
+{
+ struct drm_i915_gem_object *obj;
+
+ if (GEM_CHECK_SIZE_OVERFLOW(size))
+ return true;
+
+ if (overflows_type(size, obj->base.size))
+ return true;
+
+ return false;
+}
+
void i915_gem_init__objects(struct drm_i915_private *i915);
struct drm_i915_gem_object *i915_gem_object_alloc(void);
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_region.c b/drivers/gpu/drm/i915/gem/i915_gem_region.c
index 3e3dad22a683..77dfa908f156 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_region.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_region.c
@@ -161,17 +161,7 @@ i915_gem_object_create_region(struct intel_memory_region *mem,
GEM_BUG_ON(!size);
GEM_BUG_ON(!IS_ALIGNED(size, I915_GTT_MIN_ALIGNMENT));
- /*
- * XXX: There is a prevalence of the assumption that we fit the
- * object's page count inside a 32bit _signed_ variable. Let's document
- * this and catch if we ever need to fix it. In the meantime, if you do
- * spot such a local variable, please consider fixing!
- */
-
- if (size >> PAGE_SHIFT > INT_MAX)
- return ERR_PTR(-E2BIG);
-
- if (overflows_type(size, obj->base.size))
+ if (i915_gem_object_size_2big(size))
return ERR_PTR(-E2BIG);
obj = i915_gem_object_alloc();
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
index f2eaed6aca3d..3e4785c2dfa2 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
@@ -770,21 +770,7 @@ i915_gem_userptr_ioctl(struct drm_device *dev,
I915_USERPTR_UNSYNCHRONIZED))
return -EINVAL;
- /*
- * XXX: There is a prevalence of the assumption that we fit the
- * object's page count inside a 32bit _signed_ variable. Let's document
- * this and catch if we ever need to fix it. In the meantime, if you do
- * spot such a local variable, please consider fixing!
- *
- * Aside from our own locals (for which we have no excuse!):
- * - sg_table embeds unsigned int for num_pages
- * - get_user_pages*() mixed ints with longs
- */
-
- if (args->user_size >> PAGE_SHIFT > INT_MAX)
- return -E2BIG;
-
- if (overflows_type(args->user_size, obj->base.size))
+ if (i915_gem_object_size_2big(args->user_size))
return -E2BIG;
if (!args->user_size)
--
2.26.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: don't trust the dma_buf->size
2021-01-22 18:15 [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: don't trust the dma_buf->size Matthew Auld
2021-01-22 18:15 ` [Intel-gfx] [PATCH 2/2] drm/i915: consolidate 2big error checking for object sizes Matthew Auld
@ 2021-01-22 18:24 ` Chris Wilson
2021-01-22 23:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2021-01-23 8:00 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
3 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2021-01-22 18:24 UTC (permalink / raw)
To: Matthew Auld, intel-gfx
Quoting Matthew Auld (2021-01-22 18:15:13)
> At least for the time being, we need to limit our object sizes such that
> the number of pages can fit within a 32b signed int. It looks like we
> should also apply the same restriction to any imported dma-buf.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
From behind the grumbling that we really should have sorted this out by
now,
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] 7+ messages in thread
* Re: [Intel-gfx] [PATCH 2/2] drm/i915: consolidate 2big error checking for object sizes
2021-01-22 18:15 ` [Intel-gfx] [PATCH 2/2] drm/i915: consolidate 2big error checking for object sizes Matthew Auld
@ 2021-01-22 18:25 ` Chris Wilson
0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2021-01-22 18:25 UTC (permalink / raw)
To: Matthew Auld, intel-gfx
Quoting Matthew Auld (2021-01-22 18:15:14)
> Throw it into a simple helper, and throw a warning if we encounter an
> object which has been initialised with an object size that exceeds our
> limit of INT_MAX pages.
>
> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
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] 7+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/dmabuf: don't trust the dma_buf->size
2021-01-22 18:15 [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: don't trust the dma_buf->size Matthew Auld
2021-01-22 18:15 ` [Intel-gfx] [PATCH 2/2] drm/i915: consolidate 2big error checking for object sizes Matthew Auld
2021-01-22 18:24 ` [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: don't trust the dma_buf->size Chris Wilson
@ 2021-01-22 23:11 ` Patchwork
2021-01-23 8:00 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2021-01-22 23:11 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 3741 bytes --]
== Series Details ==
Series: series starting with [1/2] drm/i915/dmabuf: don't trust the dma_buf->size
URL : https://patchwork.freedesktop.org/series/86192/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_9670 -> Patchwork_19466
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/index.html
Known issues
------------
Here are the changes found in Patchwork_19466 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_basic@query-info:
- fi-tgl-y: NOTRUN -> [SKIP][1] ([fdo#109315] / [i915#2575])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/fi-tgl-y/igt@amdgpu/amd_basic@query-info.html
* igt@amdgpu/amd_basic@userptr:
- fi-byt-j1900: NOTRUN -> [SKIP][2] ([fdo#109271]) +17 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/fi-byt-j1900/igt@amdgpu/amd_basic@userptr.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: [PASS][3] -> [DMESG-WARN][4] ([i915#2203]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html
* igt@prime_self_import@basic-with_one_bo_two_files:
- fi-tgl-y: [PASS][5] -> [DMESG-WARN][6] ([i915#402])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/fi-tgl-y/igt@prime_self_import@basic-with_one_bo_two_files.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/fi-tgl-y/igt@prime_self_import@basic-with_one_bo_two_files.html
#### Possible fixes ####
* igt@i915_pm_rpm@module-reload:
- fi-byt-j1900: [INCOMPLETE][7] ([i915#142] / [i915#2405]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/fi-byt-j1900/igt@i915_pm_rpm@module-reload.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/fi-byt-j1900/igt@i915_pm_rpm@module-reload.html
* igt@vgem_basic@setversion:
- fi-tgl-y: [DMESG-WARN][9] ([i915#402]) -> [PASS][10] +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/fi-tgl-y/igt@vgem_basic@setversion.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/fi-tgl-y/igt@vgem_basic@setversion.html
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[i915#142]: https://gitlab.freedesktop.org/drm/intel/issues/142
[i915#2203]: https://gitlab.freedesktop.org/drm/intel/issues/2203
[i915#2405]: https://gitlab.freedesktop.org/drm/intel/issues/2405
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
Participating hosts (41 -> 37)
------------------------------
Missing (4): fi-ilk-m540 fi-bsw-cyan fi-bdw-samus fi-hsw-4200u
Build changes
-------------
* Linux: CI_DRM_9670 -> Patchwork_19466
CI-20190529: 20190529
CI_DRM_9670: 85fd189b9fbfb6e7af8d956d37be012fdd6ae0ad @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5964: 0949766cb9846d7d55fac9cdf31d3d8e8ed1d0c6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19466: 259e3474d15797d48f89b71a9ccac99a9337385c @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
259e3474d157 drm/i915: consolidate 2big error checking for object sizes
f4653787f170 drm/i915/dmabuf: don't trust the dma_buf->size
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/index.html
[-- Attachment #1.2: Type: text/html, Size: 4566 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/2] drm/i915/dmabuf: don't trust the dma_buf->size
2021-01-22 18:15 [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: don't trust the dma_buf->size Matthew Auld
` (2 preceding siblings ...)
2021-01-22 23:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
@ 2021-01-23 8:00 ` Patchwork
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2021-01-23 8:00 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 20597 bytes --]
== Series Details ==
Series: series starting with [1/2] drm/i915/dmabuf: don't trust the dma_buf->size
URL : https://patchwork.freedesktop.org/series/86192/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_9670_full -> Patchwork_19466_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_19466_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_19466_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_19466_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_userptr_blits@input-checking:
- shard-skl: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl8/igt@gem_userptr_blits@input-checking.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl5/igt@gem_userptr_blits@input-checking.html
- shard-tglb: [PASS][3] -> [DMESG-WARN][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb3/igt@gem_userptr_blits@input-checking.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-tglb6/igt@gem_userptr_blits@input-checking.html
- shard-apl: [PASS][5] -> [DMESG-WARN][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-apl6/igt@gem_userptr_blits@input-checking.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-apl8/igt@gem_userptr_blits@input-checking.html
- shard-glk: [PASS][7] -> [DMESG-WARN][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-glk7/igt@gem_userptr_blits@input-checking.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-glk1/igt@gem_userptr_blits@input-checking.html
- shard-iclb: [PASS][9] -> [DMESG-WARN][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb2/igt@gem_userptr_blits@input-checking.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-iclb2/igt@gem_userptr_blits@input-checking.html
- shard-kbl: [PASS][11] -> [DMESG-WARN][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl3/igt@gem_userptr_blits@input-checking.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-kbl4/igt@gem_userptr_blits@input-checking.html
- shard-snb: [PASS][13] -> [DMESG-WARN][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-snb4/igt@gem_userptr_blits@input-checking.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-snb7/igt@gem_userptr_blits@input-checking.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* {igt@gem_create@create-massive}:
- shard-iclb: [PASS][15] -> [DMESG-WARN][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb4/igt@gem_create@create-massive.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-iclb5/igt@gem_create@create-massive.html
- shard-snb: [PASS][17] -> [DMESG-WARN][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-snb5/igt@gem_create@create-massive.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-snb4/igt@gem_create@create-massive.html
- shard-kbl: [PASS][19] -> [DMESG-WARN][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl3/igt@gem_create@create-massive.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-kbl4/igt@gem_create@create-massive.html
- shard-tglb: [PASS][21] -> [DMESG-WARN][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb7/igt@gem_create@create-massive.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-tglb7/igt@gem_create@create-massive.html
- shard-glk: [PASS][23] -> [DMESG-WARN][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-glk6/igt@gem_create@create-massive.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-glk4/igt@gem_create@create-massive.html
- shard-skl: [PASS][25] -> [DMESG-WARN][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl7/igt@gem_create@create-massive.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl3/igt@gem_create@create-massive.html
- shard-apl: [PASS][27] -> [DMESG-WARN][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-apl7/igt@gem_create@create-massive.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-apl1/igt@gem_create@create-massive.html
Known issues
------------
Here are the changes found in Patchwork_19466_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_fair@basic-none@vecs0:
- shard-apl: [PASS][29] -> [FAIL][30] ([i915#2842])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-apl4/igt@gem_exec_fair@basic-none@vecs0.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-apl1/igt@gem_exec_fair@basic-none@vecs0.html
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-tglb: [PASS][31] -> [FAIL][32] ([i915#2842]) +1 similar issue
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb7/igt@gem_exec_fair@basic-pace-share@rcs0.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-tglb7/igt@gem_exec_fair@basic-pace-share@rcs0.html
- shard-glk: [PASS][33] -> [FAIL][34] ([i915#2842])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-glk4/igt@gem_exec_fair@basic-pace-share@rcs0.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-glk2/igt@gem_exec_fair@basic-pace-share@rcs0.html
* igt@gem_exec_fair@basic-pace@vcs1:
- shard-iclb: NOTRUN -> [FAIL][35] ([i915#2842])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-iclb1/igt@gem_exec_fair@basic-pace@vcs1.html
* igt@gem_exec_schedule@u-fairslice@bcs0:
- shard-tglb: [PASS][36] -> [DMESG-WARN][37] ([i915#2803])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb1/igt@gem_exec_schedule@u-fairslice@bcs0.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-tglb2/igt@gem_exec_schedule@u-fairslice@bcs0.html
* igt@i915_pm_dc@dc6-dpms:
- shard-skl: NOTRUN -> [FAIL][38] ([i915#454])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl9/igt@i915_pm_dc@dc6-dpms.html
* igt@kms_async_flips@test-time-stamp:
- shard-tglb: [PASS][39] -> [FAIL][40] ([i915#2597])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb8/igt@kms_async_flips@test-time-stamp.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-tglb1/igt@kms_async_flips@test-time-stamp.html
* igt@kms_color_chamelium@pipe-invalid-degamma-lut-sizes:
- shard-skl: NOTRUN -> [SKIP][41] ([fdo#109271] / [fdo#111827]) +7 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl9/igt@kms_color_chamelium@pipe-invalid-degamma-lut-sizes.html
* igt@kms_cursor_crc@pipe-b-cursor-256x85-sliding:
- shard-skl: [PASS][42] -> [FAIL][43] ([i915#54])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl3/igt@kms_cursor_crc@pipe-b-cursor-256x85-sliding.html
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl3/igt@kms_cursor_crc@pipe-b-cursor-256x85-sliding.html
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-skl: [PASS][44] -> [FAIL][45] ([i915#2346])
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl3/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl4/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
* igt@kms_flip@2x-plain-flip-fb-recreate-interruptible:
- shard-skl: NOTRUN -> [SKIP][46] ([fdo#109271]) +47 similar issues
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl6/igt@kms_flip@2x-plain-flip-fb-recreate-interruptible.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible@a-edp1:
- shard-skl: [PASS][47] -> [FAIL][48] ([i915#79]) +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl1/igt@kms_flip@flip-vs-expired-vblank-interruptible@a-edp1.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl5/igt@kms_flip@flip-vs-expired-vblank-interruptible@a-edp1.html
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [PASS][49] -> [FAIL][50] ([i915#1188]) +1 similar issue
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl8/igt@kms_hdr@bpc-switch-dpms.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl2/igt@kms_hdr@bpc-switch-dpms.html
* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
- shard-skl: NOTRUN -> [FAIL][51] ([fdo#108145] / [i915#265])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl9/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max.html
* igt@kms_psr@psr2_primary_render:
- shard-iclb: [PASS][52] -> [SKIP][53] ([fdo#109441])
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb2/igt@kms_psr@psr2_primary_render.html
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-iclb8/igt@kms_psr@psr2_primary_render.html
* igt@perf@polling-parameterized:
- shard-skl: [PASS][54] -> [FAIL][55] ([i915#1542])
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl1/igt@perf@polling-parameterized.html
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl2/igt@perf@polling-parameterized.html
* igt@runner@aborted:
- shard-snb: NOTRUN -> ([FAIL][56], [FAIL][57]) ([i915#698])
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-snb4/igt@runner@aborted.html
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-snb7/igt@runner@aborted.html
#### Possible fixes ####
* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-kbl: [FAIL][58] ([i915#2842]) -> [PASS][59] +3 similar issues
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl3/igt@gem_exec_fair@basic-none-solo@rcs0.html
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-kbl4/igt@gem_exec_fair@basic-none-solo@rcs0.html
* igt@gem_exec_fair@basic-pace@bcs0:
- shard-iclb: [FAIL][60] ([i915#2842]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb3/igt@gem_exec_fair@basic-pace@bcs0.html
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-iclb1/igt@gem_exec_fair@basic-pace@bcs0.html
* igt@gem_exec_fair@basic-pace@rcs0:
- shard-tglb: [FAIL][62] ([i915#2842]) -> [PASS][63]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb7/igt@gem_exec_fair@basic-pace@rcs0.html
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-tglb8/igt@gem_exec_fair@basic-pace@rcs0.html
* igt@gem_exec_fair@basic-throttle@rcs0:
- shard-glk: [FAIL][64] ([i915#2842]) -> [PASS][65]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-glk4/igt@gem_exec_fair@basic-throttle@rcs0.html
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-glk6/igt@gem_exec_fair@basic-throttle@rcs0.html
* igt@gem_exec_whisper@basic-queues:
- shard-glk: [DMESG-WARN][66] ([i915#118] / [i915#95]) -> [PASS][67]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-glk7/igt@gem_exec_whisper@basic-queues.html
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-glk5/igt@gem_exec_whisper@basic-queues.html
* igt@gem_huc_copy@huc-copy:
- shard-tglb: [SKIP][68] ([i915#2190]) -> [PASS][69]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb6/igt@gem_huc_copy@huc-copy.html
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-tglb7/igt@gem_huc_copy@huc-copy.html
* igt@kms_cursor_crc@pipe-a-cursor-128x128-random:
- shard-skl: [FAIL][70] ([i915#54]) -> [PASS][71] +8 similar issues
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl5/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl6/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html
* igt@kms_cursor_legacy@flip-vs-cursor-varying-size:
- shard-tglb: [FAIL][72] ([i915#2346]) -> [PASS][73]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb8/igt@kms_cursor_legacy@flip-vs-cursor-varying-size.html
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-tglb1/igt@kms_cursor_legacy@flip-vs-cursor-varying-size.html
* igt@kms_flip@flip-vs-dpms-off-vs-modeset-interruptible@a-edp1:
- shard-skl: [DMESG-WARN][74] ([i915#1982]) -> [PASS][75] +1 similar issue
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl7/igt@kms_flip@flip-vs-dpms-off-vs-modeset-interruptible@a-edp1.html
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl3/igt@kms_flip@flip-vs-dpms-off-vs-modeset-interruptible@a-edp1.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1:
- shard-skl: [FAIL][76] ([i915#79]) -> [PASS][77]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl1/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1.html
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl5/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1.html
* igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1:
- shard-skl: [FAIL][78] ([i915#2122]) -> [PASS][79] +3 similar issues
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl9/igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1.html
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl1/igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
- shard-skl: [INCOMPLETE][80] ([i915#198]) -> [PASS][81]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl9/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html
* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-iclb: [SKIP][82] ([fdo#109441]) -> [PASS][83]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb5/igt@kms_psr@psr2_cursor_plane_onoff.html
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html
* igt@perf_pmu@module-unload:
- shard-skl: [DMESG-WARN][84] ([i915#1982] / [i915#262]) -> [PASS][85]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-skl3/igt@perf_pmu@module-unload.html
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-skl3/igt@perf_pmu@module-unload.html
#### Warnings ####
* igt@gem_exec_fair@basic-throttle@rcs0:
- shard-iclb: [FAIL][86] ([i915#2849]) -> [FAIL][87] ([i915#2842])
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb7/igt@gem_exec_fair@basic-throttle@rcs0.html
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-iclb6/igt@gem_exec_fair@basic-throttle@rcs0.html
* igt@i915_pm_rc6_residency@rc6-idle:
- shard-iclb: [WARN][88] ([i915#1804] / [i915#2684]) -> [WARN][89] ([i915#2684])
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb4/igt@i915_pm_rc6_residency@rc6-idle.html
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-iclb5/igt@i915_pm_rc6_residency@rc6-idle.html
* igt@kms_psr2_sf@plane-move-sf-dmg-area-2:
- shard-iclb: [SKIP][90] ([i915#658]) -> [SKIP][91] ([i915#2920])
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb5/igt@kms_psr2_sf@plane-move-sf-dmg-area-2.html
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-iclb2/igt@kms_psr2_sf@plane-move-sf-dmg-area-2.html
* igt@runner@aborted:
- shard-tglb: [FAIL][92] ([i915#1602] / [i915#2295] / [i915#2667]) -> ([FAIL][93], [FAIL][94], [FAIL][95], [FAIL][96]) ([i915#1602] / [i915#2295] / [i915#2426] / [i915#2667] / [i915#2803])
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb7/igt@runner@aborted.html
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-tglb2/igt@runner@aborted.html
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-tglb8/igt@runner@aborted.html
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-tglb6/igt@runner@aborted.html
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19466/shard-tglb7/igt@runner@aborted.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
[i915#1804]: https://gitlab.freedesktop.org/drm/intel/issues/1804
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2295]: https://gitlab.freedesktop.org/drm/intel/issues/2295
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2597]: https://gitlab.freedesktop.org/drm/intel/issues/2597
[i915#262]: https://gitlab.freedesktop.org/drm/intel/issues/262
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#2667]: https://gitlab.freedesktop.org/drm/intel/issues/2667
[i915#2684]: https://gitlab.freedesktop.org/drm/intel/issues/2684
[i915#2803]: https://gitlab.freedesktop.org/drm/intel/issues/2803
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2849]: https://gitlab.freedesktop.org/drm/intel/issues/2849
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#698]: https://gitlab.freedesktop.org/drm/intel/issues/698
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_9670 -> Patchwork_19466
CI-20190529: 20190529
CI_DRM_9670: 85fd189b9fbfb6e7af8d956d37be012fdd6ae0ad @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5964: 0949766cb9846d7d55fac9cdf31d3d8e8ed1d0c6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19466: 259e3474d15797d48f89b71a9ccac99a9337385c @ 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_19466/index.html
[-- Attachment #1.2: Type: text/html, Size: 23920 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: don't trust the dma_buf->size
@ 2021-01-22 17:35 Matthew Auld
0 siblings, 0 replies; 7+ messages in thread
From: Matthew Auld @ 2021-01-22 17:35 UTC (permalink / raw)
To: intel-gfx
At least for the time being, we need to limit our object sizes such that
the number of pages can fit within a 32b signed int. It looks like we
should also apply the same restriction to any imported dma-buf.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
index 04e9c04545ad..dc11497f830b 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
@@ -244,6 +244,16 @@ struct drm_gem_object *i915_gem_prime_import(struct drm_device *dev,
}
}
+ /*
+ * XXX: There is a prevalence of the assumption that we fit the
+ * object's page count inside a 32bit _signed_ variable. Let's document
+ * this and catch if we ever need to fix it. In the meantime, if you do
+ * spot such a local variable, please consider fixing!
+ */
+
+ if (dma_buf->size >> PAGE_SHIFT > INT_MAX)
+ return ERR_PTR(-E2BIG);
+
/* need to attach */
attach = dma_buf_attach(dma_buf, dev->dev);
if (IS_ERR(attach))
--
2.26.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-01-23 8:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 18:15 [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: don't trust the dma_buf->size Matthew Auld
2021-01-22 18:15 ` [Intel-gfx] [PATCH 2/2] drm/i915: consolidate 2big error checking for object sizes Matthew Auld
2021-01-22 18:25 ` Chris Wilson
2021-01-22 18:24 ` [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: don't trust the dma_buf->size Chris Wilson
2021-01-22 23:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2021-01-23 8:00 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2021-01-22 17:35 [Intel-gfx] [PATCH 1/2] " Matthew Auld
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.