All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
@ 2021-10-08  9:50 ` Tvrtko Ursulin
  0 siblings, 0 replies; 20+ messages in thread
From: Tvrtko Ursulin @ 2021-10-08  9:50 UTC (permalink / raw)
  To: Intel-gfx
  Cc: dri-devel, Tvrtko Ursulin, Christian König, Daniel Vetter,
	Sumit Semwal, linux-media, linaro-mm-sig

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Cache the count of shared fences in the iterator to avoid dereferencing
the dma_resv_object outside the RCU protection. Otherwise iterator and its
users can observe an incosistent state which makes it impossible to use
safely. Such as:

<6> [187.517041] [IGT] gem_sync: executing
<7> [187.536343] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
<7> [187.536793] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
<6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
<1> [188.935462] BUG: kernel NULL pointer dereference, address: 0000000000000010
<1> [188.935485] #PF: supervisor write access in kernel mode
<1> [188.935495] #PF: error_code(0x0002) - not-present page
<6> [188.935504] PGD 0 P4D 0
<4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
<4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 5.15.0-rc4-CI-Patchwork_21264+ #1
<4> [188.935535] Hardware name:  /NUC6CAYB, BIOS AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
<4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
<4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df ff eb bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 48 01 41 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 75 8c 48 8b 44 24 10
<4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
<4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 0000000000000001
<4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: ffffc900011dbcc8
<4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 00000000fffffffe
<4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: ffffc900011dbd44
<4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 0000000000000000
<4> [188.935643] FS:  00007f68d17e9700(0000) GS:ffff888277900000(0000) knlGS:0000000000000000
<4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 00000000003506e0
<4> [188.935676] Call Trace:
<4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
<4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
<4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
<4> [188.936533]  drm_ioctl_kernel+0xae/0x140
<4> [188.936546]  drm_ioctl+0x201/0x3d0
<4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
<4> [188.936820]  ? __fget_files+0xc2/0x1c0
<4> [188.936830]  ? __fget_files+0xda/0x1c0
<4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
<4> [188.936848]  do_syscall_64+0x3a/0xb0
<4> [188.936859]  entry_SYSCALL_64_after_hwframe+0x44/0xae

If the shared object has changed during the RCU unlocked period
callers will correctly handle the restart on the next iteration.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 96601e8a4755 ("dma-buf: use new iterator in dma_resv_copy_fences")
Fixes: d3c80698c9f5 ("dma-buf: use new iterator in dma_resv_get_fences v3")
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4274
Cc: Christian König <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
---
 drivers/dma-buf/dma-resv.c | 18 ++++++++++--------
 include/linux/dma-resv.h   |  5 ++++-
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
index a480af9581bd..7b6d881c8904 100644
--- a/drivers/dma-buf/dma-resv.c
+++ b/drivers/dma-buf/dma-resv.c
@@ -333,10 +333,14 @@ static void dma_resv_iter_restart_unlocked(struct dma_resv_iter *cursor)
 {
 	cursor->seq = read_seqcount_begin(&cursor->obj->seq);
 	cursor->index = -1;
-	if (cursor->all_fences)
+	cursor->shared_count = 0;
+	if (cursor->all_fences) {
 		cursor->fences = dma_resv_shared_list(cursor->obj);
-	else
+		if (cursor->fences)
+			cursor->shared_count = cursor->fences->shared_count;
+	} else {
 		cursor->fences = NULL;
+	}
 	cursor->is_restarted = true;
 }
 
@@ -363,7 +367,7 @@ static void dma_resv_iter_walk_unlocked(struct dma_resv_iter *cursor)
 				continue;
 
 		} else if (!cursor->fences ||
-			   cursor->index >= cursor->fences->shared_count) {
+			   cursor->index >= cursor->shared_count) {
 			cursor->fence = NULL;
 			break;
 
@@ -448,10 +452,8 @@ int dma_resv_copy_fences(struct dma_resv *dst, struct dma_resv *src)
 			dma_resv_list_free(list);
 			dma_fence_put(excl);
 
-			if (cursor.fences) {
-				unsigned int cnt = cursor.fences->shared_count;
-
-				list = dma_resv_list_alloc(cnt);
+			if (cursor.shared_count) {
+				list = dma_resv_list_alloc(cursor.shared_count);
 				if (!list) {
 					dma_resv_iter_end(&cursor);
 					return -ENOMEM;
@@ -522,7 +524,7 @@ int dma_resv_get_fences(struct dma_resv *obj, struct dma_fence **fence_excl,
 			if (fence_excl)
 				dma_fence_put(*fence_excl);
 
-			count = cursor.fences ? cursor.fences->shared_count : 0;
+			count = cursor.shared_count;
 			count += fence_excl ? 0 : 1;
 
 			/* Eventually re-allocate the array */
diff --git a/include/linux/dma-resv.h b/include/linux/dma-resv.h
index 8b6c20636a79..3e1bff147428 100644
--- a/include/linux/dma-resv.h
+++ b/include/linux/dma-resv.h
@@ -170,9 +170,12 @@ struct dma_resv_iter {
 	/** @index: index into the shared fences */
 	unsigned int index;
 
-	/** @fences: the shared fences */
+	/** @fences: the shared fences; private, *MUST* not dereference  */
 	struct dma_resv_list *fences;
 
+	/** @shared_count: number of shared fences */
+	unsigned int shared_count;
+
 	/** @is_restarted: true if this is the first returned fence */
 	bool is_restarted;
 };
-- 
2.30.2


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

* [Intel-gfx] [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
@ 2021-10-08  9:50 ` Tvrtko Ursulin
  0 siblings, 0 replies; 20+ messages in thread
From: Tvrtko Ursulin @ 2021-10-08  9:50 UTC (permalink / raw)
  To: Intel-gfx
  Cc: dri-devel, Tvrtko Ursulin, Christian König, Daniel Vetter,
	Sumit Semwal, linux-media, linaro-mm-sig

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Cache the count of shared fences in the iterator to avoid dereferencing
the dma_resv_object outside the RCU protection. Otherwise iterator and its
users can observe an incosistent state which makes it impossible to use
safely. Such as:

<6> [187.517041] [IGT] gem_sync: executing
<7> [187.536343] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
<7> [187.536793] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
<6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
<1> [188.935462] BUG: kernel NULL pointer dereference, address: 0000000000000010
<1> [188.935485] #PF: supervisor write access in kernel mode
<1> [188.935495] #PF: error_code(0x0002) - not-present page
<6> [188.935504] PGD 0 P4D 0
<4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
<4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 5.15.0-rc4-CI-Patchwork_21264+ #1
<4> [188.935535] Hardware name:  /NUC6CAYB, BIOS AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
<4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
<4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df ff eb bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 48 01 41 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 75 8c 48 8b 44 24 10
<4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
<4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 0000000000000001
<4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: ffffc900011dbcc8
<4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 00000000fffffffe
<4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: ffffc900011dbd44
<4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 0000000000000000
<4> [188.935643] FS:  00007f68d17e9700(0000) GS:ffff888277900000(0000) knlGS:0000000000000000
<4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 00000000003506e0
<4> [188.935676] Call Trace:
<4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
<4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
<4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
<4> [188.936533]  drm_ioctl_kernel+0xae/0x140
<4> [188.936546]  drm_ioctl+0x201/0x3d0
<4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
<4> [188.936820]  ? __fget_files+0xc2/0x1c0
<4> [188.936830]  ? __fget_files+0xda/0x1c0
<4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
<4> [188.936848]  do_syscall_64+0x3a/0xb0
<4> [188.936859]  entry_SYSCALL_64_after_hwframe+0x44/0xae

If the shared object has changed during the RCU unlocked period
callers will correctly handle the restart on the next iteration.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 96601e8a4755 ("dma-buf: use new iterator in dma_resv_copy_fences")
Fixes: d3c80698c9f5 ("dma-buf: use new iterator in dma_resv_get_fences v3")
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4274
Cc: Christian König <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
---
 drivers/dma-buf/dma-resv.c | 18 ++++++++++--------
 include/linux/dma-resv.h   |  5 ++++-
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
index a480af9581bd..7b6d881c8904 100644
--- a/drivers/dma-buf/dma-resv.c
+++ b/drivers/dma-buf/dma-resv.c
@@ -333,10 +333,14 @@ static void dma_resv_iter_restart_unlocked(struct dma_resv_iter *cursor)
 {
 	cursor->seq = read_seqcount_begin(&cursor->obj->seq);
 	cursor->index = -1;
-	if (cursor->all_fences)
+	cursor->shared_count = 0;
+	if (cursor->all_fences) {
 		cursor->fences = dma_resv_shared_list(cursor->obj);
-	else
+		if (cursor->fences)
+			cursor->shared_count = cursor->fences->shared_count;
+	} else {
 		cursor->fences = NULL;
+	}
 	cursor->is_restarted = true;
 }
 
