All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test mmap_closed_bo
@ 2022-03-04  5:15 Chuansheng Liu
  2022-03-04  6:27 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Chuansheng Liu @ 2022-03-04  5:15 UTC (permalink / raw)
  To: igt-dev; +Cc: Tvrtko Ursulin

Recently we figured out one memory leak in i915 driver when running
below alike test:

create_bo
gem_mmap_gtt bo
gem_mmap_gtt bo twice
close_bo

then the memory leak is detected. More details can be referred in
https://patchwork.freedesktop.org/patch/475802/?series=100532&rev=2

For detecting such issue, this test case mmap_closed_bo is created,
it will close the bo with keeping one mmap, then second mmap the bo,
in normal situation, we expect second mmap failure with EACCESS. But
it will succeed if driver has the vm_node allowance leak.

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
---
 tests/i915/gem_mmap_gtt.c | 42 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
index 92bbb5d2..0f4d5385 100644
--- a/tests/i915/gem_mmap_gtt.c
+++ b/tests/i915/gem_mmap_gtt.c
@@ -318,6 +318,46 @@ test_wc(int fd)
 		     5*gtt_writes/256., 5*cpu_writes/256.);
 }
 
+static void mmap_closed_bo(int fd)
+{
+	struct drm_i915_gem_mmap_gtt mmap_arg;
+	void *p1, *p2;
+	int loop = 0, i = 0;
+
+	while (loop++ < 2) {
+		memset(&mmap_arg, 0, sizeof(mmap_arg));
+
+		mmap_arg.handle = gem_create(fd, OBJECT_SIZE);
+		igt_assert(mmap_arg.handle);
+
+		i = loop;
+		while (i--) {
+			/* get offset, here we tries a loop to call GEM_MMAP_GTT many times,
+			 * it could trigger driver memory leak issue easily.
+			 */
+			do_ioctl(fd, DRM_IOCTL_I915_GEM_MMAP_GTT, &mmap_arg);
+		}
+
+		p1 = mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE,
+			MAP_SHARED, fd, mmap_arg.offset);
+		igt_assert(p1 != MAP_FAILED);
+
+		gem_close(fd, mmap_arg.handle);
+		gem_quiescent_gpu(fd);
+
+		p2 = mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE,
+			MAP_SHARED, fd, mmap_arg.offset);
+
+		munmap(p1, OBJECT_SIZE);
+
+		/* we expect mmapping p2 would fail, otherwise the driver
+		 * may not clean up the allowance of vm_node, it would
+		 * cause memory leak.
+		 */
+		igt_assert(p2 == MAP_FAILED);
+	}
+}
+
 static int mmap_gtt_version(int i915)
 {
 	int val = 0;
@@ -1305,6 +1345,8 @@ igt_main
 		test_write(fd);
 	igt_subtest("basic-write-gtt")
 		test_write_gtt(fd);
+	igt_subtest("mmap_closed_bo")
+		mmap_closed_bo(fd);
 	igt_subtest("ptrace")
 		test_ptrace(fd);
 	igt_subtest("coherency")
-- 
2.25.0.rc2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for tests/gem_mmap_gtt: add test mmap_closed_bo
  2022-03-04  5:15 [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test mmap_closed_bo Chuansheng Liu
@ 2022-03-04  6:27 ` Patchwork
  2022-03-04 16:35 ` [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
  2022-03-04 18:09 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
  2 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2022-03-04  6:27 UTC (permalink / raw)
  To: Chuansheng Liu; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 3048 bytes --]

== Series Details ==

Series: tests/gem_mmap_gtt: add test mmap_closed_bo
URL   : https://patchwork.freedesktop.org/series/101035/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11325 -> IGTPW_6739
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/index.html

Participating hosts (45 -> 44)
------------------------------

  Additional (1): fi-pnv-d510 
  Missing    (2): fi-bsw-cyan fi-bdw-samus 

Known issues
------------

  Here are the changes found in IGTPW_6739 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@prime_vgem@basic-userptr:
    - fi-pnv-d510:        NOTRUN -> [SKIP][1] ([fdo#109271]) +57 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/fi-pnv-d510/igt@prime_vgem@basic-userptr.html

  * igt@runner@aborted:
    - fi-bdw-5557u:       NOTRUN -> [FAIL][2] ([i915#2426] / [i915#4312])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/fi-bdw-5557u/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@hangcheck:
    - bat-dg1-5:          [DMESG-FAIL][3] ([i915#4494] / [i915#4957]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/bat-dg1-5/igt@i915_selftest@live@hangcheck.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/bat-dg1-5/igt@i915_selftest@live@hangcheck.html

  
#### Warnings ####

  * igt@i915_selftest@live@hangcheck:
    - bat-dg1-6:          [DMESG-FAIL][5] ([i915#4494] / [i915#4957]) -> [DMESG-FAIL][6] ([i915#4957])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/bat-dg1-6/igt@i915_selftest@live@hangcheck.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/bat-dg1-6/igt@i915_selftest@live@hangcheck.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
  [i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494
  [i915#4957]: https://gitlab.freedesktop.org/drm/intel/issues/4957
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_6362 -> IGTPW_6739

  CI-20190529: 20190529
  CI_DRM_11325: 332be8ce9631bce29763a2b43ff217b1bb926aea @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_6739: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/index.html
  IGT_6362: 698695136f8ade2391f2d8f45300eae2df02e947 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git



== Testlist changes ==

+igt@gem_mmap_gtt@mmap_closed_bo

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/index.html

[-- Attachment #2: Type: text/html, Size: 3803 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test mmap_closed_bo
  2022-03-04  5:15 [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test mmap_closed_bo Chuansheng Liu
  2022-03-04  6:27 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2022-03-04 16:35 ` Tvrtko Ursulin
  2022-03-07  1:02   ` Liu, Chuansheng
  2022-03-04 18:09 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
  2 siblings, 1 reply; 8+ messages in thread
From: Tvrtko Ursulin @ 2022-03-04 16:35 UTC (permalink / raw)
  To: Chuansheng Liu, igt-dev; +Cc: Tvrtko Ursulin


Hi,

Some nits, some questions below.

On 04/03/2022 05:15, Chuansheng Liu wrote:
> Recently we figured out one memory leak in i915 driver when running
> below alike test:
> 
> create_bo
> gem_mmap_gtt bo
> gem_mmap_gtt bo twice
> close_bo
> 
> then the memory leak is detected. More details can be referred in
> https://patchwork.freedesktop.org/patch/475802/?series=100532&rev=2
> 
> For detecting such issue, this test case mmap_closed_bo is created,
> it will close the bo with keeping one mmap, then second mmap the bo,
> in normal situation, we expect second mmap failure with EACCESS. But
> it will succeed if driver has the vm_node allowance leak.
> 
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
> ---
>   tests/i915/gem_mmap_gtt.c | 42 +++++++++++++++++++++++++++++++++++++++
>   1 file changed, 42 insertions(+)
> 
> diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
> index 92bbb5d2..0f4d5385 100644
> --- a/tests/i915/gem_mmap_gtt.c
> +++ b/tests/i915/gem_mmap_gtt.c
> @@ -318,6 +318,46 @@ test_wc(int fd)
>   		     5*gtt_writes/256., 5*cpu_writes/256.);
>   }
>   
> +static void mmap_closed_bo(int fd)
> +{
> +	struct drm_i915_gem_mmap_gtt mmap_arg;
> +	void *p1, *p2;
> +	int loop = 0, i = 0;

Nits - don't need to init i, mmap_arg, p1 and p2 could be declared in 
the loop.

> +
> +	while (loop++ < 2) {
> +		memset(&mmap_arg, 0, sizeof(mmap_arg));
> +
> +		mmap_arg.handle = gem_create(fd, OBJECT_SIZE);
> +		igt_assert(mmap_arg.handle);
> +
> +		i = loop;
> +		while (i--) {
> +			/* get offset, here we tries a loop to call GEM_MMAP_GTT many times,

If I may suggest:

/*
  * Get mmap offset by calling GEM_MMAP_GTT one or multiple times in
  * order to try to provoke a memory leak in the driver.
  */

> +			 * it could trigger driver memory leak issue easily.
> +			 */
> +			do_ioctl(fd, DRM_IOCTL_I915_GEM_MMAP_GTT, &mmap_arg);
> +		}
> +
> +		p1 = mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE,
> +			MAP_SHARED, fd, mmap_arg.offset);
> +		igt_assert(p1 != MAP_FAILED);
> +
> +		gem_close(fd, mmap_arg.handle);
> +		gem_quiescent_gpu(fd);

What is quiescent for? I usually expect to see it when test created some 
GPU activity, which isn't the case here. If there is a subtle reason 
please put a comment here.

> +
> +		p2 = mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE,
> +			MAP_SHARED, fd, mmap_arg.offset);
> +
> +		munmap(p1, OBJECT_SIZE);
> +
> +		/* we expect mmapping p2 would fail, otherwise the driver
> +		 * may not clean up the allowance of vm_node, it would
> +		 * cause memory leak.
> +		 */
> +		igt_assert(p2 == MAP_FAILED);

I get this - mmap(p2) should fail after object close regardless of how 
many time DRM_IOCTL_I915_GEM_MMAP_GTT was called.

Excellent that you found a way to test for the leak without the need for 
kmemleak! At least that's how I read the posting of this test. :)

Regards,

Tvrtko

> +	}
> +}
> +
>   static int mmap_gtt_version(int i915)
>   {
>   	int val = 0;
> @@ -1305,6 +1345,8 @@ igt_main
>   		test_write(fd);
>   	igt_subtest("basic-write-gtt")
>   		test_write_gtt(fd);
> +	igt_subtest("mmap_closed_bo")
> +		mmap_closed_bo(fd);
>   	igt_subtest("ptrace")
>   		test_ptrace(fd);
>   	igt_subtest("coherency")

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for tests/gem_mmap_gtt: add test mmap_closed_bo
  2022-03-04  5:15 [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test mmap_closed_bo Chuansheng Liu
  2022-03-04  6:27 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2022-03-04 16:35 ` [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
@ 2022-03-04 18:09 ` Patchwork
  2 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2022-03-04 18:09 UTC (permalink / raw)
  To: Chuansheng Liu; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 30261 bytes --]

== Series Details ==

Series: tests/gem_mmap_gtt: add test mmap_closed_bo
URL   : https://patchwork.freedesktop.org/series/101035/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11325_full -> IGTPW_6739_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/index.html

Participating hosts (13 -> 8)
------------------------------

  Missing    (5): pig-kbl-iris pig-glk-j5005 pig-skl-6260u shard-rkl shard-dg1 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_6739_full:

### IGT changes ###

#### Possible regressions ####

  * {igt@gem_mmap_gtt@mmap_closed_bo} (NEW):
    - shard-kbl:          NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-kbl6/igt@gem_mmap_gtt@mmap_closed_bo.html
    - shard-tglb:         NOTRUN -> [FAIL][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb1/igt@gem_mmap_gtt@mmap_closed_bo.html
    - shard-snb:          NOTRUN -> [FAIL][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-snb6/igt@gem_mmap_gtt@mmap_closed_bo.html
    - shard-apl:          NOTRUN -> [FAIL][4]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl1/igt@gem_mmap_gtt@mmap_closed_bo.html
    - shard-iclb:         NOTRUN -> [FAIL][5]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb1/igt@gem_mmap_gtt@mmap_closed_bo.html
    - shard-glk:          NOTRUN -> [FAIL][6]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-glk9/igt@gem_mmap_gtt@mmap_closed_bo.html

  
New tests
---------

  New tests have been introduced between CI_DRM_11325_full and IGTPW_6739_full:

### New IGT tests (1) ###

  * igt@gem_mmap_gtt@mmap_closed_bo:
    - Statuses : 6 fail(s)
    - Exec time: [0.02, 0.16] s

  

Known issues
------------

  Here are the changes found in IGTPW_6739_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_param@set-priority-not-supported:
    - shard-tglb:         NOTRUN -> [SKIP][7] ([fdo#109314])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb7/igt@gem_ctx_param@set-priority-not-supported.html

  * igt@gem_ctx_sseu@engines:
    - shard-tglb:         NOTRUN -> [SKIP][8] ([i915#280])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb5/igt@gem_ctx_sseu@engines.html

  * igt@gem_exec_balancer@parallel:
    - shard-iclb:         NOTRUN -> [DMESG-WARN][9] ([i915#5076])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb2/igt@gem_exec_balancer@parallel.html

  * igt@gem_exec_balancer@parallel-balancer:
    - shard-iclb:         [PASS][10] -> [SKIP][11] ([i915#4525])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-iclb1/igt@gem_exec_balancer@parallel-balancer.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb3/igt@gem_exec_balancer@parallel-balancer.html

  * igt@gem_exec_balancer@parallel-bb-first:
    - shard-tglb:         NOTRUN -> [DMESG-WARN][12] ([i915#5076]) +1 similar issue
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb2/igt@gem_exec_balancer@parallel-bb-first.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-iclb:         [PASS][13] -> [FAIL][14] ([i915#2842])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-iclb5/igt@gem_exec_fair@basic-none-share@rcs0.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb7/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-pace@bcs0:
    - shard-tglb:         [PASS][15] -> [FAIL][16] ([i915#2842])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-tglb5/igt@gem_exec_fair@basic-pace@bcs0.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb3/igt@gem_exec_fair@basic-pace@bcs0.html

  * igt@gem_exec_fair@basic-pace@vcs1:
    - shard-iclb:         NOTRUN -> [FAIL][17] ([i915#2842])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb4/igt@gem_exec_fair@basic-pace@vcs1.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-glk:          [PASS][18] -> [FAIL][19] ([i915#2842]) +3 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-glk3/igt@gem_exec_fair@basic-pace@vecs0.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-glk4/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_lmem_swapping@heavy-random:
    - shard-tglb:         NOTRUN -> [SKIP][20] ([i915#4613]) +1 similar issue
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb2/igt@gem_lmem_swapping@heavy-random.html

  * igt@gem_lmem_swapping@random:
    - shard-kbl:          NOTRUN -> [SKIP][21] ([fdo#109271] / [i915#4613]) +1 similar issue
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-kbl7/igt@gem_lmem_swapping@random.html
    - shard-iclb:         NOTRUN -> [SKIP][22] ([i915#4613])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb4/igt@gem_lmem_swapping@random.html

  * igt@gem_media_vme:
    - shard-tglb:         NOTRUN -> [SKIP][23] ([i915#284])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb3/igt@gem_media_vme.html

  * igt@gem_pread@exhaustion:
    - shard-tglb:         NOTRUN -> [WARN][24] ([i915#2658])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb5/igt@gem_pread@exhaustion.html
    - shard-iclb:         NOTRUN -> [WARN][25] ([i915#2658])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb6/igt@gem_pread@exhaustion.html
    - shard-kbl:          NOTRUN -> [WARN][26] ([i915#2658])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-kbl1/igt@gem_pread@exhaustion.html

  * igt@gem_pxp@fail-invalid-protected-context:
    - shard-tglb:         NOTRUN -> [SKIP][27] ([i915#4270]) +1 similar issue
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb7/igt@gem_pxp@fail-invalid-protected-context.html

  * igt@gem_pxp@protected-raw-src-copy-not-readible:
    - shard-iclb:         NOTRUN -> [SKIP][28] ([i915#4270])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb1/igt@gem_pxp@protected-raw-src-copy-not-readible.html

  * igt@gem_render_copy@y-tiled-to-vebox-linear:
    - shard-iclb:         NOTRUN -> [SKIP][29] ([i915#768]) +1 similar issue
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb6/igt@gem_render_copy@y-tiled-to-vebox-linear.html

  * igt@gem_softpin@allocator-evict-all-engines:
    - shard-glk:          [PASS][30] -> [FAIL][31] ([i915#4171])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-glk9/igt@gem_softpin@allocator-evict-all-engines.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-glk1/igt@gem_softpin@allocator-evict-all-engines.html

  * igt@gem_softpin@evict-snoop:
    - shard-tglb:         NOTRUN -> [SKIP][32] ([fdo#109312])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb2/igt@gem_softpin@evict-snoop.html

  * igt@gem_userptr_blits@input-checking:
    - shard-iclb:         NOTRUN -> [DMESG-WARN][33] ([i915#4991])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb6/igt@gem_userptr_blits@input-checking.html

  * igt@gen7_exec_parse@basic-allowed:
    - shard-tglb:         NOTRUN -> [SKIP][34] ([fdo#109289]) +3 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb5/igt@gen7_exec_parse@basic-allowed.html

  * igt@gen9_exec_parse@bb-chained:
    - shard-iclb:         NOTRUN -> [SKIP][35] ([i915#2856]) +1 similar issue
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb6/igt@gen9_exec_parse@bb-chained.html

  * igt@gen9_exec_parse@bb-large:
    - shard-tglb:         NOTRUN -> [SKIP][36] ([i915#2527] / [i915#2856]) +2 similar issues
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb6/igt@gen9_exec_parse@bb-large.html

  * igt@i915_pm_dc@dc9-dpms:
    - shard-tglb:         NOTRUN -> [SKIP][37] ([i915#4281])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb1/igt@i915_pm_dc@dc9-dpms.html
    - shard-apl:          [PASS][38] -> [SKIP][39] ([fdo#109271])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-apl6/igt@i915_pm_dc@dc9-dpms.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl6/igt@i915_pm_dc@dc9-dpms.html

  * igt@i915_pm_rc6_residency@media-rc6-accuracy:
    - shard-tglb:         NOTRUN -> [SKIP][40] ([fdo#109289] / [fdo#111719])
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb5/igt@i915_pm_rc6_residency@media-rc6-accuracy.html

  * igt@i915_pm_rpm@dpms-mode-unset-non-lpsp:
    - shard-tglb:         NOTRUN -> [SKIP][41] ([fdo#111644] / [i915#1397] / [i915#2411]) +1 similar issue
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb7/igt@i915_pm_rpm@dpms-mode-unset-non-lpsp.html

  * igt@i915_query@query-topology-known-pci-ids:
    - shard-tglb:         NOTRUN -> [SKIP][42] ([fdo#109303])
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb2/igt@i915_query@query-topology-known-pci-ids.html

  * igt@i915_selftest@live@gt_lrc:
    - shard-tglb:         NOTRUN -> [DMESG-FAIL][43] ([i915#2373])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb6/igt@i915_selftest@live@gt_lrc.html

  * igt@i915_selftest@live@gt_pm:
    - shard-tglb:         NOTRUN -> [DMESG-FAIL][44] ([i915#1759])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb6/igt@i915_selftest@live@gt_pm.html

  * igt@kms_big_fb@linear-16bpp-rotate-270:
    - shard-tglb:         NOTRUN -> [SKIP][45] ([fdo#111614]) +2 similar issues
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb3/igt@kms_big_fb@linear-16bpp-rotate-270.html

  * igt@kms_big_fb@linear-32bpp-rotate-0:
    - shard-glk:          [PASS][46] -> [DMESG-WARN][47] ([i915#118]) +1 similar issue
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-glk6/igt@kms_big_fb@linear-32bpp-rotate-0.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-glk7/igt@kms_big_fb@linear-32bpp-rotate-0.html

  * igt@kms_big_fb@linear-64bpp-rotate-270:
    - shard-iclb:         NOTRUN -> [SKIP][48] ([fdo#110725] / [fdo#111614])
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb7/igt@kms_big_fb@linear-64bpp-rotate-270.html

  * igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-hflip:
    - shard-kbl:          NOTRUN -> [SKIP][49] ([fdo#109271] / [i915#3777]) +2 similar issues
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-kbl3/igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-hflip.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip:
    - shard-apl:          NOTRUN -> [SKIP][50] ([fdo#109271] / [i915#3777])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl8/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip:
    - shard-glk:          NOTRUN -> [SKIP][51] ([fdo#109271] / [i915#3777]) +1 similar issue
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-glk6/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip.html

  * igt@kms_big_fb@yf-tiled-addfb-size-overflow:
    - shard-tglb:         NOTRUN -> [SKIP][52] ([fdo#111615]) +3 similar issues
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb7/igt@kms_big_fb@yf-tiled-addfb-size-overflow.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180:
    - shard-iclb:         NOTRUN -> [SKIP][53] ([fdo#110723])
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb8/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180.html

  * igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_mc_ccs:
    - shard-apl:          NOTRUN -> [SKIP][54] ([fdo#109271] / [i915#3886]) +1 similar issue
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl4/igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc:
    - shard-iclb:         NOTRUN -> [SKIP][55] ([fdo#109278] / [i915#3886]) +1 similar issue
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb8/igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_gen12_rc_ccs_cc:
    - shard-kbl:          NOTRUN -> [SKIP][56] ([fdo#109271] / [i915#3886]) +4 similar issues
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-kbl3/igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][57] ([i915#3689] / [i915#3886])
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb7/igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-c-bad-aux-stride-y_tiled_gen12_rc_ccs_cc:
    - shard-glk:          NOTRUN -> [SKIP][58] ([fdo#109271] / [i915#3886])
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-glk7/igt@kms_ccs@pipe-c-bad-aux-stride-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-c-bad-rotation-90-yf_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][59] ([fdo#111615] / [i915#3689]) +3 similar issues
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb5/igt@kms_ccs@pipe-c-bad-rotation-90-yf_tiled_ccs.html

  * igt@kms_ccs@pipe-d-ccs-on-another-bo-y_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][60] ([i915#3689]) +8 similar issues
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb6/igt@kms_ccs@pipe-d-ccs-on-another-bo-y_tiled_ccs.html

  * igt@kms_ccs@pipe-d-crc-primary-rotation-180-y_tiled_gen12_mc_ccs:
    - shard-glk:          NOTRUN -> [SKIP][61] ([fdo#109271]) +24 similar issues
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-glk2/igt@kms_ccs@pipe-d-crc-primary-rotation-180-y_tiled_gen12_mc_ccs.html

  * igt@kms_chamelium@hdmi-audio-edid:
    - shard-kbl:          NOTRUN -> [SKIP][62] ([fdo#109271] / [fdo#111827]) +11 similar issues
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-kbl4/igt@kms_chamelium@hdmi-audio-edid.html

  * igt@kms_chamelium@hdmi-edid-read:
    - shard-tglb:         NOTRUN -> [SKIP][63] ([fdo#109284] / [fdo#111827]) +11 similar issues
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb8/igt@kms_chamelium@hdmi-edid-read.html

  * igt@kms_color@pipe-d-degamma:
    - shard-iclb:         NOTRUN -> [SKIP][64] ([fdo#109278] / [i915#1149])
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb3/igt@kms_color@pipe-d-degamma.html

  * igt@kms_color_chamelium@pipe-a-ctm-red-to-blue:
    - shard-iclb:         NOTRUN -> [SKIP][65] ([fdo#109284] / [fdo#111827]) +1 similar issue
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb8/igt@kms_color_chamelium@pipe-a-ctm-red-to-blue.html

  * igt@kms_color_chamelium@pipe-d-ctm-negative:
    - shard-iclb:         NOTRUN -> [SKIP][66] ([fdo#109278] / [fdo#109284] / [fdo#111827])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb6/igt@kms_color_chamelium@pipe-d-ctm-negative.html

  * igt@kms_color_chamelium@pipe-d-ctm-red-to-blue:
    - shard-apl:          NOTRUN -> [SKIP][67] ([fdo#109271] / [fdo#111827]) +1 similar issue
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl8/igt@kms_color_chamelium@pipe-d-ctm-red-to-blue.html

  * igt@kms_content_protection@content_type_change:
    - shard-tglb:         NOTRUN -> [SKIP][68] ([i915#1063])
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb1/igt@kms_content_protection@content_type_change.html

  * igt@kms_content_protection@lic:
    - shard-apl:          NOTRUN -> [TIMEOUT][69] ([i915#1319])
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl1/igt@kms_content_protection@lic.html

  * igt@kms_cursor_crc@pipe-b-cursor-512x512-sliding:
    - shard-tglb:         NOTRUN -> [SKIP][70] ([fdo#109279] / [i915#3359])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb3/igt@kms_cursor_crc@pipe-b-cursor-512x512-sliding.html

  * igt@kms_cursor_crc@pipe-b-cursor-suspend:
    - shard-apl:          [PASS][71] -> [DMESG-WARN][72] ([i915#180]) +2 similar issues
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-apl4/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl6/igt@kms_cursor_crc@pipe-b-cursor-suspend.html

  * igt@kms_cursor_crc@pipe-c-cursor-32x32-onscreen:
    - shard-tglb:         NOTRUN -> [SKIP][73] ([i915#3319]) +2 similar issues
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb2/igt@kms_cursor_crc@pipe-c-cursor-32x32-onscreen.html

  * igt@kms_cursor_crc@pipe-c-cursor-max-size-onscreen:
    - shard-tglb:         NOTRUN -> [SKIP][74] ([i915#3359]) +6 similar issues
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb1/igt@kms_cursor_crc@pipe-c-cursor-max-size-onscreen.html

  * igt@kms_cursor_crc@pipe-c-cursor-suspend:
    - shard-kbl:          NOTRUN -> [DMESG-WARN][75] ([i915#180])
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-kbl4/igt@kms_cursor_crc@pipe-c-cursor-suspend.html

  * igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
    - shard-iclb:         NOTRUN -> [SKIP][76] ([fdo#109274] / [fdo#109278]) +1 similar issue
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb6/igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - shard-tglb:         NOTRUN -> [SKIP][77] ([i915#4103]) +1 similar issue
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_cursor_legacy@pipe-d-torture-bo:
    - shard-apl:          NOTRUN -> [SKIP][78] ([fdo#109271] / [i915#533])
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl4/igt@kms_cursor_legacy@pipe-d-torture-bo.html

  * igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions-varying-size:
    - shard-snb:          [PASS][79] -> [SKIP][80] ([fdo#109271]) +1 similar issue
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-snb6/igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions-varying-size.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-snb4/igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions-varying-size.html

  * igt@kms_dither@fb-8bpc-vs-panel-8bpc@edp-1-pipe-a:
    - shard-tglb:         NOTRUN -> [SKIP][81] ([i915#3788])
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb7/igt@kms_dither@fb-8bpc-vs-panel-8bpc@edp-1-pipe-a.html

  * igt@kms_flip@2x-flip-vs-modeset:
    - shard-iclb:         NOTRUN -> [SKIP][82] ([fdo#109274])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb6/igt@kms_flip@2x-flip-vs-modeset.html

  * igt@kms_flip@2x-plain-flip-interruptible:
    - shard-tglb:         NOTRUN -> [SKIP][83] ([fdo#109274] / [fdo#111825]) +8 similar issues
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb5/igt@kms_flip@2x-plain-flip-interruptible.html

  * igt@kms_flip@2x-plain-flip-ts-check-interruptible@bc-hdmi-a1-hdmi-a2:
    - shard-glk:          [PASS][84] -> [FAIL][85] ([i915#2122])
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-glk6/igt@kms_flip@2x-plain-flip-ts-check-interruptible@bc-hdmi-a1-hdmi-a2.html
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-glk4/igt@kms_flip@2x-plain-flip-ts-check-interruptible@bc-hdmi-a1-hdmi-a2.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-upscaling:
    - shard-tglb:         NOTRUN -> [SKIP][86] ([i915#2587])
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-upscaling.html

  * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile-downscaling:
    - shard-iclb:         [PASS][87] -> [SKIP][88] ([i915#3701])
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-iclb8/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile-downscaling.html
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile-downscaling.html

  * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs-upscaling:
    - shard-iclb:         NOTRUN -> [SKIP][89] ([i915#2587])
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb5/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs-upscaling.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-render:
    - shard-snb:          NOTRUN -> [SKIP][90] ([fdo#109271]) +49 similar issues
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-snb7/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-render.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-indfb-draw-mmap-wc:
    - shard-iclb:         NOTRUN -> [SKIP][91] ([fdo#109280]) +9 similar issues
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb4/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-indfb-draw-mmap-wc.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-shrfb-plflip-blt:
    - shard-tglb:         NOTRUN -> [SKIP][92] ([fdo#109280] / [fdo#111825]) +29 similar issues
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb7/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-shrfb-plflip-blt.html

  * igt@kms_frontbuffer_tracking@psr-2p-primscrn-pri-indfb-draw-blt:
    - shard-apl:          NOTRUN -> [SKIP][93] ([fdo#109271]) +63 similar issues
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl6/igt@kms_frontbuffer_tracking@psr-2p-primscrn-pri-indfb-draw-blt.html

  * igt@kms_pipe_b_c_ivb@disable-pipe-b-enable-pipe-c:
    - shard-iclb:         NOTRUN -> [SKIP][94] ([fdo#109289]) +1 similar issue
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb8/igt@kms_pipe_b_c_ivb@disable-pipe-b-enable-pipe-c.html

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-d:
    - shard-kbl:          NOTRUN -> [SKIP][95] ([fdo#109271] / [i915#533])
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-kbl3/igt@kms_pipe_crc_basic@hang-read-crc-pipe-d.html

  * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max:
    - shard-glk:          NOTRUN -> [FAIL][96] ([fdo#108145] / [i915#265])
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-glk3/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max.html
    - shard-apl:          NOTRUN -> [FAIL][97] ([fdo#108145] / [i915#265])
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl4/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max.html

  * igt@kms_plane_alpha_blend@pipe-d-constant-alpha-max:
    - shard-iclb:         NOTRUN -> [SKIP][98] ([fdo#109278]) +25 similar issues
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb7/igt@kms_plane_alpha_blend@pipe-d-constant-alpha-max.html

  * igt@kms_plane_lowres@pipe-a-tiling-y:
    - shard-iclb:         NOTRUN -> [SKIP][99] ([i915#3536])
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb4/igt@kms_plane_lowres@pipe-a-tiling-y.html
    - shard-tglb:         NOTRUN -> [SKIP][100] ([i915#3536]) +2 similar issues
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb6/igt@kms_plane_lowres@pipe-a-tiling-y.html

  * igt@kms_plane_lowres@pipe-d-tiling-yf:
    - shard-tglb:         NOTRUN -> [SKIP][101] ([fdo#111615] / [fdo#112054])
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb6/igt@kms_plane_lowres@pipe-d-tiling-yf.html

  * igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-b-edp-1-scaler-with-clipping-clamping:
    - shard-iclb:         [PASS][102] -> [INCOMPLETE][103] ([i915#5243])
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-iclb6/igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-b-edp-1-scaler-with-clipping-clamping.html
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb2/igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-b-edp-1-scaler-with-clipping-clamping.html

  * igt@kms_psr@psr2_sprite_mmap_cpu:
    - shard-tglb:         NOTRUN -> [FAIL][104] ([i915#132] / [i915#3467]) +1 similar issue
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb2/igt@kms_psr@psr2_sprite_mmap_cpu.html
    - shard-iclb:         NOTRUN -> [SKIP][105] ([fdo#109441])
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb5/igt@kms_psr@psr2_sprite_mmap_cpu.html

  * igt@kms_psr@psr2_sprite_mmap_gtt:
    - shard-iclb:         [PASS][106] -> [SKIP][107] ([fdo#109441]) +1 similar issue
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb1/igt@kms_psr@psr2_sprite_mmap_gtt.html

  * igt@kms_scaling_modes@scaling-mode-full-aspect:
    - shard-kbl:          NOTRUN -> [SKIP][108] ([fdo#109271]) +127 similar issues
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-kbl3/igt@kms_scaling_modes@scaling-mode-full-aspect.html

  * igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-a:
    - shard-tglb:         NOTRUN -> [SKIP][109] ([i915#5030]) +3 similar issues
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb6/igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-a.html

  * igt@kms_setmode@basic:
    - shard-apl:          [PASS][110] -> [FAIL][111] ([i915#31])
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-apl4/igt@kms_setmode@basic.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl2/igt@kms_setmode@basic.html

  * igt@kms_writeback@writeback-invalid-parameters:
    - shard-apl:          NOTRUN -> [SKIP][112] ([fdo#109271] / [i915#2437])
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl6/igt@kms_writeback@writeback-invalid-parameters.html

  * igt@nouveau_crc@pipe-c-source-outp-complete:
    - shard-tglb:         NOTRUN -> [SKIP][113] ([i915#2530]) +3 similar issues
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb2/igt@nouveau_crc@pipe-c-source-outp-complete.html

  * igt@perf_pmu@event-wait@rcs0:
    - shard-iclb:         NOTRUN -> [SKIP][114] ([fdo#112283])
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb1/igt@perf_pmu@event-wait@rcs0.html
    - shard-tglb:         NOTRUN -> [SKIP][115] ([fdo#112283])
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb1/igt@perf_pmu@event-wait@rcs0.html

  * igt@prime_nv_api@i915_nv_double_import:
    - shard-tglb:         NOTRUN -> [SKIP][116] ([fdo#109291]) +3 similar issues
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb7/igt@prime_nv_api@i915_nv_double_import.html

  * igt@prime_nv_test@nv_i915_sharing:
    - shard-iclb:         NOTRUN -> [SKIP][117] ([fdo#109291]) +1 similar issue
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb8/igt@prime_nv_test@nv_i915_sharing.html

  * igt@sysfs_clients@sema-25:
    - shard-kbl:          NOTRUN -> [SKIP][118] ([fdo#109271] / [i915#2994])
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-kbl4/igt@sysfs_clients@sema-25.html
    - shard-tglb:         NOTRUN -> [SKIP][119] ([i915#2994])
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb6/igt@sysfs_clients@sema-25.html

  
#### Possible fixes ####

  * igt@gem_eio@unwedge-stress:
    - shard-iclb:         [TIMEOUT][120] ([i915#2481] / [i915#3070]) -> [PASS][121]
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-iclb2/igt@gem_eio@unwedge-stress.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-iclb6/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_endless@dispatch@bcs0:
    - shard-tglb:         [INCOMPLETE][122] ([i915#3778]) -> [PASS][123]
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-tglb6/igt@gem_exec_endless@dispatch@bcs0.html
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-tglb6/igt@gem_exec_endless@dispatch@bcs0.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-glk:          [FAIL][124] ([i915#2842]) -> [PASS][125]
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-glk9/igt@gem_exec_fair@basic-none-share@rcs0.html
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-glk2/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-none@vcs0:
    - shard-kbl:          [FAIL][126] ([i915#2842]) -> [PASS][127]
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-kbl4/igt@gem_exec_fair@basic-none@vcs0.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-kbl6/igt@gem_exec_fair@basic-none@vcs0.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
    - shard-apl:          [FAIL][128] ([i915#2842]) -> [PASS][129]
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-apl1/igt@gem_exec_fair@basic-pace-solo@rcs0.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-apl6/igt@gem_exec_fair@basic-pace-solo@rcs0.html

  * igt@gem_workarounds@suspend-resume-fd:
    - shard-snb:          [TIMEOUT][130] -> [PASS][131]
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11325/shard-snb5/igt@gem_workarounds@suspend-resume-fd.html
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/shard-snb5/igt@gem_workarounds@suspend-resume-fd.html

  * igt@i915_selftest@live@hangcheck:
    - shard-snb:          [INCOMPLETE][132]

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6739/index.html

[-- Attachment #2: Type: text/html, Size: 33875 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test mmap_closed_bo
  2022-03-04 16:35 ` [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
@ 2022-03-07  1:02   ` Liu, Chuansheng
  2022-03-07 10:10     ` Tvrtko Ursulin
  0 siblings, 1 reply; 8+ messages in thread
From: Liu, Chuansheng @ 2022-03-07  1:02 UTC (permalink / raw)
  To: Tvrtko Ursulin, igt-dev; +Cc: Ursulin, Tvrtko

Hi Tvrtko,

Thanks for review, please see my comments below.

> -----Original Message-----
> From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Sent: Saturday, March 5, 2022 12:35 AM
> To: Liu, Chuansheng <chuansheng.liu@intel.com>; igt-
> dev@lists.freedesktop.org
> Cc: Ursulin, Tvrtko <tvrtko.ursulin@intel.com>
> Subject: Re: [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test
> mmap_closed_bo
> 
> 
> Hi,
> 
> Some nits, some questions below.
> 
> On 04/03/2022 05:15, Chuansheng Liu wrote:
> > Recently we figured out one memory leak in i915 driver when running
> > below alike test:
> >
> > create_bo
> > gem_mmap_gtt bo
> > gem_mmap_gtt bo twice
> > close_bo
> >
> > then the memory leak is detected. More details can be referred in
> > https://patchwork.freedesktop.org/patch/475802/?series=100532&rev=2
> >
> > For detecting such issue, this test case mmap_closed_bo is created,
> > it will close the bo with keeping one mmap, then second mmap the bo,
> > in normal situation, we expect second mmap failure with EACCESS. But
> > it will succeed if driver has the vm_node allowance leak.
> >
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
> > ---
> >   tests/i915/gem_mmap_gtt.c | 42
> +++++++++++++++++++++++++++++++++++++++
> >   1 file changed, 42 insertions(+)
> >
> > diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
> > index 92bbb5d2..0f4d5385 100644
> > --- a/tests/i915/gem_mmap_gtt.c
> > +++ b/tests/i915/gem_mmap_gtt.c
> > @@ -318,6 +318,46 @@ test_wc(int fd)
> >   		     5*gtt_writes/256., 5*cpu_writes/256.);
> >   }
> >
> > +static void mmap_closed_bo(int fd)
> > +{
> > +	struct drm_i915_gem_mmap_gtt mmap_arg;
> > +	void *p1, *p2;
> > +	int loop = 0, i = 0;
> 
> Nits - don't need to init i, mmap_arg, p1 and p2 could be declared in
> the loop.
OK, will update it in V2.

> 
> > +
> > +	while (loop++ < 2) {
> > +		memset(&mmap_arg, 0, sizeof(mmap_arg));
> > +
> > +		mmap_arg.handle = gem_create(fd, OBJECT_SIZE);
> > +		igt_assert(mmap_arg.handle);
> > +
> > +		i = loop;
> > +		while (i--) {
> > +			/* get offset, here we tries a loop to call
> GEM_MMAP_GTT many times,
> 
> If I may suggest:
> 
> /*
>   * Get mmap offset by calling GEM_MMAP_GTT one or multiple times in
>   * order to try to provoke a memory leak in the driver.
>   */
OK, will update it in V2.

> 
> > +			 * it could trigger driver memory leak issue easily.
> > +			 */
> > +			do_ioctl(fd, DRM_IOCTL_I915_GEM_MMAP_GTT,
> &mmap_arg);
> > +		}
> > +
> > +		p1 = mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE,
> > +			MAP_SHARED, fd, mmap_arg.offset);
> > +		igt_assert(p1 != MAP_FAILED);
> > +
> > +		gem_close(fd, mmap_arg.handle);
> > +		gem_quiescent_gpu(fd);
> 
> What is quiescent for? I usually expect to see it when test created some
> GPU activity, which isn't the case here. If there is a subtle reason
> please put a comment here.
>
Normally when we call gem_close(), the object is being freed by kworker on the way,
if we call mmap in the middle, we may get different errno(invalid or eaccess) inconsistently,
here quiescent is for flush object-free kworker done to get consistent errno. Even though,
in this case, return error -1 of mmap is enough for checking at last.
I could put one comment for it in V2.
 
> > +
> > +		p2 = mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE,
> > +			MAP_SHARED, fd, mmap_arg.offset);
> > +
> > +		munmap(p1, OBJECT_SIZE);
> > +
> > +		/* we expect mmapping p2 would fail, otherwise the driver
> > +		 * may not clean up the allowance of vm_node, it would
> > +		 * cause memory leak.
> > +		 */
> > +		igt_assert(p2 == MAP_FAILED);
> 
> I get this - mmap(p2) should fail after object close regardless of how
> many time DRM_IOCTL_I915_GEM_MMAP_GTT was called.
> 
> Excellent that you found a way to test for the leak without the need for
> kmemleak! At least that's how I read the posting of this test. :)
Exactly : )
This test also reflects the inconsistency between calling one-time MMAP_GTT 
and calling multi-time MMAP_GTT.

Best Regards
Chuansheng

> 
> Regards,
> 
> Tvrtko
> 
> > +	}
> > +}
> > +
> >   static int mmap_gtt_version(int i915)
> >   {
> >   	int val = 0;
> > @@ -1305,6 +1345,8 @@ igt_main
> >   		test_write(fd);
> >   	igt_subtest("basic-write-gtt")
> >   		test_write_gtt(fd);
> > +	igt_subtest("mmap_closed_bo")
> > +		mmap_closed_bo(fd);
> >   	igt_subtest("ptrace")
> >   		test_ptrace(fd);
> >   	igt_subtest("coherency")

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test mmap_closed_bo
  2022-03-07  1:02   ` Liu, Chuansheng
@ 2022-03-07 10:10     ` Tvrtko Ursulin
  0 siblings, 0 replies; 8+ messages in thread
From: Tvrtko Ursulin @ 2022-03-07 10:10 UTC (permalink / raw)
  To: Liu, Chuansheng, igt-dev; +Cc: Ursulin, Tvrtko


On 07/03/2022 01:02, Liu, Chuansheng wrote:
> Hi Tvrtko,
> 
> Thanks for review, please see my comments below.
> 
>> -----Original Message-----
>> From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>> Sent: Saturday, March 5, 2022 12:35 AM
>> To: Liu, Chuansheng <chuansheng.liu@intel.com>; igt-
>> dev@lists.freedesktop.org
>> Cc: Ursulin, Tvrtko <tvrtko.ursulin@intel.com>
>> Subject: Re: [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test
>> mmap_closed_bo
>>
>>
>> Hi,
>>
>> Some nits, some questions below.
>>
>> On 04/03/2022 05:15, Chuansheng Liu wrote:
>>> Recently we figured out one memory leak in i915 driver when running
>>> below alike test:
>>>
>>> create_bo
>>> gem_mmap_gtt bo
>>> gem_mmap_gtt bo twice
>>> close_bo
>>>
>>> then the memory leak is detected. More details can be referred in
>>> https://patchwork.freedesktop.org/patch/475802/?series=100532&rev=2
>>>
>>> For detecting such issue, this test case mmap_closed_bo is created,
>>> it will close the bo with keeping one mmap, then second mmap the bo,
>>> in normal situation, we expect second mmap failure with EACCESS. But
>>> it will succeed if driver has the vm_node allowance leak.
>>>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
>>> ---
>>>    tests/i915/gem_mmap_gtt.c | 42
>> +++++++++++++++++++++++++++++++++++++++
>>>    1 file changed, 42 insertions(+)
>>>
>>> diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
>>> index 92bbb5d2..0f4d5385 100644
>>> --- a/tests/i915/gem_mmap_gtt.c
>>> +++ b/tests/i915/gem_mmap_gtt.c
>>> @@ -318,6 +318,46 @@ test_wc(int fd)
>>>    		     5*gtt_writes/256., 5*cpu_writes/256.);
>>>    }
>>>
>>> +static void mmap_closed_bo(int fd)
>>> +{
>>> +	struct drm_i915_gem_mmap_gtt mmap_arg;
>>> +	void *p1, *p2;
>>> +	int loop = 0, i = 0;
>>
>> Nits - don't need to init i, mmap_arg, p1 and p2 could be declared in
>> the loop.
> OK, will update it in V2.
> 
>>
>>> +
>>> +	while (loop++ < 2) {
>>> +		memset(&mmap_arg, 0, sizeof(mmap_arg));
>>> +
>>> +		mmap_arg.handle = gem_create(fd, OBJECT_SIZE);
>>> +		igt_assert(mmap_arg.handle);
>>> +
>>> +		i = loop;
>>> +		while (i--) {
>>> +			/* get offset, here we tries a loop to call
>> GEM_MMAP_GTT many times,
>>
>> If I may suggest:
>>
>> /*
>>    * Get mmap offset by calling GEM_MMAP_GTT one or multiple times in
>>    * order to try to provoke a memory leak in the driver.
>>    */
> OK, will update it in V2.
> 
>>
>>> +			 * it could trigger driver memory leak issue easily.
>>> +			 */
>>> +			do_ioctl(fd, DRM_IOCTL_I915_GEM_MMAP_GTT,
>> &mmap_arg);
>>> +		}
>>> +
>>> +		p1 = mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE,
>>> +			MAP_SHARED, fd, mmap_arg.offset);
>>> +		igt_assert(p1 != MAP_FAILED);
>>> +
>>> +		gem_close(fd, mmap_arg.handle);
>>> +		gem_quiescent_gpu(fd);
>>
>> What is quiescent for? I usually expect to see it when test created some
>> GPU activity, which isn't the case here. If there is a subtle reason
>> please put a comment here.
>>
> Normally when we call gem_close(), the object is being freed by kworker on the way,
> if we call mmap in the middle, we may get different errno(invalid or eaccess) inconsistently,
> here quiescent is for flush object-free kworker done to get consistent errno. Even though,
> in this case, return error -1 of mmap is enough for checking at last.
> I could put one comment for it in V2.

I see. You could call igt_drop_caches_set(DROP_FREED) and it will be 
close to self-documenting? I think that's the flag to use at least, 
please check if you decide to try it.

Rest of v2 looks good to me.

Regards,

Tvrtko

>   
>>> +
>>> +		p2 = mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE,
>>> +			MAP_SHARED, fd, mmap_arg.offset);
>>> +
>>> +		munmap(p1, OBJECT_SIZE);
>>> +
>>> +		/* we expect mmapping p2 would fail, otherwise the driver
>>> +		 * may not clean up the allowance of vm_node, it would
>>> +		 * cause memory leak.
>>> +		 */
>>> +		igt_assert(p2 == MAP_FAILED);
>>
>> I get this - mmap(p2) should fail after object close regardless of how
>> many time DRM_IOCTL_I915_GEM_MMAP_GTT was called.
>>
>> Excellent that you found a way to test for the leak without the need for
>> kmemleak! At least that's how I read the posting of this test. :)
> Exactly : )
> This test also reflects the inconsistency between calling one-time MMAP_GTT
> and calling multi-time MMAP_GTT.
> 
> Best Regards
> Chuansheng
> 
>>
>> Regards,
>>
>> Tvrtko
>>
>>> +	}
>>> +}
>>> +
>>>    static int mmap_gtt_version(int i915)
>>>    {
>>>    	int val = 0;
>>> @@ -1305,6 +1345,8 @@ igt_main
>>>    		test_write(fd);
>>>    	igt_subtest("basic-write-gtt")
>>>    		test_write_gtt(fd);
>>> +	igt_subtest("mmap_closed_bo")
>>> +		mmap_closed_bo(fd);
>>>    	igt_subtest("ptrace")
>>>    		test_ptrace(fd);
>>>    	igt_subtest("coherency")

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test mmap_closed_bo
  2022-12-22 10:04 [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
@ 2023-01-18  9:33 ` Das, Nirmoy
  0 siblings, 0 replies; 8+ messages in thread
From: Das, Nirmoy @ 2023-01-18  9:33 UTC (permalink / raw)
  To: Tvrtko Ursulin, igt-dev, Intel-gfx


On 12/22/2022 11:04 AM, Tvrtko Ursulin wrote:
> From: Chuansheng Liu <chuansheng.liu@intel.com>
>
> Recently we figured out one memory leak in i915 driver when running
> below alike test:
>
> create_bo
> gem_mmap_gtt bo
> gem_mmap_gtt bo twice
> close_bo
>
> then the memory leak is detected. More details can be referred in
> https://patchwork.freedesktop.org/patch/475802/?series=100532&rev=2
>
> For detecting such issue, this test case mmap_closed_bo is created,
> it will close the bo with keeping one mmap, then second mmap the bo,
> in normal situation, we expect second mmap failure with EACCESS. But
> it will succeed if driver has the vm_node allowance leak.
>
> V2: (Tvrtko) some variable placement and comments tuning.
> V3: (Tvrtko) Using igt_drop_caches_set(fd, DROP_FREED) directly.
> v4: [tursulin] Fixed a conflict, added igt_describe.
>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>   tests/i915/gem_mmap_gtt.c | 49 +++++++++++++++++++++++++++++++++++++++
>   1 file changed, 49 insertions(+)
>
> diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
> index c14ab50eeee7..68f5e8412af6 100644
> --- a/tests/i915/gem_mmap_gtt.c
> +++ b/tests/i915/gem_mmap_gtt.c
> @@ -320,6 +320,52 @@ test_wc(int fd)
>   		     5*gtt_writes/256., 5*cpu_writes/256.);
>   }
>   
> +static void mmap_closed_bo(int fd)
> +{
> +	int loop = 0;
> +
> +	while (loop++ < 2) {
> +		struct drm_i915_gem_mmap_gtt mmap_arg;
> +		void *p1, *p2;
> +		int i = loop;
> +
> +		memset(&mmap_arg, 0, sizeof(mmap_arg));
> +		mmap_arg.handle = gem_create(fd, OBJECT_SIZE);
> +		igt_assert(mmap_arg.handle);
> +
> +		while (i--) {
> +			/*
> +			 * Get mmap offset by calling GEM_MMAP_GTT one or multiple times in
> +			 * order to try to provoke a memory leak in the driver.
> +			 */
> +			do_ioctl(fd, DRM_IOCTL_I915_GEM_MMAP_GTT, &mmap_arg);
> +		}
> +
> +		p1 = mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE,
> +			MAP_SHARED, fd, mmap_arg.offset);
> +		igt_assert(p1 != MAP_FAILED);
> +
> +		gem_close(fd, mmap_arg.handle);
> +
> +		/*
> +		 * Drop the freed objects for consistent 2nd mmap result.
> +		 */
> +		igt_drop_caches_set(fd, DROP_FREED);
> +
> +		p2 = mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE,
> +			MAP_SHARED, fd, mmap_arg.offset);
> +
> +		munmap(p1, OBJECT_SIZE);
> +
> +		/*
> +		 * we expect mmapping p2 would fail, otherwise the driver
> +		 * may not clean up the allowance of vm_node, it would
> +		 * cause memory leak.
> +		 */
> +		igt_assert(p2 == MAP_FAILED);
> +	}
> +}
> +
>   static int mmap_gtt_version(int i915)
>   {
>   	int val = 0;
> @@ -1315,6 +1361,9 @@ igt_main
>   		     "writes into it from another GTT mmapped.");
>   	igt_subtest("basic-write-gtt")
>   		test_write_gtt(fd);
> +	igt_describe("Check mmap of a closed handle is rejected.");
> +	igt_subtest("mmap-closed-bo")
> +		mmap_closed_bo(fd);
>   	igt_describe("Inspect a GTT mmap using ptrace().");
>   	igt_subtest("ptrace")
>   		test_ptrace(fd);

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test mmap_closed_bo
@ 2022-12-22 10:04 Tvrtko Ursulin
  2023-01-18  9:33 ` Das, Nirmoy
  0 siblings, 1 reply; 8+ messages in thread
From: Tvrtko Ursulin @ 2022-12-22 10:04 UTC (permalink / raw)
  To: igt-dev, Intel-gfx

From: Chuansheng Liu <chuansheng.liu@intel.com>

Recently we figured out one memory leak in i915 driver when running
below alike test:

create_bo
gem_mmap_gtt bo
gem_mmap_gtt bo twice
close_bo

then the memory leak is detected. More details can be referred in
https://patchwork.freedesktop.org/patch/475802/?series=100532&rev=2

For detecting such issue, this test case mmap_closed_bo is created,
it will close the bo with keeping one mmap, then second mmap the bo,
in normal situation, we expect second mmap failure with EACCESS. But
it will succeed if driver has the vm_node allowance leak.

V2: (Tvrtko) some variable placement and comments tuning.
V3: (Tvrtko) Using igt_drop_caches_set(fd, DROP_FREED) directly.
v4: [tursulin] Fixed a conflict, added igt_describe.

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 tests/i915/gem_mmap_gtt.c | 49 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
index c14ab50eeee7..68f5e8412af6 100644
--- a/tests/i915/gem_mmap_gtt.c
+++ b/tests/i915/gem_mmap_gtt.c
@@ -320,6 +320,52 @@ test_wc(int fd)
 		     5*gtt_writes/256., 5*cpu_writes/256.);
 }
 
+static void mmap_closed_bo(int fd)
+{
+	int loop = 0;
+
+	while (loop++ < 2) {
+		struct drm_i915_gem_mmap_gtt mmap_arg;
+		void *p1, *p2;
+		int i = loop;
+
+		memset(&mmap_arg, 0, sizeof(mmap_arg));
+		mmap_arg.handle = gem_create(fd, OBJECT_SIZE);
+		igt_assert(mmap_arg.handle);
+
+		while (i--) {
+			/*
+			 * Get mmap offset by calling GEM_MMAP_GTT one or multiple times in
+			 * order to try to provoke a memory leak in the driver.
+			 */
+			do_ioctl(fd, DRM_IOCTL_I915_GEM_MMAP_GTT, &mmap_arg);
+		}
+
+		p1 = mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE,
+			MAP_SHARED, fd, mmap_arg.offset);
+		igt_assert(p1 != MAP_FAILED);
+
+		gem_close(fd, mmap_arg.handle);
+
+		/*
+		 * Drop the freed objects for consistent 2nd mmap result.
+		 */
+		igt_drop_caches_set(fd, DROP_FREED);
+
+		p2 = mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE,
+			MAP_SHARED, fd, mmap_arg.offset);
+
+		munmap(p1, OBJECT_SIZE);
+
+		/*
+		 * we expect mmapping p2 would fail, otherwise the driver
+		 * may not clean up the allowance of vm_node, it would
+		 * cause memory leak.
+		 */
+		igt_assert(p2 == MAP_FAILED);
+	}
+}
+
 static int mmap_gtt_version(int i915)
 {
 	int val = 0;
@@ -1315,6 +1361,9 @@ igt_main
 		     "writes into it from another GTT mmapped.");
 	igt_subtest("basic-write-gtt")
 		test_write_gtt(fd);
+	igt_describe("Check mmap of a closed handle is rejected.");
+	igt_subtest("mmap-closed-bo")
+		mmap_closed_bo(fd);
 	igt_describe("Inspect a GTT mmap using ptrace().");
 	igt_subtest("ptrace")
 		test_ptrace(fd);
-- 
2.34.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-01-18  9:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04  5:15 [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test mmap_closed_bo Chuansheng Liu
2022-03-04  6:27 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-03-04 16:35 ` [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
2022-03-07  1:02   ` Liu, Chuansheng
2022-03-07 10:10     ` Tvrtko Ursulin
2022-03-04 18:09 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
2022-12-22 10:04 [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
2023-01-18  9:33 ` Das, Nirmoy

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.