@@ -363,7 +367,7 @@ static void dma_resv_iter_walk_unlocked(struct dma_resv_iter *cursor)
 				continue;
 
 		} else if (!cursor->fences ||
-			   cursor->index >= cursor->fences->shared_count) {
+			   cursor->index >= cursor->shared_count) {
 			cursor->fence = NULL;
 			break;
 
@@ -448,10 +452,8 @@ int dma_resv_copy_fences(struct dma_resv *dst, struct dma_resv *src)
 			dma_resv_list_free(list);
 			dma_fence_put(excl);
 
-			if (cursor.fences) {
-				unsigned int cnt = cursor.fences->shared_count;
-
-				list = dma_resv_list_alloc(cnt);
+			if (cursor.shared_count) {
+				list = dma_resv_list_alloc(cursor.shared_count);
 				if (!list) {
 					dma_resv_iter_end(&cursor);
 					return -ENOMEM;
@@ -522,7 +524,7 @@ int dma_resv_get_fences(struct dma_resv *obj, struct dma_fence **fence_excl,
 			if (fence_excl)
 				dma_fence_put(*fence_excl);
 
-			count = cursor.fences ? cursor.fences->shared_count : 0;
+			count = cursor.shared_count;
 			count += fence_excl ? 0 : 1;
 
 			/* Eventually re-allocate the array */
diff --git a/include/linux/dma-resv.h b/include/linux/dma-resv.h
index 8b6c20636a79..3e1bff147428 100644
--- a/include/linux/dma-resv.h
+++ b/include/linux/dma-resv.h
@@ -170,9 +170,12 @@ struct dma_resv_iter {
 	/** @index: index into the shared fences */
 	unsigned int index;
 
-	/** @fences: the shared fences */
+	/** @fences: the shared fences; private, *MUST* not dereference  */
 	struct dma_resv_list *fences;
 
+	/** @shared_count: number of shared fences */
+	unsigned int shared_count;
+
 	/** @is_restarted: true if this is the first returned fence */
 	bool is_restarted;
 };
-- 
2.30.2


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

* Re: [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
  2021-10-08  9:50 ` [Intel-gfx] " Tvrtko Ursulin
@ 2021-10-08 10:21   ` Christian König
  -1 siblings, 0 replies; 20+ messages in thread
From: Christian König @ 2021-10-08 10:21 UTC (permalink / raw)
  To: Tvrtko Ursulin, Intel-gfx
  Cc: dri-devel, Tvrtko Ursulin, Daniel Vetter, Sumit Semwal,
	linux-media, linaro-mm-sig

Am 08.10.21 um 11:50 schrieb Tvrtko Ursulin:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Cache the count of shared fences in the iterator to avoid dereferencing
> the dma_resv_object outside the RCU protection. Otherwise iterator and its
> users can observe an incosistent state which makes it impossible to use
> safely.

Ah, of course! I've been staring at the code the whole morning and 
couldn't see it.

Going to write a testcase to cover that.

> Such as:
>
> <6> [187.517041] [IGT] gem_sync: executing
> <7> [187.536343] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
> <7> [187.536793] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
> <6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
> <1> [188.935462] BUG: kernel NULL pointer dereference, address: 0000000000000010
> <1> [188.935485] #PF: supervisor write access in kernel mode
> <1> [188.935495] #PF: error_code(0x0002) - not-present page
> <6> [188.935504] PGD 0 P4D 0
> <4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
> <4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 5.15.0-rc4-CI-Patchwork_21264+ #1
> <4> [188.935535] Hardware name:  /NUC6CAYB, BIOS AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
> <4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
> <4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df ff eb bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 48 01 41 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 75 8c 48 8b 44 24 10
> <4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
> <4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 0000000000000001
> <4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: ffffc900011dbcc8
> <4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 00000000fffffffe
> <4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: ffffc900011dbd44
> <4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 0000000000000000
> <4> [188.935643] FS:  00007f68d17e9700(0000) GS:ffff888277900000(0000) knlGS:0000000000000000
> <4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> <4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 00000000003506e0
> <4> [188.935676] Call Trace:
> <4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
> <4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
> <4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
> <4> [188.936533]  drm_ioctl_kernel+0xae/0x140
> <4> [188.936546]  drm_ioctl+0x201/0x3d0
> <4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
> <4> [188.936820]  ? __fget_files+0xc2/0x1c0
> <4> [188.936830]  ? __fget_files+0xda/0x1c0
> <4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
> <4> [188.936848]  do_syscall_64+0x3a/0xb0
> <4> [188.936859]  entry_SYSCALL_64_after_hwframe+0x44/0xae
>
> If the shared object has changed during the RCU unlocked period
> callers will correctly handle the restart on the next iteration.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Fixes: 96601e8a4755 ("dma-buf: use new iterator in dma_resv_copy_fences")
> Fixes: d3c80698c9f5 ("dma-buf: use new iterator in dma_resv_get_fences v3")
> Closes: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2F-%2Fissues%2F4274&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C0a73b5d07f5f44cdc5a808d98a4109f9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637692834972816537%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=jhcO2Q8bGhLTW7b4%2BNn4TE3UCwBbAcQVuceJEwDK0fg%3D&amp;reserved=0
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: linux-media@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linaro-mm-sig@lists.linaro.org

Maybe we should remove cursor->fences altogether, but either way the 
patch is Reviewed-by: Christian König <christian.koenig@amd.com>

Please push to drm-misc-next ASAP.

Thanks,
Christian.

> ---
>   drivers/dma-buf/dma-resv.c | 18 ++++++++++--------
>   include/linux/dma-resv.h   |  5 ++++-
>   2 files changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
> index a480af9581bd..7b6d881c8904 100644
> --- a/drivers/dma-buf/dma-resv.c
> +++ b/drivers/dma-buf/dma-resv.c
> @@ -333,10 +333,14 @@ static void dma_resv_iter_restart_unlocked(struct dma_resv_iter *cursor)
>   {
>   	cursor->seq = read_seqcount_begin(&cursor->obj->seq);
>   	cursor->index = -1;
> -	if (cursor->all_fences)
> +	cursor->shared_count = 0;
> +	if (cursor->all_fences) {
>   		cursor->fences = dma_resv_shared_list(cursor->obj);
> -	else
> +		if (cursor->fences)
> +			cursor->shared_count = cursor->fences->shared_count;
> +	} else {
>   		cursor->fences = NULL;
> +	}
>   	cursor->is_restarted = true;
>   }
>   
> @@ -363,7 +367,7 @@ static void dma_resv_iter_walk_unlocked(struct dma_resv_iter *cursor)
>   				continue;
>   
>   		} else if (!cursor->fences ||
> -			   cursor->index >= cursor->fences->shared_count) {
> +			   cursor->index >= cursor->shared_count) {
>   			cursor->fence = NULL;
>   			break;
>   
> @@ -448,10 +452,8 @@ int dma_resv_copy_fences(struct dma_resv *dst, struct dma_resv *src)
>   			dma_resv_list_free(list);
>   			dma_fence_put(excl);
>   
> -			if (cursor.fences) {
> -				unsigned int cnt = cursor.fences->shared_count;
> -
> -				list = dma_resv_list_alloc(cnt);
> +			if (cursor.shared_count) {
> +				list = dma_resv_list_alloc(cursor.shared_count);
>   				if (!list) {
>   					dma_resv_iter_end(&cursor);
>   					return -ENOMEM;
> @@ -522,7 +524,7 @@ int dma_resv_get_fences(struct dma_resv *obj, struct dma_fence **fence_excl,
>   			if (fence_excl)
>   				dma_fence_put(*fence_excl);
>   
> -			count = cursor.fences ? cursor.fences->shared_count : 0;
> +			count = cursor.shared_count;
>   			count += fence_excl ? 0 : 1;
>   
>   			/* Eventually re-allocate the array */
> diff --git a/include/linux/dma-resv.h b/include/linux/dma-resv.h
> index 8b6c20636a79..3e1bff147428 100644
> --- a/include/linux/dma-resv.h
> +++ b/include/linux/dma-resv.h
> @@ -170,9 +170,12 @@ struct dma_resv_iter {
>   	/** @index: index into the shared fences */
>   	unsigned int index;
>   
> -	/** @fences: the shared fences */
> +	/** @fences: the shared fences; private, *MUST* not dereference  */
>   	struct dma_resv_list *fences;
>   
> +	/** @shared_count: number of shared fences */
> +	unsigned int shared_count;
> +
>   	/** @is_restarted: true if this is the first returned fence */
>   	bool is_restarted;
>   };


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

* Re: [Intel-gfx] [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
@ 2021-10-08 10:21   ` Christian König
  0 siblings, 0 replies; 20+ messages in thread
From: Christian König @ 2021-10-08 10:21 UTC (permalink / raw)
  To: Tvrtko Ursulin, Intel-gfx
  Cc: dri-devel, Tvrtko Ursulin, Daniel Vetter, Sumit Semwal,
	linux-media, linaro-mm-sig

Am 08.10.21 um 11:50 schrieb Tvrtko Ursulin:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Cache the count of shared fences in the iterator to avoid dereferencing
> the dma_resv_object outside the RCU protection. Otherwise iterator and its
> users can observe an incosistent state which makes it impossible to use
> safely.

Ah, of course! I've been staring at the code the whole morning and 
couldn't see it.

Going to write a testcase to cover that.

> Such as:
>
> <6> [187.517041] [IGT] gem_sync: executing
> <7> [187.536343] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
> <7> [187.536793] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
> <6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
> <1> [188.935462] BUG: kernel NULL pointer dereference, address: 0000000000000010
> <1> [188.935485] #PF: supervisor write access in kernel mode
> <1> [188.935495] #PF: error_code(0x0002) - not-present page
> <6> [188.935504] PGD 0 P4D 0
> <4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
> <4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 5.15.0-rc4-CI-Patchwork_21264+ #1
> <4> [188.935535] Hardware name:  /NUC6CAYB, BIOS AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
> <4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
> <4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df ff eb bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 48 01 41 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 75 8c 48 8b 44 24 10
> <4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
> <4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 0000000000000001
> <4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: ffffc900011dbcc8
> <4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 00000000fffffffe
> <4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: ffffc900011dbd44
> <4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 0000000000000000
> <4> [188.935643] FS:  00007f68d17e9700(0000) GS:ffff888277900000(0000) knlGS:0000000000000000
> <4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> <4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 00000000003506e0
> <4> [188.935676] Call Trace:
> <4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
> <4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
> <4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
> <4> [188.936533]  drm_ioctl_kernel+0xae/0x140
> <4> [188.936546]  drm_ioctl+0x201/0x3d0
> <4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
> <4> [188.936820]  ? __fget_files+0xc2/0x1c0
> <4> [188.936830]  ? __fget_files+0xda/0x1c0
> <4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
> <4> [188.936848]  do_syscall_64+0x3a/0xb0
> <4> [188.936859]  entry_SYSCALL_64_after_hwframe+0x44/0xae
>
> If the shared object has changed during the RCU unlocked period
> callers will correctly handle the restart on the next iteration.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Fixes: 96601e8a4755 ("dma-buf: use new iterator in dma_resv_copy_fences")
> Fixes: d3c80698c9f5 ("dma-buf: use new iterator in dma_resv_get_fences v3")
> Closes: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2F-%2Fissues%2F4274&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C0a73b5d07f5f44cdc5a808d98a4109f9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637692834972816537%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=jhcO2Q8bGhLTW7b4%2BNn4TE3UCwBbAcQVuceJEwDK0fg%3D&amp;reserved=0
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: linux-media@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linaro-mm-sig@lists.linaro.org

Maybe we should remove cursor->fences altogether, but either way the 
patch is Reviewed-by: Christian König <christian.koenig@amd.com>

Please push to drm-misc-next ASAP.

Thanks,
Christian.

> ---
>   drivers/dma-buf/dma-resv.c | 18 ++++++++++--------
>   include/linux/dma-resv.h   |  5 ++++-
>   2 files changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
> index a480af9581bd..7b6d881c8904 100644
> --- a/drivers/dma-buf/dma-resv.c
> +++ b/drivers/dma-buf/dma-resv.c
> @@ -333,10 +333,14 @@ static void dma_resv_iter_restart_unlocked(struct dma_resv_iter *cursor)
>   {
>   	cursor->seq = read_seqcount_begin(&cursor->obj->seq);
>   	cursor->index = -1;
> -	if (cursor->all_fences)
> +	cursor->shared_count = 0;
> +	if (cursor->all_fences) {
>   		cursor->fences = dma_resv_shared_list(cursor->obj);
> -	else
> +		if (cursor->fences)
> +			cursor->shared_count = cursor->fences->shared_count;
> +	} else {
>   		cursor->fences = NULL;
> +	}
>   	cursor->is_restarted = true;
>   }
>   
> @@ -363,7 +367,7 @@ static void dma_resv_iter_walk_unlocked(struct dma_resv_iter *cursor)
>   				continue;
>   
>   		} else if (!cursor->fences ||
> -			   cursor->index >= cursor->fences->shared_count) {
> +			   cursor->index >= cursor->shared_count) {
>   			cursor->fence = NULL;
>   			break;
>   
> @@ -448,10 +452,8 @@ int dma_resv_copy_fences(struct dma_resv *dst, struct dma_resv *src)
>   			dma_resv_list_free(list);
>   			dma_fence_put(excl);
>   
> -			if (cursor.fences) {
> -				unsigned int cnt = cursor.fences->shared_count;
> -
> -				list = dma_resv_list_alloc(cnt);
> +			if (cursor.shared_count) {
> +				list = dma_resv_list_alloc(cursor.shared_count);
>   				if (!list) {
>   					dma_resv_iter_end(&cursor);
>   					return -ENOMEM;
> @@ -522,7 +524,7 @@ int dma_resv_get_fences(struct dma_resv *obj, struct dma_fence **fence_excl,
>   			if (fence_excl)
>   				dma_fence_put(*fence_excl);
>   
> -			count = cursor.fences ? cursor.fences->shared_count : 0;
> +			count = cursor.shared_count;
>   			count += fence_excl ? 0 : 1;
>   
>   			/* Eventually re-allocate the array */
> diff --git a/include/linux/dma-resv.h b/include/linux/dma-resv.h
> index 8b6c20636a79..3e1bff147428 100644
> --- a/include/linux/dma-resv.h
> +++ b/include/linux/dma-resv.h
> @@ -170,9 +170,12 @@ struct dma_resv_iter {
>   	/** @index: index into the shared fences */
>   	unsigned int index;
>   
> -	/** @fences: the shared fences */
> +	/** @fences: the shared fences; private, *MUST* not dereference  */
>   	struct dma_resv_list *fences;
>   
> +	/** @shared_count: number of shared fences */
> +	unsigned int shared_count;
> +
>   	/** @is_restarted: true if this is the first returned fence */
>   	bool is_restarted;
>   };


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

* Re: [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
  2021-10-08 10:21   ` [Intel-gfx] " Christian König
@ 2021-10-08 10:49     ` Tvrtko Ursulin
  -1 siblings, 0 replies; 20+ messages in thread
From: Tvrtko Ursulin @ 2021-10-08 10:49 UTC (permalink / raw)
  To: Christian König, Intel-gfx
  Cc: dri-devel, Tvrtko Ursulin, Daniel Vetter, Sumit Semwal,
	linux-media, linaro-mm-sig


On 08/10/2021 11:21, Christian König wrote:
> Am 08.10.21 um 11:50 schrieb Tvrtko Ursulin:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Cache the count of shared fences in the iterator to avoid dereferencing
>> the dma_resv_object outside the RCU protection. Otherwise iterator and 
>> its
>> users can observe an incosistent state which makes it impossible to use
>> safely.
> 
> Ah, of course! I've been staring at the code the whole morning and 
> couldn't see it.
> 
> Going to write a testcase to cover that.
> 
>> Such as:
>>
>> <6> [187.517041] [IGT] gem_sync: executing
>> <7> [187.536343] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl 
>> [i915]] HW context 1 created
>> <7> [187.536793] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl 
>> [i915]] HW context 1 created
>> <6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
>> <1> [188.935462] BUG: kernel NULL pointer dereference, address: 
>> 0000000000000010
>> <1> [188.935485] #PF: supervisor write access in kernel mode
>> <1> [188.935495] #PF: error_code(0x0002) - not-present page
>> <6> [188.935504] PGD 0 P4D 0
>> <4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
>> <4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 
>> 5.15.0-rc4-CI-Patchwork_21264+ #1
>> <4> [188.935535] Hardware name:  /NUC6CAYB, BIOS 
>> AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
>> <4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
>> <4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df ff eb 
>> bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 48 01 41 
>> 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 75 8c 48 8b 44 
>> 24 10
>> <4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
>> <4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 
>> 0000000000000001
>> <4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: 
>> ffffc900011dbcc8
>> <4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 
>> 00000000fffffffe
>> <4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: 
>> ffffc900011dbd44
>> <4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 
>> 0000000000000000
>> <4> [188.935643] FS:  00007f68d17e9700(0000) GS:ffff888277900000(0000) 
>> knlGS:0000000000000000
>> <4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>> <4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 
>> 00000000003506e0
>> <4> [188.935676] Call Trace:
>> <4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
>> <4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
>> <4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
>> <4> [188.936533]  drm_ioctl_kernel+0xae/0x140
>> <4> [188.936546]  drm_ioctl+0x201/0x3d0
>> <4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
>> <4> [188.936820]  ? __fget_files+0xc2/0x1c0
>> <4> [188.936830]  ? __fget_files+0xda/0x1c0
>> <4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
>> <4> [188.936848]  do_syscall_64+0x3a/0xb0
>> <4> [188.936859]  entry_SYSCALL_64_after_hwframe+0x44/0xae
>>
>> If the shared object has changed during the RCU unlocked period
>> callers will correctly handle the restart on the next iteration.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Fixes: 96601e8a4755 ("dma-buf: use new iterator in dma_resv_copy_fences")
>> Fixes: d3c80698c9f5 ("dma-buf: use new iterator in dma_resv_get_fences 
>> v3")
>> Closes: 
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2F-%2Fissues%2F4274&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C0a73b5d07f5f44cdc5a808d98a4109f9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637692834972816537%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=jhcO2Q8bGhLTW7b4%2BNn4TE3UCwBbAcQVuceJEwDK0fg%3D&amp;reserved=0 
>>
>> Cc: Christian König <christian.koenig@amd.com>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: Sumit Semwal <sumit.semwal@linaro.org>
>> Cc: linux-media@vger.kernel.org
>> Cc: dri-devel@lists.freedesktop.org
>> Cc: linaro-mm-sig@lists.linaro.org
> 
> Maybe we should remove cursor->fences altogether, but either way the 
> patch is Reviewed-by: Christian König <christian.koenig@amd.com>
> 
> Please push to drm-misc-next ASAP.

Not sure I can or if my push permissions are limited to Intel branches. 
I can try once CI gives a green light.

Regards,

Tvrtko

> 
> Thanks,
> Christian.
> 
>> ---
>>   drivers/dma-buf/dma-resv.c | 18 ++++++++++--------
>>   include/linux/dma-resv.h   |  5 ++++-
>>   2 files changed, 14 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
>> index a480af9581bd..7b6d881c8904 100644
>> --- a/drivers/dma-buf/dma-resv.c
>> +++ b/drivers/dma-buf/dma-resv.c
>> @@ -333,10 +333,14 @@ static void 
>> dma_resv_iter_restart_unlocked(struct dma_resv_iter *cursor)
>>   {
>>       cursor->seq = read_seqcount_begin(&cursor->obj->seq);
>>       cursor->index = -1;
>> -    if (cursor->all_fences)
>> +    cursor->shared_count = 0;
>> +    if (cursor->all_fences) {
>>           cursor->fences = dma_resv_shared_list(cursor->obj);
>> -    else
>> +        if (cursor->fences)
>> +            cursor->shared_count = cursor->fences->shared_count;
>> +    } else {
>>           cursor->fences = NULL;
>> +    }
>>       cursor->is_restarted = true;
>>   }
>> @@ -363,7 +367,7 @@ static void dma_resv_iter_walk_unlocked(struct 
>> dma_resv_iter *cursor)
>>                   continue;
>>           } else if (!cursor->fences ||
>> -               cursor->index >= cursor->fences->shared_count) {
>> +               cursor->index >= cursor->shared_count) {
>>               cursor->fence = NULL;
>>               break;
>> @@ -448,10 +452,8 @@ int dma_resv_copy_fences(struct dma_resv *dst, 
>> struct dma_resv *src)
>>               dma_resv_list_free(list);
>>               dma_fence_put(excl);
>> -            if (cursor.fences) {
>> -                unsigned int cnt = cursor.fences->shared_count;
>> -
>> -                list = dma_resv_list_alloc(cnt);
>> +            if (cursor.shared_count) {
>> +                list = dma_resv_list_alloc(cursor.shared_count);
>>                   if (!list) {
>>                       dma_resv_iter_end(&cursor);
>>                       return -ENOMEM;
>> @@ -522,7 +524,7 @@ int dma_resv_get_fences(struct dma_resv *obj, 
>> struct dma_fence **fence_excl,
>>               if (fence_excl)
>>                   dma_fence_put(*fence_excl);
>> -            count = cursor.fences ? cursor.fences->shared_count : 0;
>> +            count = cursor.shared_count;
>>               count += fence_excl ? 0 : 1;
>>               /* Eventually re-allocate the array */
>> diff --git a/include/linux/dma-resv.h b/include/linux/dma-resv.h
>> index 8b6c20636a79..3e1bff147428 100644
>> --- a/include/linux/dma-resv.h
>> +++ b/include/linux/dma-resv.h
>> @@ -170,9 +170,12 @@ struct dma_resv_iter {
>>       /** @index: index into the shared fences */
>>       unsigned int index;
>> -    /** @fences: the shared fences */
>> +    /** @fences: the shared fences; private, *MUST* not dereference  */
>>       struct dma_resv_list *fences;
>> +    /** @shared_count: number of shared fences */
>> +    unsigned int shared_count;
>> +
>>       /** @is_restarted: true if this is the first returned fence */
>>       bool is_restarted;
>>   };
> 

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

* Re: [Intel-gfx] [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
@ 2021-10-08 10:49     ` Tvrtko Ursulin
  0 siblings, 0 replies; 20+ messages in thread
From: Tvrtko Ursulin @ 2021-10-08 10:49 UTC (permalink / raw)
  To: Christian König, Intel-gfx
  Cc: dri-devel, Tvrtko Ursulin, Daniel Vetter, Sumit Semwal,
	linux-media, linaro-mm-sig


On 08/10/2021 11:21, Christian König wrote:
> Am 08.10.21 um 11:50 schrieb Tvrtko Ursulin:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Cache the count of shared fences in the iterator to avoid dereferencing
>> the dma_resv_object outside the RCU protection. Otherwise iterator and 
>> its
>> users can observe an incosistent state which makes it impossible to use
>> safely.
> 
> Ah, of course! I've been staring at the code the whole morning and 
> couldn't see it.
> 
> Going to write a testcase to cover that.
> 
>> Such as:
>>
>> <6> [187.517041] [IGT] gem_sync: executing
>> <7> [187.536343] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl 
>> [i915]] HW context 1 created
>> <7> [187.536793] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl 
>> [i915]] HW context 1 created
>> <6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
>> <1> [188.935462] BUG: kernel NULL pointer dereference, address: 
>> 0000000000000010
>> <1> [188.935485] #PF: supervisor write access in kernel mode
>> <1> [188.935495] #PF: error_code(0x0002) - not-present page
>> <6> [188.935504] PGD 0 P4D 0
>> <4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
>> <4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 
>> 5.15.0-rc4-CI-Patchwork_21264+ #1
>> <4> [188.935535] Hardware name:  /NUC6CAYB, BIOS 
>> AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
>> <4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
>> <4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df ff eb 
>> bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 48 01 41 
>> 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 75 8c 48 8b 44 
>> 24 10
>> <4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
>> <4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 
>> 0000000000000001
>> <4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: 
>> ffffc900011dbcc8
>> <4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 
>> 00000000fffffffe
>> <4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: 
>> ffffc900011dbd44
>> <4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 
>> 0000000000000000
>> <4> [188.935643] FS:  00007f68d17e9700(0000) GS:ffff888277900000(0000) 
>> knlGS:0000000000000000
>> <4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>> <4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 
>> 00000000003506e0
>> <4> [188.935676] Call Trace:
>> <4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
>> <4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
>> <4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
>> <4> [188.936533]  drm_ioctl_kernel+0xae/0x140
>> <4> [188.936546]  drm_ioctl+0x201/0x3d0
>> <4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
>> <4> [188.936820]  ? __fget_files+0xc2/0x1c0
>> <4> [188.936830]  ? __fget_files+0xda/0x1c0
>> <4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
>> <4> [188.936848]  do_syscall_64+0x3a/0xb0
>> <4> [188.936859]  entry_SYSCALL_64_after_hwframe+0x44/0xae
>>
>> If the shared object has changed during the RCU unlocked period
>> callers will correctly handle the restart on the next iteration.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Fixes: 96601e8a4755 ("dma-buf: use new iterator in dma_resv_copy_fences")
>> Fixes: d3c80698c9f5 ("dma-buf: use new iterator in dma_resv_get_fences 
>> v3")
>> Closes: 
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2F-%2Fissues%2F4274&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C0a73b5d07f5f44cdc5a808d98a4109f9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637692834972816537%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=jhcO2Q8bGhLTW7b4%2BNn4TE3UCwBbAcQVuceJEwDK0fg%3D&amp;reserved=0 
>>
>> Cc: Christian König <christian.koenig@amd.com>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: Sumit Semwal <sumit.semwal@linaro.org>
>> Cc: linux-media@vger.kernel.org
>> Cc: dri-devel@lists.freedesktop.org
>> Cc: linaro-mm-sig@lists.linaro.org
> 
> Maybe we should remove cursor->fences altogether, but either way the 
> patch is Reviewed-by: Christian König <christian.koenig@amd.com>
> 
> Please push to drm-misc-next ASAP.

Not sure I can or if my push permissions are limited to Intel branches. 
I can try once CI gives a green light.

Regards,

Tvrtko

> 
> Thanks,
> Christian.
> 
>> ---
>>   drivers/dma-buf/dma-resv.c | 18 ++++++++++--------
>>   include/linux/dma-resv.h   |  5 ++++-
>>   2 files changed, 14 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
>> index a480af9581bd..7b6d881c8904 100644
>> --- a/drivers/dma-buf/dma-resv.c
>> +++ b/drivers/dma-buf/dma-resv.c
>> @@ -333,10 +333,14 @@ static void 
>> dma_resv_iter_restart_unlocked(struct dma_resv_iter *cursor)
>>   {
>>       cursor->seq = read_seqcount_begin(&cursor->obj->seq);
>>       cursor->index = -1;
>> -    if (cursor->all_fences)
>> +    cursor->shared_count = 0;
>> +    if (cursor->all_fences) {
>>           cursor->fences = dma_resv_shared_list(cursor->obj);
>> -    else
>> +        if (cursor->fences)
>> +            cursor->shared_count = cursor->fences->shared_count;
>> +    } else {
>>           cursor->fences = NULL;
>> +    }
>>       cursor->is_restarted = true;
>>   }
>> @@ -363,7 +367,7 @@ static void dma_resv_iter_walk_unlocked(struct 
>> dma_resv_iter *cursor)
>>                   continue;
>>           } else if (!cursor->fences ||
>> -               cursor->index >= cursor->fences->shared_count) {
>> +               cursor->index >= cursor->shared_count) {
>>               cursor->fence = NULL;
>>               break;
>> @@ -448,10 +452,8 @@ int dma_resv_copy_fences(struct dma_resv *dst, 
>> struct dma_resv *src)
>>               dma_resv_list_free(list);
>>               dma_fence_put(excl);
>> -            if (cursor.fences) {
>> -                unsigned int cnt = cursor.fences->shared_count;
>> -
>> -                list = dma_resv_list_alloc(cnt);
>> +            if (cursor.shared_count) {
>> +                list = dma_resv_list_alloc(cursor.shared_count);
>>                   if (!list) {
>>                       dma_resv_iter_end(&cursor);
>>                       return -ENOMEM;
>> @@ -522,7 +524,7 @@ int dma_resv_get_fences(struct dma_resv *obj, 
>> struct dma_fence **fence_excl,
>>               if (fence_excl)
>>                   dma_fence_put(*fence_excl);
>> -            count = cursor.fences ? cursor.fences->shared_count : 0;
>> +            count = cursor.shared_count;
>>               count += fence_excl ? 0 : 1;
>>               /* Eventually re-allocate the array */
>> diff --git a/include/linux/dma-resv.h b/include/linux/dma-resv.h
>> index 8b6c20636a79..3e1bff147428 100644
>> --- a/include/linux/dma-resv.h
>> +++ b/include/linux/dma-resv.h
>> @@ -170,9 +170,12 @@ struct dma_resv_iter {
>>       /** @index: index into the shared fences */
>>       unsigned int index;
>> -    /** @fences: the shared fences */
>> +    /** @fences: the shared fences; private, *MUST* not dereference  */
>>       struct dma_resv_list *fences;
>> +    /** @shared_count: number of shared fences */
>> +    unsigned int shared_count;
>> +
>>       /** @is_restarted: true if this is the first returned fence */
>>       bool is_restarted;
>>   };
> 

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

* Re: [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
  2021-10-08 10:49     ` [Intel-gfx] " Tvrtko Ursulin
@ 2021-10-08 12:19       ` Christian König
  -1 siblings, 0 replies; 20+ messages in thread
From: Christian König @ 2021-10-08 12:19 UTC (permalink / raw)
  To: Tvrtko Ursulin, Intel-gfx
  Cc: dri-devel, Tvrtko Ursulin, Daniel Vetter, Sumit Semwal,
	linux-media, linaro-mm-sig

Am 08.10.21 um 12:49 schrieb Tvrtko Ursulin:
>
> On 08/10/2021 11:21, Christian König wrote:
>> Am 08.10.21 um 11:50 schrieb Tvrtko Ursulin:
>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>
>>> Cache the count of shared fences in the iterator to avoid dereferencing
>>> the dma_resv_object outside the RCU protection. Otherwise iterator 
>>> and its
>>> users can observe an incosistent state which makes it impossible to use
>>> safely.
>>
>> Ah, of course! I've been staring at the code the whole morning and 
>> couldn't see it.
>>
>> Going to write a testcase to cover that.
>>
>>> Such as:
>>>
>>> <6> [187.517041] [IGT] gem_sync: executing
>>> <7> [187.536343] i915 0000:00:02.0: 
>>> [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
>>> <7> [187.536793] i915 0000:00:02.0: 
>>> [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
>>> <6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
>>> <1> [188.935462] BUG: kernel NULL pointer dereference, address: 
>>> 0000000000000010
>>> <1> [188.935485] #PF: supervisor write access in kernel mode
>>> <1> [188.935495] #PF: error_code(0x0002) - not-present page
>>> <6> [188.935504] PGD 0 P4D 0
>>> <4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
>>> <4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 
>>> 5.15.0-rc4-CI-Patchwork_21264+ #1
>>> <4> [188.935535] Hardware name:  /NUC6CAYB, BIOS 
>>> AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
>>> <4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
>>> <4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df ff 
>>> eb bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 48 01 
>>> 41 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 75 8c 48 
>>> 8b 44 24 10
>>> <4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
>>> <4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 
>>> 0000000000000001
>>> <4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: 
>>> ffffc900011dbcc8
>>> <4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 
>>> 00000000fffffffe
>>> <4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: 
>>> ffffc900011dbd44
>>> <4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 
>>> 0000000000000000
>>> <4> [188.935643] FS:  00007f68d17e9700(0000) 
>>> GS:ffff888277900000(0000) knlGS:0000000000000000
>>> <4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>> <4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 
>>> 00000000003506e0
>>> <4> [188.935676] Call Trace:
>>> <4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
>>> <4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
>>> <4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
>>> <4> [188.936533]  drm_ioctl_kernel+0xae/0x140
>>> <4> [188.936546]  drm_ioctl+0x201/0x3d0
>>> <4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
>>> <4> [188.936820]  ? __fget_files+0xc2/0x1c0
>>> <4> [188.936830]  ? __fget_files+0xda/0x1c0
>>> <4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
>>> <4> [188.936848]  do_syscall_64+0x3a/0xb0
>>> <4> [188.936859] entry_SYSCALL_64_after_hwframe+0x44/0xae
>>>
>>> If the shared object has changed during the RCU unlocked period
>>> callers will correctly handle the restart on the next iteration.
>>>
>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> Fixes: 96601e8a4755 ("dma-buf: use new iterator in 
>>> dma_resv_copy_fences")
>>> Fixes: d3c80698c9f5 ("dma-buf: use new iterator in 
>>> dma_resv_get_fences v3")
>>> Closes: 
>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2F-%2Fissues%2F4274&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7Cc22feea06a3f4285cdac08d98a495984%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637692870805160909%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6oPR30sWnJe04I4GlhhvJWX3QvwKFIOMW1uOIyWZFOE%3D&amp;reserved=0 
>>>
>>> Cc: Christian König <christian.koenig@amd.com>
>>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>>> Cc: Sumit Semwal <sumit.semwal@linaro.org>
>>> Cc: linux-media@vger.kernel.org
>>> Cc: dri-devel@lists.freedesktop.org
>>> Cc: linaro-mm-sig@lists.linaro.org
>>
>> Maybe we should remove cursor->fences altogether, but either way the 
>> patch is Reviewed-by: Christian König <christian.koenig@amd.com>
>>
>> Please push to drm-misc-next ASAP.
>
> Not sure I can or if my push permissions are limited to Intel 
> branches. I can try once CI gives a green light.

If it doesn't work just ping me and I will push it.

Thanks,
Christian.

>
> Regards,
>
> Tvrtko
>
>>
>> Thanks,
>> Christian.
>>
>>> ---
>>>   drivers/dma-buf/dma-resv.c | 18 ++++++++++--------
>>>   include/linux/dma-resv.h   |  5 ++++-
>>>   2 files changed, 14 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
>>> index a480af9581bd..7b6d881c8904 100644
>>> --- a/drivers/dma-buf/dma-resv.c
>>> +++ b/drivers/dma-buf/dma-resv.c
>>> @@ -333,10 +333,14 @@ static void 
>>> dma_resv_iter_restart_unlocked(struct dma_resv_iter *cursor)
>>>   {
>>>       cursor->seq = read_seqcount_begin(&cursor->obj->seq);
>>>       cursor->index = -1;
>>> -    if (cursor->all_fences)
>>> +    cursor->shared_count = 0;
>>> +    if (cursor->all_fences) {
>>>           cursor->fences = dma_resv_shared_list(cursor->obj);
>>> -    else
>>> +        if (cursor->fences)
>>> +            cursor->shared_count = cursor->fences->shared_count;
>>> +    } else {
>>>           cursor->fences = NULL;
>>> +    }
>>>       cursor->is_restarted = true;
>>>   }
>>> @@ -363,7 +367,7 @@ static void dma_resv_iter_walk_unlocked(struct 
>>> dma_resv_iter *cursor)
>>>                   continue;
>>>           } else if (!cursor->fences ||
>>> -               cursor->index >= cursor->fences->shared_count) {
>>> +               cursor->index >= cursor->shared_count) {
>>>               cursor->fence = NULL;
>>>               break;
>>> @@ -448,10 +452,8 @@ int dma_resv_copy_fences(struct dma_resv *dst, 
>>> struct dma_resv *src)
>>>               dma_resv_list_free(list);
>>>               dma_fence_put(excl);
>>> -            if (cursor.fences) {
>>> -                unsigned int cnt = cursor.fences->shared_count;
>>> -
>>> -                list = dma_resv_list_alloc(cnt);
>>> +            if (cursor.shared_count) {
>>> +                list = dma_resv_list_alloc(cursor.shared_count);
>>>                   if (!list) {
>>>                       dma_resv_iter_end(&cursor);
>>>                       return -ENOMEM;
>>> @@ -522,7 +524,7 @@ int dma_resv_get_fences(struct dma_resv *obj, 
>>> struct dma_fence **fence_excl,
>>>               if (fence_excl)
>>>                   dma_fence_put(*fence_excl);
>>> -            count = cursor.fences ? cursor.fences->shared_count : 0;
>>> +            count = cursor.shared_count;
>>>               count += fence_excl ? 0 : 1;
>>>               /* Eventually re-allocate the array */
>>> diff --git a/include/linux/dma-resv.h b/include/linux/dma-resv.h
>>> index 8b6c20636a79..3e1bff147428 100644
>>> --- a/include/linux/dma-resv.h
>>> +++ b/include/linux/dma-resv.h
>>> @@ -170,9 +170,12 @@ struct dma_resv_iter {
>>>       /** @index: index into the shared fences */
>>>       unsigned int index;
>>> -    /** @fences: the shared fences */
>>> +    /** @fences: the shared fences; private, *MUST* not 
>>> dereference  */
>>>       struct dma_resv_list *fences;
>>> +    /** @shared_count: number of shared fences */
>>> +    unsigned int shared_count;
>>> +
>>>       /** @is_restarted: true if this is the first returned fence */
>>>       bool is_restarted;
>>>   };
>>


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

* Re: [Intel-gfx] [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
@ 2021-10-08 12:19       ` Christian König
  0 siblings, 0 replies; 20+ messages in thread
From: Christian König @ 2021-10-08 12:19 UTC (permalink / raw)
  To: Tvrtko Ursulin, Intel-gfx
  Cc: dri-devel, Tvrtko Ursulin, Daniel Vetter, Sumit Semwal,
	linux-media, linaro-mm-sig

Am 08.10.21 um 12:49 schrieb Tvrtko Ursulin:
>
> On 08/10/2021 11:21, Christian König wrote:
>> Am 08.10.21 um 11:50 schrieb Tvrtko Ursulin:
>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>
>>> Cache the count of shared fences in the iterator to avoid dereferencing
>>> the dma_resv_object outside the RCU protection. Otherwise iterator 
>>> and its
>>> users can observe an incosistent state which makes it impossible to use
>>> safely.
>>
>> Ah, of course! I've been staring at the code the whole morning and 
>> couldn't see it.
>>
>> Going to write a testcase to cover that.
>>
>>> Such as:
>>>
>>> <6> [187.517041] [IGT] gem_sync: executing
>>> <7> [187.536343] i915 0000:00:02.0: 
>>> [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
>>> <7> [187.536793] i915 0000:00:02.0: 
>>> [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
>>> <6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
>>> <1> [188.935462] BUG: kernel NULL pointer dereference, address: 
>>> 0000000000000010
>>> <1> [188.935485] #PF: supervisor write access in kernel mode
>>> <1> [188.935495] #PF: error_code(0x0002) - not-present page
>>> <6> [188.935504] PGD 0 P4D 0
>>> <4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
>>> <4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 
>>> 5.15.0-rc4-CI-Patchwork_21264+ #1
>>> <4> [188.935535] Hardware name:  /NUC6CAYB, BIOS 
>>> AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
>>> <4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
>>> <4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df ff 
>>> eb bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 48 01 
>>> 41 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 75 8c 48 
>>> 8b 44 24 10
>>> <4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
>>> <4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 
>>> 0000000000000001
>>> <4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: 
>>> ffffc900011dbcc8
>>> <4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 
>>> 00000000fffffffe
>>> <4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: 
>>> ffffc900011dbd44
>>> <4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 
>>> 0000000000000000
>>> <4> [188.935643] FS:  00007f68d17e9700(0000) 
>>> GS:ffff888277900000(0000) knlGS:0000000000000000
>>> <4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>> <4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 
>>> 00000000003506e0
>>> <4> [188.935676] Call Trace:
>>> <4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
>>> <4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
>>> <4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
>>> <4> [188.936533]  drm_ioctl_kernel+0xae/0x140
>>> <4> [188.936546]  drm_ioctl+0x201/0x3d0
>>> <4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
>>> <4> [188.936820]  ? __fget_files+0xc2/0x1c0
>>> <4> [188.936830]  ? __fget_files+0xda/0x1c0
>>> <4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
>>> <4> [188.936848]  do_syscall_64+0x3a/0xb0
>>> <4> [188.936859] entry_SYSCALL_64_after_hwframe+0x44/0xae
>>>
>>> If the shared object has changed during the RCU unlocked period
>>> callers will correctly handle the restart on the next iteration.
>>>
>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> Fixes: 96601e8a4755 ("dma-buf: use new iterator in 
>>> dma_resv_copy_fences")
>>> Fixes: d3c80698c9f5 ("dma-buf: use new iterator in 
>>> dma_resv_get_fences v3")
>>> Closes: 
>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2F-%2Fissues%2F4274&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7Cc22feea06a3f4285cdac08d98a495984%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637692870805160909%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6oPR30sWnJe04I4GlhhvJWX3QvwKFIOMW1uOIyWZFOE%3D&amp;reserved=0 
>>>
>>> Cc: Christian König <christian.koenig@amd.com>
>>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>>> Cc: Sumit Semwal <sumit.semwal@linaro.org>
>>> Cc: linux-media@vger.kernel.org
>>> Cc: dri-devel@lists.freedesktop.org
>>> Cc: linaro-mm-sig@lists.linaro.org
>>
>> Maybe we should remove cursor->fences altogether, but either way the 
>> patch is Reviewed-by: Christian König <christian.koenig@amd.com>
>>
>> Please push to drm-misc-next ASAP.
>
> Not sure I can or if my push permissions are limited to Intel 
> branches. I can try once CI gives a green light.

If it doesn't work just ping me and I will push it.

Thanks,
Christian.

>
> Regards,
>
> Tvrtko
>
>>
>> Thanks,
>> Christian.
>>
>>> ---
>>>   drivers/dma-buf/dma-resv.c | 18 ++++++++++--------
>>>   include/linux/dma-resv.h   |  5 ++++-
>>>   2 files changed, 14 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
>>> index a480af9581bd..7b6d881c8904 100644
>>> --- a/drivers/dma-buf/dma-resv.c
>>> +++ b/drivers/dma-buf/dma-resv.c
>>> @@ -333,10 +333,14 @@ static void 
>>> dma_resv_iter_restart_unlocked(struct dma_resv_iter *cursor)
>>>   {
>>>       cursor->seq = read_seqcount_begin(&cursor->obj->seq);
>>>       cursor->index = -1;
>>> -    if (cursor->all_fences)
>>> +    cursor->shared_count = 0;
>>> +    if (cursor->all_fences) {
>>>           cursor->fences = dma_resv_shared_list(cursor->obj);
>>> -    else
>>> +        if (cursor->fences)
>>> +            cursor->shared_count = cursor->fences->shared_count;
>>> +    } else {
>>>           cursor->fences = NULL;
>>> +    }
>>>       cursor->is_restarted = true;
>>>   }
>>> @@ -363,7 +367,7 @@ static void dma_resv_iter_walk_unlocked(struct 
>>> dma_resv_iter *cursor)
>>>                   continue;
>>>           } else if (!cursor->fences ||
>>> -               cursor->index >= cursor->fences->shared_count) {
>>> +               cursor->index >= cursor->shared_count) {
>>>               cursor->fence = NULL;
>>>               break;
>>> @@ -448,10 +452,8 @@ int dma_resv_copy_fences(struct dma_resv *dst, 
>>> struct dma_resv *src)
>>>               dma_resv_list_free(list);
>>>               dma_fence_put(excl);
>>> -            if (cursor.fences) {
>>> -                unsigned int cnt = cursor.fences->shared_count;
>>> -
>>> -                list = dma_resv_list_alloc(cnt);
>>> +            if (cursor.shared_count) {
>>> +                list = dma_resv_list_alloc(cursor.shared_count);
>>>                   if (!list) {
>>>                       dma_resv_iter_end(&cursor);
>>>                       return -ENOMEM;
>>> @@ -522,7 +524,7 @@ int dma_resv_get_fences(struct dma_resv *obj, 
>>> struct dma_fence **fence_excl,
>>>               if (fence_excl)
>>>                   dma_fence_put(*fence_excl);
>>> -            count = cursor.fences ? cursor.fences->shared_count : 0;
>>> +            count = cursor.shared_count;
>>>               count += fence_excl ? 0 : 1;
>>>               /* Eventually re-allocate the array */
>>> diff --git a/include/linux/dma-resv.h b/include/linux/dma-resv.h
>>> index 8b6c20636a79..3e1bff147428 100644
>>> --- a/include/linux/dma-resv.h
>>> +++ b/include/linux/dma-resv.h
>>> @@ -170,9 +170,12 @@ struct dma_resv_iter {
>>>       /** @index: index into the shared fences */
>>>       unsigned int index;
>>> -    /** @fences: the shared fences */
>>> +    /** @fences: the shared fences; private, *MUST* not 
>>> dereference  */
>>>       struct dma_resv_list *fences;
>>> +    /** @shared_count: number of shared fences */
>>> +    unsigned int shared_count;
>>> +
>>>       /** @is_restarted: true if this is the first returned fence */
>>>       bool is_restarted;
>>>   };
>>


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

* [Intel-gfx] ✗ Fi.CI.BAT: failure for dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
  2021-10-08  9:50 ` [Intel-gfx] " Tvrtko Ursulin
  (?)
  (?)
@ 2021-10-08 15:15 ` Patchwork
  -1 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2021-10-08 15:15 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

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

== Series Details ==

Series: dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
URL   : https://patchwork.freedesktop.org/series/95605/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10699 -> Patchwork_21291
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_21291 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21291, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@core_hotunplug@unbind-rebind:
    - fi-tgl-u2:          NOTRUN -> [INCOMPLETE][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-u2/igt@core_hotunplug@unbind-rebind.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@query-info:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][2] ([fdo#109315])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-1115g4/igt@amdgpu/amd_basic@query-info.html

  * igt@amdgpu/amd_basic@semaphore:
    - fi-bdw-5557u:       NOTRUN -> [SKIP][3] ([fdo#109271]) +23 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-bdw-5557u/igt@amdgpu/amd_basic@semaphore.html

  * igt@amdgpu/amd_cs_nop@nop-gfx0:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][4] ([fdo#109315] / [i915#2575]) +16 similar issues
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-1115g4/igt@amdgpu/amd_cs_nop@nop-gfx0.html

  * igt@amdgpu/amd_cs_nop@sync-compute0:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][5] ([fdo#109271]) +6 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-kbl-soraka/igt@amdgpu/amd_cs_nop@sync-compute0.html

  * igt@gem_huc_copy@huc-copy:
    - fi-tgl-u2:          NOTRUN -> [SKIP][6] ([i915#2190])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-u2/igt@gem_huc_copy@huc-copy.html
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][7] ([i915#2190])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-1115g4/igt@gem_huc_copy@huc-copy.html

  * igt@i915_pm_backlight@basic-brightness:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][8] ([i915#1155])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-1115g4/igt@i915_pm_backlight@basic-brightness.html

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][9] ([fdo#111827]) +8 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-1115g4/igt@kms_chamelium@common-hpd-after-suspend.html

  * igt@kms_chamelium@dp-hpd-fast:
    - fi-tgl-u2:          NOTRUN -> [SKIP][10] ([fdo#109284] / [fdo#111827]) +8 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-u2/igt@kms_chamelium@dp-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-tgl-u2:          NOTRUN -> [SKIP][11] ([i915#4103]) +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][12] ([i915#4103]) +1 similar issue
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-1115g4/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_flip@basic-plain-flip@c-dp1:
    - fi-cfl-8109u:       [PASS][13] -> [FAIL][14] ([i915#4165])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10699/fi-cfl-8109u/igt@kms_flip@basic-plain-flip@c-dp1.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-cfl-8109u/igt@kms_flip@basic-plain-flip@c-dp1.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][15] ([fdo#109285])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-1115g4/igt@kms_force_connector_basic@force-load-detect.html
    - fi-tgl-u2:          NOTRUN -> [SKIP][16] ([fdo#109285])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-u2/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
    - fi-cfl-8109u:       [PASS][17] -> [DMESG-WARN][18] ([i915#295]) +14 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10699/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html

  * igt@kms_psr@primary_mmap_gtt:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][19] ([i915#1072]) +3 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-1115g4/igt@kms_psr@primary_mmap_gtt.html

  * igt@prime_vgem@basic-userptr:
    - fi-tgl-u2:          NOTRUN -> [SKIP][20] ([i915#3301])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-u2/igt@prime_vgem@basic-userptr.html
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][21] ([i915#3301])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-1115g4/igt@prime_vgem@basic-userptr.html

  * igt@runner@aborted:
    - fi-tgl-u2:          NOTRUN -> [FAIL][22] ([i915#1602] / [i915#2722])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21291/fi-tgl-u2/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#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
  [i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
  [i915#295]: https://gitlab.freedesktop.org/drm/intel/issues/295
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4165]: https://gitlab.freedesktop.org/drm/intel/issues/4165


Participating hosts (39 -> 38)
------------------------------

  Additional (2): fi-tgl-1115g4 fi-tgl-u2 
  Missing    (3): fi-ilk-m540 fi-bsw-cyan fi-hsw-4200u 


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

  * Linux: CI_DRM_10699 -> Patchwork_21291

  CI-20190529: 20190529
  CI_DRM_10699: a38a884801c0c09b4d2a204222972e4676eb1c93 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6240: b232a092b9e1b10a8be13601acaa440903b226bc @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_21291: d6ae30e5857b00af553a604bcfa0d3b1768846b2 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

d6ae30e5857b dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion

== Logs ==

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

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

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

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev2)
  2021-10-08  9:50 ` [Intel-gfx] " Tvrtko Ursulin
                   ` (2 preceding siblings ...)
  (?)
@ 2021-10-08 17:33 ` Patchwork
  -1 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2021-10-08 17:33 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev2)
URL   : https://patchwork.freedesktop.org/series/95605/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
dcabbee4ce57 dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
-:16: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#16: 
<7> [187.536343] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created

total: 0 errors, 1 warnings, 0 checks, 57 lines checked



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

* [Intel-gfx] ✗ Fi.CI.BAT: failure for dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev2)
  2021-10-08  9:50 ` [Intel-gfx] " Tvrtko Ursulin
                   ` (3 preceding siblings ...)
  (?)
@ 2021-10-08 18:04 ` Patchwork
  -1 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2021-10-08 18:04 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

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

== Series Details ==

Series: dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev2)
URL   : https://patchwork.freedesktop.org/series/95605/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10700 -> Patchwork_21294
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_21294 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21294, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@core_hotunplug@unbind-rebind:
    - fi-tgl-u2:          NOTRUN -> [INCOMPLETE][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21294/fi-tgl-u2/igt@core_hotunplug@unbind-rebind.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@cs-gfx:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][2] ([fdo#109271]) +15 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21294/fi-kbl-soraka/igt@amdgpu/amd_basic@cs-gfx.html

  * igt@gem_huc_copy@huc-copy:
    - fi-tgl-u2:          NOTRUN -> [SKIP][3] ([i915#2190])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21294/fi-tgl-u2/igt@gem_huc_copy@huc-copy.html

  * igt@i915_selftest@live@gt_heartbeat:
    - fi-cfl-guc:         [PASS][4] -> [DMESG-FAIL][5] ([i915#541])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10700/fi-cfl-guc/igt@i915_selftest@live@gt_heartbeat.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21294/fi-cfl-guc/igt@i915_selftest@live@gt_heartbeat.html

  * igt@kms_chamelium@dp-hpd-fast:
    - fi-tgl-u2:          NOTRUN -> [SKIP][6] ([fdo#109284] / [fdo#111827]) +8 similar issues
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21294/fi-tgl-u2/igt@kms_chamelium@dp-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-tgl-u2:          NOTRUN -> [SKIP][7] ([i915#4103]) +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21294/fi-tgl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-tgl-u2:          NOTRUN -> [SKIP][8] ([fdo#109285])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21294/fi-tgl-u2/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-cml-u2:          [PASS][9] -> [DMESG-WARN][10] ([i915#4269])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10700/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21294/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html

  * igt@prime_vgem@basic-userptr:
    - fi-tgl-u2:          NOTRUN -> [SKIP][11] ([i915#3301])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21294/fi-tgl-u2/igt@prime_vgem@basic-userptr.html

  * igt@runner@aborted:
    - fi-tgl-u2:          NOTRUN -> [FAIL][12] ([i915#1602] / [i915#2722])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21294/fi-tgl-u2/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-a:
    - {fi-tgl-dsi}:       [DMESG-WARN][13] ([i915#1982]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10700/fi-tgl-dsi/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-a.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21294/fi-tgl-dsi/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-a.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
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269
  [i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541


Participating hosts (40 -> 38)
------------------------------

  Additional (1): fi-tgl-u2 
  Missing    (3): fi-ilk-m540 fi-bsw-cyan fi-hsw-4200u 


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

  * Linux: CI_DRM_10700 -> Patchwork_21294

  CI-20190529: 20190529
  CI_DRM_10700: 6ecdd5e29c83cd8fc191f8cce5c283eefb53c97e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6240: b232a092b9e1b10a8be13601acaa440903b226bc @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_21294: dcabbee4ce57139cb01d95e114618111f015c63f @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

dcabbee4ce57 dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion

== Logs ==

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

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

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

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev3)
  2021-10-08  9:50 ` [Intel-gfx] " Tvrtko Ursulin
                   ` (4 preceding siblings ...)
  (?)
@ 2021-10-08 23:05 ` Patchwork
  -1 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2021-10-08 23:05 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev3)
URL   : https://patchwork.freedesktop.org/series/95605/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
f35815098fd4 dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
-:16: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#16: 
<7> [187.536343] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created

total: 0 errors, 1 warnings, 0 checks, 57 lines checked



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

* [Intel-gfx] ✗ Fi.CI.BAT: failure for dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev3)
  2021-10-08  9:50 ` [Intel-gfx] " Tvrtko Ursulin
                   ` (5 preceding siblings ...)
  (?)
@ 2021-10-08 23:36 ` Patchwork
  -1 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2021-10-08 23:36 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

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

== Series Details ==

Series: dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev3)
URL   : https://patchwork.freedesktop.org/series/95605/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10700 -> Patchwork_21299
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_21299 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21299, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@core_hotunplug@unbind-rebind:
    - fi-tgl-u2:          NOTRUN -> [INCOMPLETE][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-tgl-u2/igt@core_hotunplug@unbind-rebind.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_cs_nop@sync-fork-compute0:
    - fi-snb-2600:        NOTRUN -> [SKIP][2] ([fdo#109271]) +17 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-snb-2600/igt@amdgpu/amd_cs_nop@sync-fork-compute0.html

  * igt@gem_exec_suspend@basic-s3:
    - fi-tgl-1115g4:      [PASS][3] -> [FAIL][4] ([i915#1888])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10700/fi-tgl-1115g4/igt@gem_exec_suspend@basic-s3.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-tgl-1115g4/igt@gem_exec_suspend@basic-s3.html

  * igt@gem_huc_copy@huc-copy:
    - fi-tgl-u2:          NOTRUN -> [SKIP][5] ([i915#2190])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-tgl-u2/igt@gem_huc_copy@huc-copy.html

  * igt@kms_chamelium@dp-crc-fast:
    - fi-kbl-7500u:       [PASS][6] -> [FAIL][7] ([i915#1372])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10700/fi-kbl-7500u/igt@kms_chamelium@dp-crc-fast.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-kbl-7500u/igt@kms_chamelium@dp-crc-fast.html

  * igt@kms_chamelium@dp-hpd-fast:
    - fi-tgl-u2:          NOTRUN -> [SKIP][8] ([fdo#109284] / [fdo#111827]) +8 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-tgl-u2/igt@kms_chamelium@dp-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-tgl-u2:          NOTRUN -> [SKIP][9] ([i915#4103]) +1 similar issue
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-tgl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-tgl-u2:          NOTRUN -> [SKIP][10] ([fdo#109285])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-tgl-u2/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-cml-u2:          [PASS][11] -> [DMESG-WARN][12] ([i915#4269])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10700/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html

  * igt@prime_vgem@basic-userptr:
    - fi-tgl-u2:          NOTRUN -> [SKIP][13] ([i915#3301])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-tgl-u2/igt@prime_vgem@basic-userptr.html

  * igt@runner@aborted:
    - fi-tgl-u2:          NOTRUN -> [FAIL][14] ([i915#1602] / [i915#2722])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-tgl-u2/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@hangcheck:
    - fi-snb-2600:        [INCOMPLETE][15] ([i915#3921]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10700/fi-snb-2600/igt@i915_selftest@live@hangcheck.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-snb-2600/igt@i915_selftest@live@hangcheck.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-a:
    - {fi-tgl-dsi}:       [DMESG-WARN][17] ([i915#1982]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10700/fi-tgl-dsi/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-a.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21299/fi-tgl-dsi/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-a.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
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1372]: https://gitlab.freedesktop.org/drm/intel/issues/1372
  [i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
  [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269


Participating hosts (40 -> 37)
------------------------------

  Additional (1): fi-tgl-u2 
  Missing    (4): fi-kbl-soraka fi-ilk-m540 fi-bsw-cyan fi-hsw-4200u 


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

  * Linux: CI_DRM_10700 -> Patchwork_21299

  CI-20190529: 20190529
  CI_DRM_10700: 6ecdd5e29c83cd8fc191f8cce5c283eefb53c97e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6240: b232a092b9e1b10a8be13601acaa440903b226bc @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_21299: f35815098fd463427b510f06bd08a830c3ae934c @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

f35815098fd4 dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion

== Logs ==

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

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

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

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev4)
  2021-10-08  9:50 ` [Intel-gfx] " Tvrtko Ursulin
                   ` (6 preceding siblings ...)
  (?)
@ 2021-10-11  9:22 ` Patchwork
  -1 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2021-10-11  9:22 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev4)
URL   : https://patchwork.freedesktop.org/series/95605/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
2ef0df1434bf dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
-:16: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#16: 
<7> [187.536343] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created

total: 0 errors, 1 warnings, 0 checks, 57 lines checked



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

* [Intel-gfx] ✓ Fi.CI.BAT: success for dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev4)
  2021-10-08  9:50 ` [Intel-gfx] " Tvrtko Ursulin
                   ` (7 preceding siblings ...)
  (?)
@ 2021-10-11  9:52 ` Patchwork
  -1 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2021-10-11  9:52 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

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

== Series Details ==

Series: dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev4)
URL   : https://patchwork.freedesktop.org/series/95605/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10712 -> Patchwork_21303
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live@hangcheck:
    - fi-snb-2600:        [PASS][1] -> [INCOMPLETE][2] ([i915#3921])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/fi-snb-2600/igt@i915_selftest@live@hangcheck.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/fi-snb-2600/igt@i915_selftest@live@hangcheck.html

  * igt@kms_chamelium@dp-crc-fast:
    - fi-kbl-7500u:       [PASS][3] -> [FAIL][4] ([i915#1372])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/fi-kbl-7500u/igt@kms_chamelium@dp-crc-fast.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/fi-kbl-7500u/igt@kms_chamelium@dp-crc-fast.html

  * igt@kms_flip@basic-plain-flip@c-dp1:
    - fi-cfl-8109u:       [PASS][5] -> [FAIL][6] ([i915#4165])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/fi-cfl-8109u/igt@kms_flip@basic-plain-flip@c-dp1.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/fi-cfl-8109u/igt@kms_flip@basic-plain-flip@c-dp1.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
    - fi-cfl-8109u:       [PASS][7] -> [DMESG-WARN][8] ([i915#295]) +14 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s0:
    - fi-tgl-1115g4:      [FAIL][9] ([i915#1888]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/fi-tgl-1115g4/igt@gem_exec_suspend@basic-s0.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/fi-tgl-1115g4/igt@gem_exec_suspend@basic-s0.html

  
  [i915#1372]: https://gitlab.freedesktop.org/drm/intel/issues/1372
  [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
  [i915#295]: https://gitlab.freedesktop.org/drm/intel/issues/295
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
  [i915#4165]: https://gitlab.freedesktop.org/drm/intel/issues/4165


Participating hosts (40 -> 37)
------------------------------

  Missing    (3): fi-ilk-m540 fi-bsw-cyan fi-hsw-4200u 


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

  * Linux: CI_DRM_10712 -> Patchwork_21303

  CI-20190529: 20190529
  CI_DRM_10712: 1b294c898346dc6c27264a2b900f7a7353b6bd96 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6241: 426723f979380f18f9c07d36ebac3a52f760ba7e @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_21303: 2ef0df1434bfc3a36bd9acf3f045a75520ae6acb @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

2ef0df1434bf dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion

== Logs ==

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

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

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

* [Intel-gfx] ✓ Fi.CI.IGT: success for dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev4)
  2021-10-08  9:50 ` [Intel-gfx] " Tvrtko Ursulin
                   ` (8 preceding siblings ...)
  (?)
@ 2021-10-11 12:22 ` Patchwork
  -1 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2021-10-11 12:22 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

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

== Series Details ==

Series: dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev4)
URL   : https://patchwork.freedesktop.org/series/95605/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10712_full -> Patchwork_21303_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_create@create-massive:
    - shard-skl:          NOTRUN -> [DMESG-WARN][1] ([i915#3002])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl5/igt@gem_create@create-massive.html

  * igt@gem_ctx_persistence@legacy-engines-mixed:
    - shard-snb:          NOTRUN -> [SKIP][2] ([fdo#109271] / [i915#1099]) +5 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-snb6/igt@gem_ctx_persistence@legacy-engines-mixed.html

  * igt@gem_ctx_persistence@many-contexts:
    - shard-tglb:         [PASS][3] -> [FAIL][4] ([i915#2410])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-tglb1/igt@gem_ctx_persistence@many-contexts.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb2/igt@gem_ctx_persistence@many-contexts.html

  * igt@gem_eio@unwedge-stress:
    - shard-tglb:         [PASS][5] -> [TIMEOUT][6] ([i915#2369] / [i915#3063] / [i915#3648])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-tglb6/igt@gem_eio@unwedge-stress.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb7/igt@gem_eio@unwedge-stress.html
    - shard-snb:          NOTRUN -> [FAIL][7] ([i915#3354])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-snb2/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_fair@basic-none@rcs0:
    - shard-iclb:         [PASS][8] -> [FAIL][9] ([i915#2842])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-iclb7/igt@gem_exec_fair@basic-none@rcs0.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb8/igt@gem_exec_fair@basic-none@rcs0.html

  * igt@gem_exec_fair@basic-pace@rcs0:
    - shard-kbl:          [PASS][10] -> [FAIL][11] ([i915#2842]) +3 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl4/igt@gem_exec_fair@basic-pace@rcs0.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl4/igt@gem_exec_fair@basic-pace@rcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-tglb:         [PASS][12] -> [FAIL][13] ([i915#2842]) +1 similar issue
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-tglb3/igt@gem_exec_fair@basic-pace@vecs0.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb8/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_exec_flush@basic-batch-kernel-default-cmd:
    - shard-snb:          NOTRUN -> [SKIP][14] ([fdo#109271]) +393 similar issues
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-snb2/igt@gem_exec_flush@basic-batch-kernel-default-cmd.html

  * igt@gem_exec_whisper@basic-queues-forked-all:
    - shard-glk:          [PASS][15] -> [DMESG-WARN][16] ([i915#118])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-glk7/igt@gem_exec_whisper@basic-queues-forked-all.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-glk9/igt@gem_exec_whisper@basic-queues-forked-all.html

  * igt@gem_pread@exhaustion:
    - shard-snb:          NOTRUN -> [WARN][17] ([i915#2658])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-snb6/igt@gem_pread@exhaustion.html
    - shard-kbl:          NOTRUN -> [WARN][18] ([i915#2658])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl4/igt@gem_pread@exhaustion.html

  * igt@gem_render_copy@x-tiled-to-vebox-yf-tiled:
    - shard-kbl:          NOTRUN -> [SKIP][19] ([fdo#109271]) +87 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl6/igt@gem_render_copy@x-tiled-to-vebox-yf-tiled.html

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

  * igt@gem_softpin@noreloc-s3:
    - shard-apl:          [PASS][21] -> [DMESG-WARN][22] ([i915#180]) +2 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-apl8/igt@gem_softpin@noreloc-s3.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-apl3/igt@gem_softpin@noreloc-s3.html

  * igt@gem_userptr_blits@vma-merge:
    - shard-snb:          NOTRUN -> [FAIL][23] ([i915#2724])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-snb6/igt@gem_userptr_blits@vma-merge.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-tglb:         [PASS][24] -> [INCOMPLETE][25] ([i915#456])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-tglb6/igt@gem_workarounds@suspend-resume-context.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb7/igt@gem_workarounds@suspend-resume-context.html

  * igt@gen7_exec_parse@basic-rejected:
    - shard-tglb:         NOTRUN -> [SKIP][26] ([fdo#109289])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb6/igt@gen7_exec_parse@basic-rejected.html
    - shard-iclb:         NOTRUN -> [SKIP][27] ([fdo#109289])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb8/igt@gen7_exec_parse@basic-rejected.html

  * igt@gen9_exec_parse@allowed-all:
    - shard-tglb:         NOTRUN -> [SKIP][28] ([i915#2856])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb3/igt@gen9_exec_parse@allowed-all.html

  * igt@i915_pm_dc@dc6-dpms:
    - shard-iclb:         [PASS][29] -> [FAIL][30] ([i915#454]) +1 similar issue
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-iclb8/igt@i915_pm_dc@dc6-dpms.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb3/igt@i915_pm_dc@dc6-dpms.html

  * igt@i915_pm_rpm@system-suspend-execbuf:
    - shard-tglb:         [PASS][31] -> [INCOMPLETE][32] ([i915#2411] / [i915#456] / [i915#750])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-tglb6/igt@i915_pm_rpm@system-suspend-execbuf.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb7/igt@i915_pm_rpm@system-suspend-execbuf.html

  * igt@i915_selftest@live@hangcheck:
    - shard-snb:          NOTRUN -> [INCOMPLETE][33] ([i915#3921])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-snb5/igt@i915_selftest@live@hangcheck.html

  * igt@i915_selftest@mock@requests:
    - shard-skl:          [PASS][34] -> [INCOMPLETE][35] ([i915#198])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-skl9/igt@i915_selftest@mock@requests.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl2/igt@i915_selftest@mock@requests.html

  * igt@i915_suspend@fence-restore-untiled:
    - shard-kbl:          [PASS][36] -> [DMESG-WARN][37] ([i915#180])
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl2/igt@i915_suspend@fence-restore-untiled.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl1/igt@i915_suspend@fence-restore-untiled.html

  * igt@kms_big_fb@linear-32bpp-rotate-90:
    - shard-iclb:         NOTRUN -> [SKIP][38] ([fdo#110725] / [fdo#111614])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb8/igt@kms_big_fb@linear-32bpp-rotate-90.html
    - shard-tglb:         NOTRUN -> [SKIP][39] ([fdo#111614])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb6/igt@kms_big_fb@linear-32bpp-rotate-90.html

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

  * igt@kms_big_fb@yf-tiled-64bpp-rotate-0:
    - shard-tglb:         NOTRUN -> [SKIP][41] ([fdo#111615])
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb6/igt@kms_big_fb@yf-tiled-64bpp-rotate-0.html
    - shard-iclb:         NOTRUN -> [SKIP][42] ([fdo#110723])
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb8/igt@kms_big_fb@yf-tiled-64bpp-rotate-0.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0:
    - shard-apl:          NOTRUN -> [SKIP][43] ([fdo#109271]) +168 similar issues
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-apl2/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0.html

  * igt@kms_ccs@pipe-b-random-ccs-data-y_tiled_gen12_mc_ccs:
    - shard-kbl:          NOTRUN -> [SKIP][44] ([fdo#109271] / [i915#3886]) +6 similar issues
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl7/igt@kms_ccs@pipe-b-random-ccs-data-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-c-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc:
    - shard-apl:          NOTRUN -> [SKIP][45] ([fdo#109271] / [i915#3886]) +13 similar issues
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-apl6/igt@kms_ccs@pipe-c-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-c-crc-primary-rotation-180-y_tiled_gen12_mc_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][46] ([i915#3689] / [i915#3886]) +2 similar issues
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb3/igt@kms_ccs@pipe-c-crc-primary-rotation-180-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc:
    - shard-skl:          NOTRUN -> [SKIP][47] ([fdo#109271] / [i915#3886]) +2 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl6/igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_gen12_rc_ccs:
    - shard-iclb:         NOTRUN -> [SKIP][48] ([fdo#109278]) +2 similar issues
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb8/igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_gen12_rc_ccs.html

  * igt@kms_chamelium@dp-crc-multiple:
    - shard-skl:          NOTRUN -> [SKIP][49] ([fdo#109271] / [fdo#111827]) +2 similar issues
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl3/igt@kms_chamelium@dp-crc-multiple.html

  * igt@kms_chamelium@vga-hpd:
    - shard-apl:          NOTRUN -> [SKIP][50] ([fdo#109271] / [fdo#111827]) +13 similar issues
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-apl1/igt@kms_chamelium@vga-hpd.html

  * igt@kms_chamelium@vga-hpd-without-ddc:
    - shard-snb:          NOTRUN -> [SKIP][51] ([fdo#109271] / [fdo#111827]) +15 similar issues
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-snb6/igt@kms_chamelium@vga-hpd-without-ddc.html

  * igt@kms_color@pipe-c-ctm-0-25:
    - shard-skl:          [PASS][52] -> [DMESG-WARN][53] ([i915#1982])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-skl6/igt@kms_color@pipe-c-ctm-0-25.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl1/igt@kms_color@pipe-c-ctm-0-25.html

  * igt@kms_color_chamelium@pipe-b-ctm-limited-range:
    - shard-tglb:         NOTRUN -> [SKIP][54] ([fdo#109284] / [fdo#111827]) +2 similar issues
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb6/igt@kms_color_chamelium@pipe-b-ctm-limited-range.html
    - shard-iclb:         NOTRUN -> [SKIP][55] ([fdo#109284] / [fdo#111827])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb8/igt@kms_color_chamelium@pipe-b-ctm-limited-range.html

  * igt@kms_color_chamelium@pipe-b-degamma:
    - shard-kbl:          NOTRUN -> [SKIP][56] ([fdo#109271] / [fdo#111827]) +4 similar issues
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl6/igt@kms_color_chamelium@pipe-b-degamma.html

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

  * igt@kms_cursor_crc@pipe-c-cursor-32x32-rapid-movement:
    - shard-tglb:         NOTRUN -> [SKIP][58] ([i915#3319])
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb6/igt@kms_cursor_crc@pipe-c-cursor-32x32-rapid-movement.html

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

  * igt@kms_cursor_crc@pipe-d-cursor-max-size-rapid-movement:
    - shard-tglb:         NOTRUN -> [SKIP][60] ([i915#3359]) +1 similar issue
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb3/igt@kms_cursor_crc@pipe-d-cursor-max-size-rapid-movement.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
    - shard-skl:          [PASS][61] -> [FAIL][62] ([i915#2346] / [i915#533])
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-skl3/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl10/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

  * igt@kms_cursor_legacy@pipe-d-torture-bo:
    - shard-apl:          NOTRUN -> [SKIP][63] ([fdo#109271] / [i915#533]) +1 similar issue
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-apl1/igt@kms_cursor_legacy@pipe-d-torture-bo.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-tglb:         [PASS][64] -> [INCOMPLETE][65] ([i915#2411] / [i915#456])
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-tglb3/igt@kms_fbcon_fbt@fbc-suspend.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb7/igt@kms_fbcon_fbt@fbc-suspend.html
    - shard-kbl:          [PASS][66] -> [INCOMPLETE][67] ([i915#180] / [i915#636])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl3/igt@kms_fbcon_fbt@fbc-suspend.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl6/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2:
    - shard-glk:          [PASS][68] -> [FAIL][69] ([i915#2122])
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-glk8/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-glk7/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2.html

  * igt@kms_flip@flip-vs-expired-vblank@a-edp1:
    - shard-skl:          [PASS][70] -> [FAIL][71] ([i915#79])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-skl3/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl10/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
    - shard-apl:          NOTRUN -> [DMESG-WARN][72] ([i915#180]) +1 similar issue
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-apl1/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs:
    - shard-kbl:          NOTRUN -> [SKIP][73] ([fdo#109271] / [i915#2672])
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl4/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-blt:
    - shard-skl:          NOTRUN -> [SKIP][74] ([fdo#109271]) +77 similar issues
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl5/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-blt.html

  * igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-draw-mmap-gtt:
    - shard-tglb:         NOTRUN -> [SKIP][75] ([fdo#111825]) +7 similar issues
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb6/igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-draw-mmap-gtt.html
    - shard-iclb:         NOTRUN -> [SKIP][76] ([fdo#109280])
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb8/igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-draw-mmap-gtt.html

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

  * igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence:
    - shard-skl:          NOTRUN -> [SKIP][78] ([fdo#109271] / [i915#533]) +1 similar issue
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl6/igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-kbl:          NOTRUN -> [DMESG-WARN][79] ([i915#180])
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl6/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
    - shard-apl:          NOTRUN -> [FAIL][80] ([fdo#108145] / [i915#265]) +2 similar issues
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-apl1/igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb.html

  * igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:
    - shard-apl:          NOTRUN -> [FAIL][81] ([i915#265])
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-apl2/igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb.html
    - shard-kbl:          NOTRUN -> [FAIL][82] ([i915#265])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl7/igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb.html

  * igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
    - shard-skl:          NOTRUN -> [FAIL][83] ([fdo#108145] / [i915#265]) +2 similar issues
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl3/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html

  * igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
    - shard-kbl:          NOTRUN -> [FAIL][84] ([fdo#108145] / [i915#265])
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl6/igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb.html

  * igt@kms_plane_lowres@pipe-a-tiling-yf:
    - shard-tglb:         NOTRUN -> [SKIP][85] ([fdo#112054])
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb3/igt@kms_plane_lowres@pipe-a-tiling-yf.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-5:
    - shard-skl:          NOTRUN -> [SKIP][86] ([fdo#109271] / [i915#658])
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl5/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-5.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-5:
    - shard-apl:          NOTRUN -> [SKIP][87] ([fdo#109271] / [i915#658]) +2 similar issues
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-apl2/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-5.html
    - shard-tglb:         NOTRUN -> [SKIP][88] ([i915#2920])
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb3/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-5.html
    - shard-kbl:          NOTRUN -> [SKIP][89] ([fdo#109271] / [i915#658]) +1 similar issue
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl7/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-5.html

  * igt@kms_psr@psr2_suspend:
    - shard-iclb:         [PASS][90] -> [SKIP][91] ([fdo#109441]) +1 similar issue
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-iclb2/igt@kms_psr@psr2_suspend.html
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb1/igt@kms_psr@psr2_suspend.html

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-kbl:          [PASS][92] -> [DMESG-WARN][93] ([i915#180] / [i915#295])
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl4/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl1/igt@kms_vblank@pipe-a-ts-continuation-suspend.html

  * igt@nouveau_crc@pipe-b-source-rg:
    - shard-iclb:         NOTRUN -> [SKIP][94] ([i915#2530])
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb8/igt@nouveau_crc@pipe-b-source-rg.html

  * igt@prime_nv_test@i915_import_pread_pwrite:
    - shard-tglb:         NOTRUN -> [SKIP][95] ([fdo#109291])
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb6/igt@prime_nv_test@i915_import_pread_pwrite.html
    - shard-iclb:         NOTRUN -> [SKIP][96] ([fdo#109291])
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb8/igt@prime_nv_test@i915_import_pread_pwrite.html

  * igt@sysfs_clients@sema-10:
    - shard-tglb:         NOTRUN -> [SKIP][97] ([i915#2994])
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb3/igt@sysfs_clients@sema-10.html
    - shard-kbl:          NOTRUN -> [SKIP][98] ([fdo#109271] / [i915#2994]) +1 similar issue
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl7/igt@sysfs_clients@sema-10.html
    - shard-apl:          NOTRUN -> [SKIP][99] ([fdo#109271] / [i915#2994])
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-apl2/igt@sysfs_clients@sema-10.html

  
#### Possible fixes ####

  * igt@gem_ctx_persistence@engines-cleanup@vecs0:
    - shard-skl:          [DMESG-WARN][100] ([i915#1982]) -> [PASS][101] +1 similar issue
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-skl5/igt@gem_ctx_persistence@engines-cleanup@vecs0.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl6/igt@gem_ctx_persistence@engines-cleanup@vecs0.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
    - shard-tglb:         [FAIL][102] ([i915#2842]) -> [PASS][103] +1 similar issue
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-tglb1/igt@gem_exec_fair@basic-pace-solo@rcs0.html
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb5/igt@gem_exec_fair@basic-pace-solo@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs1:
    - shard-kbl:          [FAIL][104] ([i915#2842]) -> [PASS][105]
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl4/igt@gem_exec_fair@basic-pace@vcs1.html
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl4/igt@gem_exec_fair@basic-pace@vcs1.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          [FAIL][106] ([i915#2842]) -> [PASS][107] +1 similar issue
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-glk9/igt@gem_exec_fair@basic-throttle@rcs0.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-glk5/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_exec_whisper@basic-queues-forked:
    - shard-glk:          [DMESG-WARN][108] ([i915#118]) -> [PASS][109] +3 similar issues
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-glk7/igt@gem_exec_whisper@basic-queues-forked.html
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-glk3/igt@gem_exec_whisper@basic-queues-forked.html

  * igt@kms_async_flips@alternate-sync-async-flip:
    - shard-skl:          [FAIL][110] ([i915#2521]) -> [PASS][111]
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-skl5/igt@kms_async_flips@alternate-sync-async-flip.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl6/igt@kms_async_flips@alternate-sync-async-flip.html

  * igt@kms_async_flips@async-flip-with-page-flip-events:
    - shard-skl:          [FAIL][112] -> [PASS][113]
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-skl6/igt@kms_async_flips@async-flip-with-page-flip-events.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl1/igt@kms_async_flips@async-flip-with-page-flip-events.html

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@bc-hdmi-a1-hdmi-a2:
    - shard-glk:          [FAIL][114] ([i915#79]) -> [PASS][115]
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-glk8/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@bc-hdmi-a1-hdmi-a2.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-glk7/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@bc-hdmi-a1-hdmi-a2.html

  * igt@kms_hdr@bpc-switch-suspend:
    - shard-kbl:          [DMESG-WARN][116] ([i915#180]) -> [PASS][117] +2 similar issues
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl1/igt@kms_hdr@bpc-switch-suspend.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl6/igt@kms_hdr@bpc-switch-suspend.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d:
    - shard-tglb:         [INCOMPLETE][118] ([i915#4184] / [i915#456]) -> [PASS][119]
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-tglb7/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-tglb6/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d.html

  * igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
    - shard-skl:          [FAIL][120] ([fdo#108145] / [i915#265]) -> [PASS][121] +1 similar issue
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-skl2/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl9/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html

  * igt@kms_psr@psr2_cursor_render:
    - shard-iclb:         [SKIP][122] ([fdo#109441]) -> [PASS][123]
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-iclb8/igt@kms_psr@psr2_cursor_render.html
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb2/igt@kms_psr@psr2_cursor_render.html

  * igt@kms_psr@suspend:
    - shard-skl:          [INCOMPLETE][124] ([i915#198]) -> [PASS][125] +1 similar issue
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-skl1/igt@kms_psr@suspend.html
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl3/igt@kms_psr@suspend.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-skl:          [INCOMPLETE][126] ([i915#198] / [i915#2828]) -> [PASS][127]
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-skl10/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-skl5/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  
#### Warnings ####

  * igt@kms_psr2_sf@plane-move-sf-dmg-area-0:
    - shard-iclb:         [SKIP][128] ([i915#658]) -> [SKIP][129] ([i915#2920]) +2 similar issues
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-iclb8/igt@kms_psr2_sf@plane-move-sf-dmg-area-0.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb2/igt@kms_psr2_sf@plane-move-sf-dmg-area-0.html

  * igt@kms_psr2_sf@plane-move-sf-dmg-area-1:
    - shard-iclb:         [SKIP][130] ([i915#2920]) -> [SKIP][131] ([i915#658])
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-iclb2/igt@kms_psr2_sf@plane-move-sf-dmg-area-1.html
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-iclb1/igt@kms_psr2_sf@plane-move-sf-dmg-area-1.html

  * igt@runner@aborted:
    - shard-kbl:          ([FAIL][132], [FAIL][133], [FAIL][134], [FAIL][135], [FAIL][136], [FAIL][137], [FAIL][138], [FAIL][139]) ([i915#1436] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363]) -> ([FAIL][140], [FAIL][141], [FAIL][142], [FAIL][143], [FAIL][144], [FAIL][145], [FAIL][146], [FAIL][147], [FAIL][148]) ([i915#1436] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#602] / [i915#92])
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl3/igt@runner@aborted.html
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl1/igt@runner@aborted.html
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl1/igt@runner@aborted.html
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl1/igt@runner@aborted.html
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl6/igt@runner@aborted.html
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl2/igt@runner@aborted.html
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl6/igt@runner@aborted.html
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10712/shard-kbl6/igt@runner@aborted.html
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl1/igt@runner@aborted.html
   [141]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl1/igt@runner@aborted.html
   [142]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl1/igt@runner@aborted.html
   [143]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl6/igt@runner@aborted.html
   [144]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl4/igt@runner@aborted.html
   [145]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl6/igt@runner@aborted.html
   [146]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl6/igt@runner@aborted.html
   [147]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21303/shard-kbl6/igt@runner@aborted.html

== Logs ==

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

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

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

* Re: [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
  2021-10-08 12:19       ` [Intel-gfx] " Christian König
@ 2021-10-11 12:32         ` Tvrtko Ursulin
  -1 siblings, 0 replies; 20+ messages in thread
From: Tvrtko Ursulin @ 2021-10-11 12:32 UTC (permalink / raw)
  To: Christian König, Intel-gfx
  Cc: dri-devel, Tvrtko Ursulin, Daniel Vetter, Sumit Semwal,
	linux-media, linaro-mm-sig


On 08/10/2021 13:19, Christian König wrote:
> Am 08.10.21 um 12:49 schrieb Tvrtko Ursulin:
>>
>> On 08/10/2021 11:21, Christian König wrote:
>>> Am 08.10.21 um 11:50 schrieb Tvrtko Ursulin:
>>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>
>>>> Cache the count of shared fences in the iterator to avoid dereferencing
>>>> the dma_resv_object outside the RCU protection. Otherwise iterator 
>>>> and its
>>>> users can observe an incosistent state which makes it impossible to use
>>>> safely.
>>>
>>> Ah, of course! I've been staring at the code the whole morning and 
>>> couldn't see it.
>>>
>>> Going to write a testcase to cover that.
>>>
>>>> Such as:
>>>>
>>>> <6> [187.517041] [IGT] gem_sync: executing
>>>> <7> [187.536343] i915 0000:00:02.0: 
>>>> [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
>>>> <7> [187.536793] i915 0000:00:02.0: 
>>>> [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
>>>> <6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
>>>> <1> [188.935462] BUG: kernel NULL pointer dereference, address: 
>>>> 0000000000000010
>>>> <1> [188.935485] #PF: supervisor write access in kernel mode
>>>> <1> [188.935495] #PF: error_code(0x0002) - not-present page
>>>> <6> [188.935504] PGD 0 P4D 0
>>>> <4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
>>>> <4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 
>>>> 5.15.0-rc4-CI-Patchwork_21264+ #1
>>>> <4> [188.935535] Hardware name:  /NUC6CAYB, BIOS 
>>>> AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
>>>> <4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
>>>> <4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df ff 
>>>> eb bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 48 01 
>>>> 41 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 75 8c 48 
>>>> 8b 44 24 10
>>>> <4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
>>>> <4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 
>>>> 0000000000000001
>>>> <4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: 
>>>> ffffc900011dbcc8
>>>> <4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 
>>>> 00000000fffffffe
>>>> <4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: 
>>>> ffffc900011dbd44
>>>> <4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 
>>>> 0000000000000000
>>>> <4> [188.935643] FS:  00007f68d17e9700(0000) 
>>>> GS:ffff888277900000(0000) knlGS:0000000000000000
>>>> <4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>>> <4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 
>>>> 00000000003506e0
>>>> <4> [188.935676] Call Trace:
>>>> <4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
>>>> <4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
>>>> <4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
>>>> <4> [188.936533]  drm_ioctl_kernel+0xae/0x140
>>>> <4> [188.936546]  drm_ioctl+0x201/0x3d0
>>>> <4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
>>>> <4> [188.936820]  ? __fget_files+0xc2/0x1c0
>>>> <4> [188.936830]  ? __fget_files+0xda/0x1c0
>>>> <4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
>>>> <4> [188.936848]  do_syscall_64+0x3a/0xb0
>>>> <4> [188.936859] entry_SYSCALL_64_after_hwframe+0x44/0xae
>>>>
>>>> If the shared object has changed during the RCU unlocked period
>>>> callers will correctly handle the restart on the next iteration.
>>>>
>>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>> Fixes: 96601e8a4755 ("dma-buf: use new iterator in 
>>>> dma_resv_copy_fences")
>>>> Fixes: d3c80698c9f5 ("dma-buf: use new iterator in 
>>>> dma_resv_get_fences v3")
>>>> Closes: 
>>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2F-%2Fissues%2F4274&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7Cc22feea06a3f4285cdac08d98a495984%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637692870805160909%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6oPR30sWnJe04I4GlhhvJWX3QvwKFIOMW1uOIyWZFOE%3D&amp;reserved=0 
>>>>
>>>> Cc: Christian König <christian.koenig@amd.com>
>>>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>>>> Cc: Sumit Semwal <sumit.semwal@linaro.org>
>>>> Cc: linux-media@vger.kernel.org
>>>> Cc: dri-devel@lists.freedesktop.org
>>>> Cc: linaro-mm-sig@lists.linaro.org
>>>
>>> Maybe we should remove cursor->fences altogether, but either way the 
>>> patch is Reviewed-by: Christian König <christian.koenig@amd.com>
>>>
>>> Please push to drm-misc-next ASAP.
>>
>> Not sure I can or if my push permissions are limited to Intel 
>> branches. I can try once CI gives a green light.
> 
> If it doesn't work just ping me and I will push it.

It finally passed CI but it looks like you'll need to push it:

tursulin@tursulin-mobl2:~/wc/dim/src$ dim push-branch drm-misc-next
Enumerating objects: 15, done.
Counting objects: 100% (15/15), done.
Delta compression using up to 8 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 2.32 KiB | 593.00 KiB/s, done.
Total 8 (delta 7), reused 0 (delta 0), pack-reused 0
error: remote unpack failed: unable to create temporary object directory
To ssh://git.freedesktop.org/git/drm/drm-misc
  ! [remote rejected]           drm-misc-next -> drm-misc-next (unpacker error)
error: failed to push some refs to 'ssh://git.freedesktop.org/git/drm/drm-misc'

Regards,

Tvrtko

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

* Re: [Intel-gfx] [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
@ 2021-10-11 12:32         ` Tvrtko Ursulin
  0 siblings, 0 replies; 20+ messages in thread
From: Tvrtko Ursulin @ 2021-10-11 12:32 UTC (permalink / raw)
  To: Christian König, Intel-gfx
  Cc: dri-devel, Tvrtko Ursulin, Daniel Vetter, Sumit Semwal,
	linux-media, linaro-mm-sig


On 08/10/2021 13:19, Christian König wrote:
> Am 08.10.21 um 12:49 schrieb Tvrtko Ursulin:
>>
>> On 08/10/2021 11:21, Christian König wrote:
>>> Am 08.10.21 um 11:50 schrieb Tvrtko Ursulin:
>>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>
>>>> Cache the count of shared fences in the iterator to avoid dereferencing
>>>> the dma_resv_object outside the RCU protection. Otherwise iterator 
>>>> and its
>>>> users can observe an incosistent state which makes it impossible to use
>>>> safely.
>>>
>>> Ah, of course! I've been staring at the code the whole morning and 
>>> couldn't see it.
>>>
>>> Going to write a testcase to cover that.
>>>
>>>> Such as:
>>>>
>>>> <6> [187.517041] [IGT] gem_sync: executing
>>>> <7> [187.536343] i915 0000:00:02.0: 
>>>> [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
>>>> <7> [187.536793] i915 0000:00:02.0: 
>>>> [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
>>>> <6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
>>>> <1> [188.935462] BUG: kernel NULL pointer dereference, address: 
>>>> 0000000000000010
>>>> <1> [188.935485] #PF: supervisor write access in kernel mode
>>>> <1> [188.935495] #PF: error_code(0x0002) - not-present page
>>>> <6> [188.935504] PGD 0 P4D 0
>>>> <4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
>>>> <4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 
>>>> 5.15.0-rc4-CI-Patchwork_21264+ #1
>>>> <4> [188.935535] Hardware name:  /NUC6CAYB, BIOS 
>>>> AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
>>>> <4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
>>>> <4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df ff 
>>>> eb bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 48 01 
>>>> 41 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 75 8c 48 
>>>> 8b 44 24 10
>>>> <4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
>>>> <4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 
>>>> 0000000000000001
>>>> <4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: 
>>>> ffffc900011dbcc8
>>>> <4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 
>>>> 00000000fffffffe
>>>> <4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: 
>>>> ffffc900011dbd44
>>>> <4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 
>>>> 0000000000000000
>>>> <4> [188.935643] FS:  00007f68d17e9700(0000) 
>>>> GS:ffff888277900000(0000) knlGS:0000000000000000
>>>> <4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>>> <4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 
>>>> 00000000003506e0
>>>> <4> [188.935676] Call Trace:
>>>> <4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
>>>> <4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
>>>> <4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
>>>> <4> [188.936533]  drm_ioctl_kernel+0xae/0x140
>>>> <4> [188.936546]  drm_ioctl+0x201/0x3d0
>>>> <4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
>>>> <4> [188.936820]  ? __fget_files+0xc2/0x1c0
>>>> <4> [188.936830]  ? __fget_files+0xda/0x1c0
>>>> <4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
>>>> <4> [188.936848]  do_syscall_64+0x3a/0xb0
>>>> <4> [188.936859] entry_SYSCALL_64_after_hwframe+0x44/0xae
>>>>
>>>> If the shared object has changed during the RCU unlocked period
>>>> callers will correctly handle the restart on the next iteration.
>>>>
>>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>> Fixes: 96601e8a4755 ("dma-buf: use new iterator in 
>>>> dma_resv_copy_fences")
>>>> Fixes: d3c80698c9f5 ("dma-buf: use new iterator in 
>>>> dma_resv_get_fences v3")
>>>> Closes: 
>>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2F-%2Fissues%2F4274&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7Cc22feea06a3f4285cdac08d98a495984%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637692870805160909%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6oPR30sWnJe04I4GlhhvJWX3QvwKFIOMW1uOIyWZFOE%3D&amp;reserved=0 
>>>>
>>>> Cc: Christian König <christian.koenig@amd.com>
>>>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>>>> Cc: Sumit Semwal <sumit.semwal@linaro.org>
>>>> Cc: linux-media@vger.kernel.org
>>>> Cc: dri-devel@lists.freedesktop.org
>>>> Cc: linaro-mm-sig@lists.linaro.org
>>>
>>> Maybe we should remove cursor->fences altogether, but either way the 
>>> patch is Reviewed-by: Christian König <christian.koenig@amd.com>
>>>
>>> Please push to drm-misc-next ASAP.
>>
>> Not sure I can or if my push permissions are limited to Intel 
>> branches. I can try once CI gives a green light.
> 
> If it doesn't work just ping me and I will push it.

It finally passed CI but it looks like you'll need to push it:

tursulin@tursulin-mobl2:~/wc/dim/src$ dim push-branch drm-misc-next
Enumerating objects: 15, done.
Counting objects: 100% (15/15), done.
Delta compression using up to 8 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 2.32 KiB | 593.00 KiB/s, done.
Total 8 (delta 7), reused 0 (delta 0), pack-reused 0
error: remote unpack failed: unable to create temporary object directory
To ssh://git.freedesktop.org/git/drm/drm-misc
  ! [remote rejected]           drm-misc-next -> drm-misc-next (unpacker error)
error: failed to push some refs to 'ssh://git.freedesktop.org/git/drm/drm-misc'

Regards,

Tvrtko

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

* Re: [Linaro-mm-sig] [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
  2021-10-11 12:32         ` [Intel-gfx] " Tvrtko Ursulin
@ 2021-10-11 14:15           ` Christian König
  -1 siblings, 0 replies; 20+ messages in thread
From: Christian König @ 2021-10-11 14:15 UTC (permalink / raw)
  To: Tvrtko Ursulin, Christian König, Intel-gfx
  Cc: Tvrtko Ursulin, dri-devel, linaro-mm-sig, linux-media

Am 11.10.21 um 14:32 schrieb Tvrtko Ursulin:
>
> On 08/10/2021 13:19, Christian König wrote:
>> Am 08.10.21 um 12:49 schrieb Tvrtko Ursulin:
>>>
>>> On 08/10/2021 11:21, Christian König wrote:
>>>> Am 08.10.21 um 11:50 schrieb Tvrtko Ursulin:
>>>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>>
>>>>> Cache the count of shared fences in the iterator to avoid 
>>>>> dereferencing
>>>>> the dma_resv_object outside the RCU protection. Otherwise iterator 
>>>>> and its
>>>>> users can observe an incosistent state which makes it impossible 
>>>>> to use
>>>>> safely.
>>>>
>>>> Ah, of course! I've been staring at the code the whole morning and 
>>>> couldn't see it.
>>>>
>>>> Going to write a testcase to cover that.
>>>>
>>>>> Such as:
>>>>>
>>>>> <6> [187.517041] [IGT] gem_sync: executing
>>>>> <7> [187.536343] i915 0000:00:02.0: 
>>>>> [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
>>>>> <7> [187.536793] i915 0000:00:02.0: 
>>>>> [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
>>>>> <6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
>>>>> <1> [188.935462] BUG: kernel NULL pointer dereference, address: 
>>>>> 0000000000000010
>>>>> <1> [188.935485] #PF: supervisor write access in kernel mode
>>>>> <1> [188.935495] #PF: error_code(0x0002) - not-present page
>>>>> <6> [188.935504] PGD 0 P4D 0
>>>>> <4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
>>>>> <4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 
>>>>> 5.15.0-rc4-CI-Patchwork_21264+ #1
>>>>> <4> [188.935535] Hardware name:  /NUC6CAYB, BIOS 
>>>>> AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
>>>>> <4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
>>>>> <4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df 
>>>>> ff eb bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 
>>>>> 48 01 41 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 
>>>>> 75 8c 48 8b 44 24 10
>>>>> <4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
>>>>> <4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 
>>>>> 0000000000000001
>>>>> <4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: 
>>>>> ffffc900011dbcc8
>>>>> <4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 
>>>>> 00000000fffffffe
>>>>> <4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: 
>>>>> ffffc900011dbd44
>>>>> <4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 
>>>>> 0000000000000000
>>>>> <4> [188.935643] FS:  00007f68d17e9700(0000) 
>>>>> GS:ffff888277900000(0000) knlGS:0000000000000000
>>>>> <4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>>>> <4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 
>>>>> 00000000003506e0
>>>>> <4> [188.935676] Call Trace:
>>>>> <4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
>>>>> <4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
>>>>> <4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
>>>>> <4> [188.936533]  drm_ioctl_kernel+0xae/0x140
>>>>> <4> [188.936546]  drm_ioctl+0x201/0x3d0
>>>>> <4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
>>>>> <4> [188.936820]  ? __fget_files+0xc2/0x1c0
>>>>> <4> [188.936830]  ? __fget_files+0xda/0x1c0
>>>>> <4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
>>>>> <4> [188.936848]  do_syscall_64+0x3a/0xb0
>>>>> <4> [188.936859] entry_SYSCALL_64_after_hwframe+0x44/0xae
>>>>>
>>>>> If the shared object has changed during the RCU unlocked period
>>>>> callers will correctly handle the restart on the next iteration.
>>>>>
>>>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>> Fixes: 96601e8a4755 ("dma-buf: use new iterator in 
>>>>> dma_resv_copy_fences")
>>>>> Fixes: d3c80698c9f5 ("dma-buf: use new iterator in 
>>>>> dma_resv_get_fences v3")
>>>>> Closes: 
>>>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2F-%2Fissues%2F4274&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7Cc22feea06a3f4285cdac08d98a495984%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637692870805160909%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6oPR30sWnJe04I4GlhhvJWX3QvwKFIOMW1uOIyWZFOE%3D&amp;reserved=0 
>>>>>
>>>>> Cc: Christian König <christian.koenig@amd.com>
>>>>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>>>>> Cc: Sumit Semwal <sumit.semwal@linaro.org>
>>>>> Cc: linux-media@vger.kernel.org
>>>>> Cc: dri-devel@lists.freedesktop.org
>>>>> Cc: linaro-mm-sig@lists.linaro.org
>>>>
>>>> Maybe we should remove cursor->fences altogether, but either way 
>>>> the patch is Reviewed-by: Christian König <christian.koenig@amd.com>
>>>>
>>>> Please push to drm-misc-next ASAP.
>>>
>>> Not sure I can or if my push permissions are limited to Intel 
>>> branches. I can try once CI gives a green light.
>>
>> If it doesn't work just ping me and I will push it.
>
> It finally passed CI but it looks like you'll need to push it:

Done.

Christian.

>
> tursulin@tursulin-mobl2:~/wc/dim/src$ dim push-branch drm-misc-next
> Enumerating objects: 15, done.
> Counting objects: 100% (15/15), done.
> Delta compression using up to 8 threads
> Compressing objects: 100% (8/8), done.
> Writing objects: 100% (8/8), 2.32 KiB | 593.00 KiB/s, done.
> Total 8 (delta 7), reused 0 (delta 0), pack-reused 0
> error: remote unpack failed: unable to create temporary object directory
> To ssh://git.freedesktop.org/git/drm/drm-misc
>  ! [remote rejected]           drm-misc-next -> drm-misc-next 
> (unpacker error)
> error: failed to push some refs to 
> 'ssh://git.freedesktop.org/git/drm/drm-misc'
>
> Regards,
>
> Tvrtko
> _______________________________________________
> Linaro-mm-sig mailing list
> Linaro-mm-sig@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/linaro-mm-sig


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

* Re: [Intel-gfx] [Linaro-mm-sig] [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion
@ 2021-10-11 14:15           ` Christian König
  0 siblings, 0 replies; 20+ messages in thread
From: Christian König @ 2021-10-11 14:15 UTC (permalink / raw)
  To: Tvrtko Ursulin, Christian König, Intel-gfx
  Cc: Tvrtko Ursulin, dri-devel, linaro-mm-sig, linux-media

Am 11.10.21 um 14:32 schrieb Tvrtko Ursulin:
>
> On 08/10/2021 13:19, Christian König wrote:
>> Am 08.10.21 um 12:49 schrieb Tvrtko Ursulin:
>>>
>>> On 08/10/2021 11:21, Christian König wrote:
>>>> Am 08.10.21 um 11:50 schrieb Tvrtko Ursulin:
>>>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>>
>>>>> Cache the count of shared fences in the iterator to avoid 
>>>>> dereferencing
>>>>> the dma_resv_object outside the RCU protection. Otherwise iterator 
>>>>> and its
>>>>> users can observe an incosistent state which makes it impossible 
>>>>> to use
>>>>> safely.
>>>>
>>>> Ah, of course! I've been staring at the code the whole morning and 
>>>> couldn't see it.
>>>>
>>>> Going to write a testcase to cover that.
>>>>
>>>>> Such as:
>>>>>
>>>>> <6> [187.517041] [IGT] gem_sync: executing
>>>>> <7> [187.536343] i915 0000:00:02.0: 
>>>>> [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
>>>>> <7> [187.536793] i915 0000:00:02.0: 
>>>>> [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
>>>>> <6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
>>>>> <1> [188.935462] BUG: kernel NULL pointer dereference, address: 
>>>>> 0000000000000010
>>>>> <1> [188.935485] #PF: supervisor write access in kernel mode
>>>>> <1> [188.935495] #PF: error_code(0x0002) - not-present page
>>>>> <6> [188.935504] PGD 0 P4D 0
>>>>> <4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
>>>>> <4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 
>>>>> 5.15.0-rc4-CI-Patchwork_21264+ #1
>>>>> <4> [188.935535] Hardware name:  /NUC6CAYB, BIOS 
>>>>> AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
>>>>> <4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
>>>>> <4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df 
>>>>> ff eb bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 
>>>>> 48 01 41 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 
>>>>> 75 8c 48 8b 44 24 10
>>>>> <4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
>>>>> <4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 
>>>>> 0000000000000001
>>>>> <4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: 
>>>>> ffffc900011dbcc8
>>>>> <4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 
>>>>> 00000000fffffffe
>>>>> <4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: 
>>>>> ffffc900011dbd44
>>>>> <4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 
>>>>> 0000000000000000
>>>>> <4> [188.935643] FS:  00007f68d17e9700(0000) 
>>>>> GS:ffff888277900000(0000) knlGS:0000000000000000
>>>>> <4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>>>> <4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 
>>>>> 00000000003506e0
>>>>> <4> [188.935676] Call Trace:
>>>>> <4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
>>>>> <4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
>>>>> <4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
>>>>> <4> [188.936533]  drm_ioctl_kernel+0xae/0x140
>>>>> <4> [188.936546]  drm_ioctl+0x201/0x3d0
>>>>> <4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
>>>>> <4> [188.936820]  ? __fget_files+0xc2/0x1c0
>>>>> <4> [188.936830]  ? __fget_files+0xda/0x1c0
>>>>> <4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
>>>>> <4> [188.936848]  do_syscall_64+0x3a/0xb0
>>>>> <4> [188.936859] entry_SYSCALL_64_after_hwframe+0x44/0xae
>>>>>
>>>>> If the shared object has changed during the RCU unlocked period
>>>>> callers will correctly handle the restart on the next iteration.
>>>>>
>>>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>> Fixes: 96601e8a4755 ("dma-buf: use new iterator in 
>>>>> dma_resv_copy_fences")
>>>>> Fixes: d3c80698c9f5 ("dma-buf: use new iterator in 
>>>>> dma_resv_get_fences v3")
>>>>> Closes: 
>>>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Fintel%2F-%2Fissues%2F4274&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7Cc22feea06a3f4285cdac08d98a495984%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637692870805160909%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=6oPR30sWnJe04I4GlhhvJWX3QvwKFIOMW1uOIyWZFOE%3D&amp;reserved=0 
>>>>>
>>>>> Cc: Christian König <christian.koenig@amd.com>
>>>>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>>>>> Cc: Sumit Semwal <sumit.semwal@linaro.org>
>>>>> Cc: linux-media@vger.kernel.org
>>>>> Cc: dri-devel@lists.freedesktop.org
>>>>> Cc: linaro-mm-sig@lists.linaro.org
>>>>
>>>> Maybe we should remove cursor->fences altogether, but either way 
>>>> the patch is Reviewed-by: Christian König <christian.koenig@amd.com>
>>>>
>>>> Please push to drm-misc-next ASAP.
>>>
>>> Not sure I can or if my push permissions are limited to Intel 
>>> branches. I can try once CI gives a green light.
>>
>> If it doesn't work just ping me and I will push it.
>
> It finally passed CI but it looks like you'll need to push it:

Done.

Christian.

>
> tursulin@tursulin-mobl2:~/wc/dim/src$ dim push-branch drm-misc-next
> Enumerating objects: 15, done.
> Counting objects: 100% (15/15), done.
> Delta compression using up to 8 threads
> Compressing objects: 100% (8/8), done.
> Writing objects: 100% (8/8), 2.32 KiB | 593.00 KiB/s, done.
> Total 8 (delta 7), reused 0 (delta 0), pack-reused 0
> error: remote unpack failed: unable to create temporary object directory
> To ssh://git.freedesktop.org/git/drm/drm-misc
>  ! [remote rejected]           drm-misc-next -> drm-misc-next 
> (unpacker error)
> error: failed to push some refs to 
> 'ssh://git.freedesktop.org/git/drm/drm-misc'
>
> Regards,
>
> Tvrtko
> _______________________________________________
> Linaro-mm-sig mailing list
> Linaro-mm-sig@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/linaro-mm-sig


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

end of thread, other threads:[~2021-10-11 14:31 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08  9:50 [PATCH] dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion Tvrtko Ursulin
2021-10-08  9:50 ` [Intel-gfx] " Tvrtko Ursulin
2021-10-08 10:21 ` Christian König
2021-10-08 10:21   ` [Intel-gfx] " Christian König
2021-10-08 10:49   ` Tvrtko Ursulin
2021-10-08 10:49     ` [Intel-gfx] " Tvrtko Ursulin
2021-10-08 12:19     ` Christian König
2021-10-08 12:19       ` [Intel-gfx] " Christian König
2021-10-11 12:32       ` Tvrtko Ursulin
2021-10-11 12:32         ` [Intel-gfx] " Tvrtko Ursulin
2021-10-11 14:15         ` [Linaro-mm-sig] " Christian König
2021-10-11 14:15           ` [Intel-gfx] " Christian König
2021-10-08 15:15 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2021-10-08 17:33 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev2) Patchwork
2021-10-08 18:04 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-10-08 23:05 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev3) Patchwork
2021-10-08 23:36 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-10-11  9:22 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion (rev4) Patchwork
2021-10-11  9:52 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-11 12:22 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.