[Intel-gfx] [PATCH i-g-t v3 1/1] tests: Exercise remote request vs barrier handling race

2023-02-13 Thread Janusz Krzysztofik
. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6333 Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson Cc: Kamil Konieczny Cc: Ashutosh Dixit Cc: Umesh Nerlige Ramappa --- tests/i915/gem_barrier_race.c | 159 ++ tests/meson.build | 8

Re: [Intel-gfx] [PATCH i-g-t v2 0/1] tests/i915/perf: Add stress / race exercises

2023-02-13 Thread Janusz Krzysztofik
On Friday, 10 February 2023 12:56:12 CET Janusz Krzysztofik wrote: > On Friday, 10 February 2023 12:21:58 CET Kamil Konieczny wrote: > > Hi, > > > > On 2023-02-10 at 08:53:12 +0100, Janusz Krzysztofik wrote: > > > Hi, > > > > > > On Thursday, 9 Feb

Re: [Intel-gfx] [PATCH i-g-t] tests/i915_suspend: Free device list after *-without-i915 subtests

2023-02-13 Thread Janusz Krzysztofik
On Monday, 13 February 2023 10:51:39 CET Zbigniew Kempczyński wrote: > On Fri, Feb 10, 2023 at 10:33:21PM +0100, Janusz Krzysztofik wrote: > > On Thursday, 9 February 2023 20:32:31 CET Janusz Krzysztofik wrote: > > > If any of *-without-i915 subtests fails or skips for

[Intel-gfx] [PATCH 0/1] drm/i915/active: Fix misuse of non-idle barriers as fence trackers

2023-02-13 Thread Janusz Krzysztofik
esting it with a new subtest igt@gem_barrier_race@remote-request, developed for that case, not yet in upstream IGT. I've selected trybot submission of the test, with the test added to BAT testlist, to get results from the widest possible HW range. Janusz Krzysztofik (1): drm/i915/active: Fix

[Intel-gfx] [PATCH 1/1] drm/i915/active: Fix misuse of non-idle barriers as fence trackers

2023-02-13 Thread Janusz Krzysztofik
Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org # v5.4 --- drivers/gpu/drm/i915/i915_active.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c index 7412abf166a8c..f92

[Intel-gfx] [PATCH i-g-t v2] tests/i915_suspend: Refresh device list after *-without-i915 subtests

2023-02-13 Thread Janusz Krzysztofik
t_main@@GLIBC_2.34() (i915_suspend:9050) igt_core-INFO: #6 [_start+0x2a] END Fixes: f7aff600ab16 ("tests/i915/i915_suspend: Disable d3cold_allowed for basic-s2idle-without-i915") Signed-off-by: Janusz Krzysztofik Cc: Riana Tauro --- lib/drmtest.c | 2 +- lib/i

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for tests/i915/perf: Add stress / race exercises (rev3)

2023-02-13 Thread Janusz Krzysztofik
On Monday, 13 February 2023 12:19:10 CET Patchwork wrote: > == Series Details == > > Series: tests/i915/perf: Add stress / race exercises (rev3) > URL : https://patchwork.freedesktop.org/series/113522/ > State : failure > > == Summary == > > CI Bug Log - changes from IGT_7160_full ->

Re: [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/active: Fix misuse of non-idle barriers as fence trackers

2023-02-13 Thread Janusz Krzysztofik
On Monday, 13 February 2023 14:47:42 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/active: Fix misuse of non-idle barriers as fence trackers > URL : https://patchwork.freedesktop.org/series/113950/ > State : success > > == Summary == > > CI Bug Log - changes from

[Intel-gfx] [PATCH 0/1] drm/i915/active: Serialize access to barrier tasks lists

2023-02-13 Thread Janusz Krzysztofik
ce trackers", I'm submitting this fix with a request to CI for testing it with trybot submission of the new igt@gem_barrier_race@remote-request subtest, not yet in upstream IGT, to get comparable results from the widest possible HW range. Janusz Krzysztofik (1): drm/i915/active: Serialize access

[Intel-gfx] [PATCH 1/1] drm/i915/active: Serialize access to barrier tasks lists

2023-02-13 Thread Janusz Krzysztofik
from other kernel requests") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org # v5.4 --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 6 +++ .../gpu/drm/i915/gt/intel_engine_heartbeat.c | 10 - drivers/gpu/drm/i915/gt/intel_engine_pm.c | 4 ++ drivers/gpu/d

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/active: Serialize access to barrier tasks lists

2023-02-13 Thread Janusz Krzysztofik
On Monday, 13 February 2023 19:28:50 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/active: Serialize access to barrier tasks lists > URL : https://patchwork.freedesktop.org/series/113962/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_12732 ->

[Intel-gfx] [PATCH 0/2] Resolve barrier tasks list related issues

2023-02-13 Thread Janusz Krzysztofik
rriers from an engine's barrier tasks list. Note: Again, I'm submitting this series with a request to CI for testing it with trybot submission of the new igt@gem_barrier_race@remote-request subtest, not yet in upstream IGT, to get comparable results from the widest possible HW range. Janusz Krzyszto

[Intel-gfx] [PATCH 1/2] drm/i915/active: Fix misuse of non-idle barriers as fence trackers

2023-02-13 Thread Janusz Krzysztofik
Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org # v5.4 --- drivers/gpu/drm/i915/i915_active.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c index 7412abf166a8c..f92

[Intel-gfx] [PATCH 2/2] drm/i915/active: Serialize access to barrier tasks lists

2023-02-13 Thread Janusz Krzysztofik
from other kernel requests") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org # v5.4 --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 6 +++ .../gpu/drm/i915/gt/intel_engine_heartbeat.c | 10 - drivers/gpu/drm/i915/gt/intel_engine_pm.c | 4 ++ drivers/gpu/d

Re: [Intel-gfx] ✓ Fi.CI.BAT: success for Resolve barrier tasks list related issues

2023-02-14 Thread Janusz Krzysztofik
On Tuesday, 14 February 2023 01:11:42 CET Patchwork wrote: > == Series Details == > > Series: Resolve barrier tasks list related issues > URL : https://patchwork.freedesktop.org/series/113975/ > State : success > > == Summary == > > CI Bug Log - changes from CI_DRM_12734 -> Patchwork_113975v1

Re: [Intel-gfx] ✓ Fi.CI.IGT: success for Resolve barrier tasks list related issues

2023-02-14 Thread Janusz Krzysztofik
On Tuesday, 14 February 2023 04:38:12 CET Patchwork wrote: > == Series Details == > > Series: Resolve barrier tasks list related issues > URL : https://patchwork.freedesktop.org/series/113975/ > State : success > > == Summary == > > CI Bug Log - changes from CI_DRM_12734_full ->

[Intel-gfx] [PATCH i-g-t v2 1/1] tests/gem_ctx_exec: Exercise barrier race

2023-02-09 Thread Janusz Krzysztofik
/gem_ctx_exec.c. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6333 Signed-off-by: Janusz Krzysztofik --- tests/i915/gem_ctx_exec.c | 123 ++ tests/meson.build | 9 ++- 2 files changed, 131 insertions(+), 1 deletion(-) diff --git a/tests/i915

[Intel-gfx] [PATCH i-g-t v2 0/1] tests/i915/perf: Add stress / race exercises

2023-02-09 Thread Janusz Krzysztofik
reported bug, but triggering other bugs which I can't see any fixes for queued yet, - move the other new subtest out of tests/i915/perf.c (Ashutosh). Janusz Krzysztofik (1): tests/gem_ctx_exec: Exercise barrier race tests/i915/gem_ctx_exec.c | 123

[Intel-gfx] [PATCH i-g-t] tests/i915_suspend: Free device list after *-without-i915 subtests

2023-02-09 Thread Janusz Krzysztofik
Fixes: f7aff600ab16 ("tests/i915/i915_suspend: Disable d3cold_allowed for basic-s2idle-without-i915") Signed-off-by: Janusz Krzysztofik Cc: Riana Tauro --- lib/drmtest.c | 2 +- lib/igt_device_scan.c | 4 tests/i915/i915_suspend.c | 10 +- 3 files change

Re: [Intel-gfx] [PATCH i-g-t v2 0/1] tests/i915/perf: Add stress / race exercises

2023-02-09 Thread Janusz Krzysztofik
Hi, On Thursday, 9 February 2023 12:50:38 CET Janusz Krzysztofik wrote: > Users reported oopses on list corruptions when using i915 perf with a > number of concurrently running graphics applications. That indicates we > are currently missing some important tests for such scenario

Re: [Intel-gfx] [PATCH i-g-t v2 0/1] tests/i915/perf: Add stress / race exercises

2023-02-10 Thread Janusz Krzysztofik
On Friday, 10 February 2023 12:21:58 CET Kamil Konieczny wrote: > Hi, > > On 2023-02-10 at 08:53:12 +0100, Janusz Krzysztofik wrote: > > Hi, > > > > On Thursday, 9 February 2023 12:50:38 CET Janusz Krzysztofik wrote: > > > Users reported oopses on l

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 0/2] tests/i915/perf: Add stress / race exercises

2023-02-03 Thread Janusz Krzysztofik
Hi Umesh, Thanks for taking a look. On Friday, 3 February 2023 20:21:38 CET Umesh Nerlige Ramappa wrote: > On Tue, Jan 31, 2023 at 10:17:29AM +0100, Janusz Krzysztofik wrote: > >Users reported oopses on list corruptions when using i915 perf with a > >number of concurrently r

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 0/2] tests/i915/perf: Add stress / race exercises

2023-02-01 Thread Janusz Krzysztofik
Hi Ashutosh, On Tuesday, 31 January 2023 19:36:50 CET Dixit, Ashutosh wrote: > On Tue, 31 Jan 2023 09:36:30 -0800, Janusz Krzysztofik wrote: > > > > Since Chris' subtest didn't help in triggering the list corruption, I've > > developed a new subtest that can do it. Since i

[Intel-gfx] [PATCH i-g-t v4] tests: Exercise remote request vs barrier handling race

2023-02-15 Thread Janusz Krzysztofik
/6333 Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson Cc: Kamil Konieczny Cc: Ashutosh Dixit Cc: Umesh Nerlige Ramappa --- tests/i915/gem_barrier_race.c | 153 ++ tests/meson.build | 8 ++ 2 files changed, 161 insertions(+) create mode 100644

Re: [Intel-gfx] [PATCH i-g-t v3 1/1] tests: Exercise remote request vs barrier handling race

2023-02-14 Thread Janusz Krzysztofik
Hi Kamil, Thanks for review. On Tuesday, 14 February 2023 22:20:10 CET Kamil Konieczny wrote: > Hi Janusz, > > On 2023-02-13 at 10:31:32 +0100, Janusz Krzysztofik wrote: > > Users reported oopses on list corruptions when using i915 perf with a > > number of concurre

Re: [Intel-gfx] [PATCH i-g-t] tests/i915_suspend: Free device list after *-without-i915 subtests

2023-02-10 Thread Janusz Krzysztofik
On Friday, 10 February 2023 15:02:59 CET Kamil Konieczny wrote: > Hi Janusz, > > I have one nit, see below. > > On 2023-02-09 at 20:32:31 +0100, Janusz Krzysztofik wrote: > > If any of *-without-i915 subtests fails or skips for any reason, it may > > leave the i915 mo

Re: [Intel-gfx] [PATCH v2] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-07 Thread Janusz Krzysztofik
On Wednesday, 7 June 2023 23:12:13 CEST Edgecombe, Rick P wrote: > On Wed, 2023-06-07 at 19:11 +0200, Janusz Krzysztofik wrote: > > On Wednesday, 7 June 2023 17:31:24 CEST Dave Hansen wrote: > > > On 6/7/23 08:23, Janusz Krzysztofik wrote: > > > > > > >

[Intel-gfx] [PATCH v3 RESEND] x86/mm: Fix PAT bit missing from page protection modify mask

2023-07-10 Thread Janusz Krzysztofik
6: Make page cache mode a real type") Signed-off-by: Janusz Krzysztofik Tested-by: Marek Marczykowski-Górecki Reviewed-by: Andi Shyti Reviewed-by: Juergen Gross Cc: Borislav Petkov Cc: Dave Hansen Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "Edgecombe, Rick P" Cc: sta...@

Re: [Intel-gfx] [PATCH v3 RESEND] x86/mm: Fix PAT bit missing from page protection modify mask

2023-07-17 Thread Janusz Krzysztofik
Hi Rick, On Monday, 10 July 2023 19:58:07 CEST Edgecombe, Rick P wrote: > On Mon, 2023-07-10 at 09:36 +0200, Janusz Krzysztofik wrote: > > The issue needs to be fixed by including _PAGE_PAT bit into a bitmask > > used > > by pgprot_modify() for selecting bits to be

Re: [Intel-gfx] [PATCH v3 RESEND] x86/mm: Fix PAT bit missing from page protection modify mask

2023-07-17 Thread Janusz Krzysztofik
Hi Borislav, On Monday, 10 July 2023 10:05:19 CEST Borislav Petkov wrote: > On Mon, Jul 10, 2023 at 09:36:14AM +0200, Janusz Krzysztofik wrote: > > Assume that adding _PAGE_PAT to _PAGE_CHG_MASK doesn't break pte_modify() > > and its users, and go for it. Also, add _PAGE_PAT_LARGE

[Intel-gfx] [PATCH v2] drm/i915: Fix premature release of request's reusable memory

2023-07-17 Thread Janusz Krzysztofik
: Serialise i915_active_fence_set() with itself") Suggested-by: Chris Wilson Signed-off-by: Janusz Krzysztofik Cc: # v5.6+ --- drivers/gpu/drm/i915/i915_active.c | 99 - drivers/gpu/drm/i915/i915_request.c | 11 2 files changed, 81 insertions(+), 29 deletions(-) diff --git a

[Intel-gfx] [PATCH v3] drm/i915: Fix premature release of request's reusable memory

2023-07-20 Thread Janusz Krzysztofik
(Chris) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8211 Fixes: df9f85d8582e ("drm/i915: Serialise i915_active_fence_set() with itself") Suggested-by: Chris Wilson Signed-off-by: Janusz Krzysztofik Cc: # v5.6+ --- drivers/gpu/drm/i915/i91

[Intel-gfx] [PATCH] drm/i915: Fix premature release of request's reusable memory

2023-07-04 Thread Janusz Krzysztofik
active i915 requests from being released while still accessing their memory. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8211 Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex") Signed-off-by: Janusz Krzysztofik Cc: # v5.5+ --- drivers/gpu/drm/i91

Re: [Intel-gfx] [PATCH v2] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-08 Thread Janusz Krzysztofik
On Thursday, 8 June 2023 00:47:36 CEST Edgecombe, Rick P wrote: > On Wed, 2023-06-07 at 23:33 +0200, Janusz Krzysztofik wrote: > > > So since _PAGE_PSE is actually the same value as _PAGE_PAT, you > > > don't > > > actually need to have _PAGE_PSE in _HPAGE_CHG_MASK in

[Intel-gfx] [PATCH v3] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-09 Thread Janusz Krzysztofik
6: Make page cache mode a real type") Signed-off-by: Janusz Krzysztofik Tested-by: Marek Marczykowski-Górecki Reviewed-by: Andi Shyti Acked-by: Juergen Gross # v1 Cc: Borislav Petkov Cc: Dave Hansen Cc: "Edgecombe, Rick P" Cc: sta...@vger.kernel.org # v3.19+ --- arch/x86/include/as

Re: [Intel-gfx] [RESUBMIT][PATCH] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-05 Thread Janusz Krzysztofik
(fixed misspelled Cc: email address of intel-gfx list) On Friday, 2 June 2023 16:53:30 CEST Juergen Gross wrote: > On 02.06.23 16:48, Juergen Gross wrote: > > On 02.06.23 16:43, Borislav Petkov wrote: > >> On Thu, Jun 01, 2023 at 10:47:39AM +0200, Juergen Gross wrote: > >>> As described in the

[Intel-gfx] [PATCH v2] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-07 Thread Janusz Krzysztofik
Juergen). [1] https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/0f0754413f14 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7648 Fixes: 281d4078bec3 ("x86: Make page cache mode a real type") Signed-off-by: Janusz Krzysztofik Tested-by: Marek Marczykowski-Górecki Reviewed-by:

Re: [Intel-gfx] [PATCH v2] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-07 Thread Janusz Krzysztofik
On Wednesday, 7 June 2023 17:31:24 CEST Dave Hansen wrote: > On 6/7/23 08:23, Janusz Krzysztofik wrote: > > > > Extend bitmask used by pgprot_modify() for selecting bits to be preserved > > with _PAGE_PAT bit. However, since that bit can be reused as _PAGE_PSE, > > an

[Intel-gfx] [PATCH i-g-t] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-15 Thread Janusz Krzysztofik
available mmap methods and caching modes expected to be device coherent. Link: https://gitlab.freedesktop.org/drm/intel/-/issues/7648 Signed-off-by: Janusz Krzysztofik --- tests/i915/kms_fb_coherency.c | 354 ++ tests/meson.build | 1 + 2 files

Re: [Intel-gfx] [PATCH i-g-t] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-16 Thread Janusz Krzysztofik
Hi Kamil, Thanks for review. On Monday, 15 May 2023 22:02:51 CEST Kamil Konieczny wrote: > Hi Janusz, > > On 2023-05-15 at 10:50:20 +0200, Janusz Krzysztofik wrote: > > Visible glitches have been observed when running graphics applications on > > Linux under Xen hypervisor

[Intel-gfx] [PATCH i-g-t v2] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-16 Thread Janusz Krzysztofik
subtest bodies to an updated and renamed helper, - drop "derived from ..." info from copyrights comment (Kamil), - fix order of includes (Kamil), - fix whitespace (Kamil), - Cc: Bhanuprakash (Kamil). Link: https://gitlab.freedesktop.org/drm/intel/-/issues/7648 Signed-off-by: Janusz K

Re: [Intel-gfx] [PATCH i-g-t v2] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-16 Thread Janusz Krzysztofik
Hi Andrzej, Thanks for review. On Tuesday, 16 May 2023 16:08:26 CEST Andrzej Hajda wrote: > On 16.05.2023 12:05, Janusz Krzysztofik wrote: > > Visible glitches have been observed when running graphics applications on > > Linux under Xen hypervisor. Those observations have

[Intel-gfx] [PATCH i-g-t v3] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-19 Thread Janusz Krzysztofik
"derived from ..." info from copyrights comment (Kamil), - fix order of includes (Kamil), - fix whitespace (Kamil), - Cc: Bhanuprakash (Kamil). Link: https://gitlab.freedesktop.org/drm/intel/-/issues/7648 Cc: Bhanuprakash Modem Reviewed-by: Andrzej Hajda # v2 Signed-off-by: Janusz K

Re: [Intel-gfx] [PATCH i-g-t v3] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-19 Thread Janusz Krzysztofik
On Friday, 19 May 2023 12:28:49 CEST Andrzej Hajda wrote: > On 19.05.2023 11:43, Janusz Krzysztofik wrote: > > Visible glitches have been observed when running graphics applications on > > Linux under Xen hypervisor. Those observations have been confirmed with > > failures fr

[PATCH v5 2/3] drm/i915: Remove extra multi-gt pm-references

2024-01-24 Thread Janusz Krzysztofik
oid the word "revert" in commit message (Rodrigo), - update commit description reusing relevant chunks dropped from the description of the proper fix (Rodrigo). Signed-off-by: Janusz Krzysztofik Cc: Nirmoy Das Cc: Rodrigo Vivi --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c

[PATCH v5 0/3] drm/i915: Fix VMA UAF on destroy against deactivate race

2024-01-24 Thread Janusz Krzysztofik
arate patches (Nirmoy). - clean up commit message and description a bit. v3: Identify root cause more precisely, and a commit to blame, - identify and drop former workarounds, - update commit message and description. v2: Get the wakeref before VM mutex to avoid circular locking dependency, - d

[PATCH v5 1/3] drm/i915/vma: Fix UAF on destroy against retire race

2024-01-24 Thread Janusz Krzysztofik
it to blame, - identify and drop former workarounds, - update commit message and description. v2: Get the wakeref before VM mutex to avoid circular locking dependency, - drop questionable Fixes: tag. Fixes: d93939730347 ("drm/i915: Remove the vma refcount") Closes: https://git

[PATCH v5 3/3] Revert "drm/i915: Wait for active retire before i915_active_fini()"

2024-01-24 Thread Janusz Krzysztofik
This reverts commit 7a2280e8dcd2f1f436db9631287c0b21cf6a92b0, obsoleted by "drm/i915/vma: Fix UAF on destroy against retire race". Signed-off-by: Janusz Krzysztofik Cc: Nirmoy Das --- drivers/gpu/drm/i915/i915_vma.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gp

Re: [PATCH] drm/i915/gt: Restart the heartbeat timer when forcing a pulse

2024-01-31 Thread Janusz Krzysztofik
Hi John, On Wednesday, 10 January 2024 22:02:16 CET john.c.harri...@intel.com wrote: > From: John Harrison > > The context persistence code does things like send super high priority > heartbeat pulses to ensure any leaked context can still be pre-empted > and thus isn't a total denial of

Re: [PATCH v4 1/3] drm/i915/vma: Fix UAF on destroy against retire race

2024-01-23 Thread Janusz Krzysztofik
Hi Rodrigo, Thank you for review. On Monday, 22 January 2024 22:09:38 CET Rodrigo Vivi wrote: > On Mon, Jan 22, 2024 at 03:04:42PM +0100, Janusz Krzysztofik wrote: > > Object debugging tools were sporadically reporting illegal attempts to > > free a still active i915 VMA obje

Re: [PATCH v5 0/3] drm/i915: Fix VMA UAF on destroy against deactivate race

2024-01-29 Thread Janusz Krzysztofik
e() used in DMA fence callbacks. I'm going to verify some ideas for a fix on trybot. Thanks, Janusz > > > Regards, > > Nirmoy > > On 1/24/2024 6:13 PM, Janusz Krzysztofik wrote: > > Object debugging tools were sporadically reporting illegal attempts to > > free a s

[PATCH v4 1/3] drm/i915/vma: Fix UAF on destroy against retire race

2024-01-22 Thread Janusz Krzysztofik
iption. v2: Get the wakeref before VM mutex to avoid circular locking dependency, - drop questionable Fixes: tag. Fixes: d93939730347 ("drm/i915: Remove the vma refcount") Closes: https://gitlab.freedesktop.org/drm/intel/issues/8875 Signed-off-by: Janusz Krzysztofik Cc: Thom

[PATCH v4 2/3] Manually revert "drm/i915: Fix a VMA UAF for multi-gt platform"

2024-01-22 Thread Janusz Krzysztofik
This reverts changes introduced by commit f56fe3e91787, obsoleted by "drm/i915/vma: Fix UAF on destroy against retire race". Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drive

[PATCH v4 3/3] Revert "drm/i915: Wait for active retire before i915_active_fini()"

2024-01-22 Thread Janusz Krzysztofik
This reverts commit 7a2280e8dcd2f1f436db9631287c0b21cf6a92b0, obsoleted by "drm/i915/vma: Fix UAF on destroy against retire race". Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/i915_vma.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_vma.c

Re: [Intel-gfx] [PATCH] drm/i915/gt: add missing new-line to GT_TRACE

2023-11-15 Thread Janusz Krzysztofik
On Wednesday, 15 November 2023 13:10:33 CET Andrzej Hajda wrote: > Trace requires new-line at the end of message (in opposition to printk), > otherwise trace dump becomes messy. > > Signed-off-by: Andrzej Hajda Acked-by: Janusz Krzysztofik > --- > drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH v3] drm/i915/vma: Fix VMA UAF on destroy against deactivate race

2023-11-16 Thread Janusz Krzysztofik
- update commit message and description. v2: Get the wakeref before VM mutex to avoid circular locking dependency, - drop questionable Fixes: tag. Fixes: d93939730347 ("drm/i915: Remove the vma refcount") Closes: https://gitlab.freedesktop.org/drm/intel/issues/8875 Signed-off-by: Janusz

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/vma: Fix VMA UAF on destroy against deactivate race (rev2)

2023-11-17 Thread Janusz Krzysztofik
On Friday, 17 November 2023 17:48:03 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/vma: Fix VMA UAF on destroy against deactivate race (rev2) > URL : https://patchwork.freedesktop.org/series/126530/ > State : failure > > == Summary == > > CI Bug Log - changes from

[PATCH] drm/i915/vma: Fix UAF on reopen vs destroy race

2024-04-12 Thread Janusz Krzysztofik
00 ]--- Aso soon as we start unbinding and destroing a VMA, marked it as parked, and also keep it marked as closed for the rest of its life. When a VMA to be opened occurs closed, reopen it only if not yet parked. Fixes: b0647a5e79b1 ("drm/i915: Avoid live-lock with i915_vma_par

Re: [PATCH i-g-t v2] lib/kunit: Read results from debugfs

2024-04-10 Thread Janusz Krzysztofik
Hi Lucas, On Friday, 5 April 2024 19:54:53 CEST Janusz Krzysztofik wrote: > KUnit can provide KTAP reports from test modules via debugfs files, one > per test suite. Using that source of test results instead of extracting > them from dmesg, where they may be interleaved with oth

[PATCH v2] drm/i915/vma: Fix UAF on reopen vs destroy race

2024-04-15 Thread Janusz Krzysztofik
ike still on a list, don't try to delete it from the list again after the VMA has been marked as parked. Fixes: b0647a5e79b1 ("drm/i915: Avoid live-lock with i915_vma_parked()") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10608 Signed-off-by: Janusz Krzysztofik Cc: Chris W

[PATCH i-g-t v3] lib/kunit: Read results from debugfs

2024-04-15 Thread Janusz Krzysztofik
, protected from buffer overflow or truncation with a single check for enough buffer space (Lucas), - avoid confusing 'if' statement condition (Lucas). Signed-off-by: Janusz Krzysztofik Cc: Kamil Konieczny Reviewed-by: Lucas De Marchi --- @Lucas: I've assumed your R-b still applies, I hope

Re: [PATCH i-g-t v3] lib/kunit: Read results from debugfs

2024-04-17 Thread Janusz Krzysztofik
On Wednesday, 17 April 2024 11:37:55 CEST Kamil Konieczny wrote: > Hi Janusz, > On 2024-04-15 at 19:31:59 +0200, Janusz Krzysztofik wrote: > > KUnit can provide KTAP reports from test modules via debugfs files, one > > per test suite. Using that source of test results ins

Re: ✗ Fi.CI.IGT: failure for drm/i915/vma: Fix UAF on reopen vs destroy race (rev3)

2024-04-16 Thread Janusz Krzysztofik
On Tuesday, 16 April 2024 12:50:05 CEST Patchwork wrote: > == Series Details == > > Series: drm/i915/vma: Fix UAF on reopen vs destroy race (rev3) > URL : https://patchwork.freedesktop.org/series/132360/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_14582_full ->

[PATCH] drm/i915/gt: Disarm breadcrumbs if engines are already idle

2024-04-23 Thread Janusz Krzysztofik
o sleep. Fixes: 9d5612ca165a ("drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission") Closes: https://gitlab.freedesktop.org/drm/intel/issues/10026 Signed-off-by: Chris Wilson Cc: Andrzej Hajda Cc: # v5.12+ Signed-off-by: Janusz Krzysztofik --- drivers/gpu/dr

[PATCH v3] drm/i915/vma: Fix UAF on reopen vs destroy race

2024-04-15 Thread Janusz Krzysztofik
nk on VMA park so it looks like still on a list, don't try to delete it from the list again after the VMA has been marked as parked. Fixes: b0647a5e79b1 ("drm/i915: Avoid live-lock with i915_vma_parked()") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10608 Signed

Re: [PATCH v3] drm/i915/vma: Fix UAF on reopen vs destroy race

2024-04-16 Thread Janusz Krzysztofik
Hi Rodrigo, On Tuesday, 16 April 2024 03:16:31 CEST Rodrigo Vivi wrote: > On Mon, Apr 15, 2024 at 09:53:09PM +0200, Janusz Krzysztofik wrote: > > We defer actually closing, unbinding and destroying a VMA until next idle > > point, or until the object is freed in the meantime.

Re: ✗ Fi.CI.BAT: failure for drm/i915/gt: Disarm breadcrumbs if engines are already idle (rev2)

2024-04-26 Thread Janusz Krzysztofik
Hi @I915-ci-infra, On Thursday, 25 April 2024 19:29:17 CEST Patchwork wrote: > == Series Details == > > Series: drm/i915/gt: Disarm breadcrumbs if engines are already idle (rev2) > URL : https://patchwork.freedesktop.org/series/132786/ > State : failure > > == Summary == > > CI Bug Log -

Re: [PATCH v3] drm/i915/vma: Fix UAF on reopen vs destroy race

2024-04-25 Thread Janusz Krzysztofik
Hi Thomas, On Tuesday, 16 April 2024 18:40:12 CEST Rodrigo Vivi wrote: > On Tue, Apr 16, 2024 at 10:09:46AM +0200, Janusz Krzysztofik wrote: > > Hi Rodrigo, > > > > On Tuesday, 16 April 2024 03:16:31 CEST Rodrigo Vivi wrote: > > > On Mon, Apr 15, 2024 at 09:53:

Re: [PATCH] drm/i915/gt: Disarm breadcrumbs if engines are already idle

2024-04-29 Thread Janusz Krzysztofik
Hi Andrzej, On Friday, 26 April 2024 18:13:02 CEST Nirmoy Das wrote: > > On 4/23/2024 6:23 PM, Janusz Krzysztofik wrote: > > From: Chris Wilson > > > > The breadcrumbs use a GT wakeref for guarding the interrupt, but are > > disarmed during release of the engi

[PATCH] Revert "drm/i915: Remove extra multi-gt pm-references"

2024-05-06 Thread Janusz Krzysztofik
o VMA would be reopened while we destroy them. That assumption is no longer true in multi-GT configurations, where a VMA we reopen may be handled by a GT different from the one that we already keep active via its engine while we set up an execbuf request. Restoring the extra GT0 PM wakeref remo

Re: [PATCH] Revert "drm/i915: Remove extra multi-gt pm-references"

2024-05-07 Thread Janusz Krzysztofik
nks, Janusz > > > Regards, > > Nirmoy > > On 5/6/2024 8:02 PM, Janusz Krzysztofik wrote: > > This reverts commit 1f33dc0c1189efb9ae19c6fc22b64dd3e26261fb. > > > > There was a patch supposed to fix an issue of illegal attempts to free a > > still a

Re: ✗ Fi.CI.IGT: failure for drm/i915/gt: Disarm breadcrumbs if engines are already idle (rev4)

2024-05-13 Thread Janusz Krzysztofik
On Friday, 10 May 2024 08:12:02 GMT+2 Patchwork wrote: > == Series Details == > > Series: drm/i915/gt: Disarm breadcrumbs if engines are already idle (rev4) > URL : https://patchwork.freedesktop.org/series/132786/ > State : failure > > == Summary == > > CI Bug Log - changes from

[PATCH v2] drm/i915/hwmon: Fix locking inversion in sysfs getter

2024-03-11 Thread Janusz Krzysztofik
the lock is also held. Follow that pattern across the whole source file where similar lock inversion can happen. v2: Keep hardware read under the lock so the whole operation of updating energy from hardware is still atomic (Guenter), - instead, acquire the rpm wakeref before the lock and hold it as l

Re: [PATCH] drm/i915/hwmon: Fix locking inversion in sysfs getter

2024-03-11 Thread Janusz Krzysztofik
On Monday, 11 March 2024 18:35:43 CET Guenter Roeck wrote: > On 3/11/24 09:58, Rodrigo Vivi wrote: > > On Mon, Mar 11, 2024 at 09:06:46AM +0100, Janusz Krzysztofik wrote: > >> In i915 hwmon sysfs getter path we now take a hwmon_lock, then acquire an > >> rpm wak

[PATCH] drm/i915/hwmon: Fix locking inversion in sysfs getter

2024-03-11 Thread Janusz Krzysztofik
nergy+0x55/0x100 [i915] <4> [197.793183] hwm_read+0x9a/0x310 [i915] <4> [197.797124] hwmon_attr_show+0x36/0x120 <4> [197.800946] dev_attr_show+0x15/0x60 <4> [197.804509] sysfs_kf_seq_show+0xb5/0x100 However, the lock is only intended to protect either a hwmon overflow

Re: ✗ Fi.CI.IGT: failure for drm/i915/hwmon: Fix locking inversion in sysfs getter (rev2)

2024-03-12 Thread Janusz Krzysztofik
Hi Bug Filing, On Tuesday, 12 March 2024 11:02:19 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/hwmon: Fix locking inversion in sysfs getter (rev2) > URL : https://patchwork.freedesktop.org/series/130966/ > State : failure > > == Summary == > > CI Bug Log - changes from

[PATCH i-g-t v3 3/5] lib/kunit: Time out promptly on missing KTAP report

2024-03-18 Thread Janusz Krzysztofik
and parse that report. Suggested-by: Kamil Konieczny Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 13 + 1 file changed, 13 insertions(+) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 8a6824ea7e..f0e4d5ec76 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -1204,12

[PATCH i-g-t v3 4/5] lib/kunit: Execute test cases synchronously

2024-03-18 Thread Janusz Krzysztofik
tailed justification of why we need these changes. Signed-off-by: Janusz Krzysztofik Cc: Mauro Carvalho Chehab Cc: Jonathan Cavitt Cc: Kamil Konieczny --- lib/igt_kmod.c | 156 + 1 file changed, 54 insertions(+), 102 deletions(-) diff --gi

[PATCH i-g-t v3 2/5] lib/kunit: Let igt_ktap_free() take care of pointer reset

2024-03-18 Thread Janusz Krzysztofik
that location as an argument and reset the pointer after freeing the structure. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 12 +--- lib/igt_ktap.c | 5 +++-- lib/igt_ktap.h | 2 +- lib/tests/igt_ktap_parser.c | 24

[PATCH i-g-t v3 5/5] lib/kunit: Minimize code duplication

2024-03-18 Thread Janusz Krzysztofik
to struct igt_ktap_results pointer handling. v2: Rebased on invalid test suite name workaround. Signed-off-by: Janusz Krzysztofik Cc: Jonathan Cavitt --- lib/igt_kmod.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index c495d11b16

[PATCH i-g-t v3 0/5] lib/kunit: Execute test cases synchronously

2024-03-18 Thread Janusz Krzysztofik
module, and errors they return are handled, - update commit description with a more detailed justification of why we need these changes, - rebase the former patch 1 on top of the new patch 1, update its commit message and description and provide it as patch 2. Janusz Krzysztofik (5

[PATCH i-g-t v3 1/5] lib/kunit: Store igt_ktap_results pointer in a central location

2024-03-18 Thread Janusz Krzysztofik
-by: Janusz Krzysztofik --- lib/igt_kmod.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index b4b8848983..ca20012a97 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -1207,10 +1207,10 @@ static void

[PATCH] drm/i915/gt: Reset queue_priority_hint on parking

2024-03-18 Thread Janusz Krzysztofik
e/0x130 <4>[ 167.305997] ret_from_fork+0x2c/0x50 <4>[ 167.306001] ret_from_fork_asm+0x1b/0x30 <4>[ 167.306004] It is necessary for the queue_priority_hint to be lower than the next request submission upon waking up, as we rely on the hint to decide when to kick the

Re: [PATCH i-g-t v2 1/2] lib/kunit: Execute test cases synchronously

2024-03-14 Thread Janusz Krzysztofik
On Thursday, 14 March 2024 11:29:38 CET Kamil Konieczny wrote: > Hi Janusz, > On 2024-02-27 at 16:10:41 +0100, Janusz Krzysztofik wrote: > > Up to now we were loading a KUnit test module in test execution mode only > > once per subtest, in background, and then, in paral

Re: [PATCH] drm/i915/gt: Reset queue_priority_hint on parking

2024-03-20 Thread Janusz Krzysztofik
n > > Cc: Mika Kuoppala > > Signed-off-by: Janusz Krzysztofik > > Cc: Chris Wilson > > Cc: # v5.4+ > > this tag list is a bit confusing. Let's keep all Cc's together > and, besides, Cc'eing the author looks a bit redundant. You're right, please feel free to fix th

Re: [PATCH v2] drm/i915/hwmon: Fix locking inversion in sysfs getter

2024-03-12 Thread Janusz Krzysztofik
Hi Ashutosh, On Tuesday, 12 March 2024 17:25:14 CET Dixit, Ashutosh wrote: > On Mon, 11 Mar 2024 13:34:58 -0700, Janusz Krzysztofik wrote: > > > > In i915 hwmon sysfs getter path we now take a hwmon_lock, then acquire an > > rpm wakeref. That results in lock inversion: &g

Re: [PATCH v2] drm/i915/hwmon: Fix locking inversion in sysfs getter

2024-03-12 Thread Janusz Krzysztofik
On Tuesday, 12 March 2024 18:09:37 CET Andi Shyti wrote: > Hi Janusz, > > On Mon, Mar 11, 2024 at 09:34:58PM +0100, Janusz Krzysztofik wrote: > > In i915 hwmon sysfs getter path we now take a hwmon_lock, then acquire an > > rpm wakeref. That results in lock inversion: >

[PATCH] drm/i915/hwmon: Fix potential UAF on driver unbind

2024-03-22 Thread Janusz Krzysztofik
mon when unregistering i915, and teach hwmon sysfs accessors to start with checking validity of those pointers and fail immediately if no longer valid. Suggested-by: Ashutosh Dixit Fixes: b3b088e28183 ("drm/i915/hwmon: Add HWMON infrastructure") Closes: https://gitlab.freedesktop.org

[PATCH i-g-t v2] lib/kunit: Read results from debugfs

2024-04-05 Thread Janusz Krzysztofik
pathname components concatentated to a local buffer, protected from buffer overflow or truncation with a single check for enough buffer space (Lucas), - avoid confusing 'if' statement condition (Lucas). Signed-off-by: Janusz Krzysztofik Cc: Kamil Konieczny Cc: Lucas De Marchi

Re: [PATCH i-g-t] lib/kunit: Read results from debugfs

2024-03-28 Thread Janusz Krzysztofik
On Wednesday, 27 March 2024 22:54:53 CET Janusz Krzysztofik wrote: > On Wednesday, 27 March 2024 17:03:01 CET Lucas De Marchi wrote: > > On Wed, Mar 27, 2024 at 12:22:54PM +0100, Janusz Krzysztofik wrote: > > >KUnit can provide KTAP reports from test modules via debugfs files,

[PATCH i-g-t] lib/kunit: Read results from debugfs

2024-03-27 Thread Janusz Krzysztofik
debugfs support is found not configured then fall back to legacy processing path. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 143 - 1 file changed, 105 insertions(+), 38 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index

Re: [PATCH i-g-t] lib/kunit: Read results from debugfs

2024-03-27 Thread Janusz Krzysztofik
On Wednesday, 27 March 2024 18:27:50 CET Kamil Konieczny wrote: > Hi Janusz, > On 2024-03-27 at 12:22:54 +0100, Janusz Krzysztofik wrote: > > KUnit can provide KTAP reports from test modules via debugfs files, one > > per test suite. Using that source of test results ins

Re: [PATCH i-g-t] lib/kunit: Read results from debugfs

2024-03-27 Thread Janusz Krzysztofik
On Wednesday, 27 March 2024 17:03:01 CET Lucas De Marchi wrote: > On Wed, Mar 27, 2024 at 12:22:54PM +0100, Janusz Krzysztofik wrote: > >KUnit can provide KTAP reports from test modules via debugfs files, one > >per test suite. Using that source of test results instead of extracti

[PATCH] drm/i915/selftests: Fix dependency of some timeouts on HZ

2024-02-22 Thread Janusz Krzysztofik
and custom kernel configs. Rename the symbol to clearly indicate intended units and convert it to jiffies before use. Fixes: 3a4bfa091c46 ("drm/i915/selftest: Fix workarounds selftest for GuC submission") Signed-off-by: Janusz Krzysztofik Cc: Rahul Kumar Singh Cc: John Harrison C

[PATCH i-g-t v2 0/2] lib/kunit: Execute test cases synchronously

2024-02-27 Thread Janusz Krzysztofik
these changes, - rebase the former patch 1 on top of the new patch 1, update its commit message and description and provide it as patch 2. Janusz Krzysztofik (2): lib/kunit: Execute test cases synchronously lib/kunit: Minimize code duplication lib/igt_kmod.c | 172

[PATCH i-g-t v2 2/2] lib/kunit: Minimize code duplication

2024-02-27 Thread Janusz Krzysztofik
KTAP report, no matter how many test suites and test cases it covers. Then, it's a good candidate for reuse in other scenarios when a single KTAP report is handled, e.g., when we collect a list of test cases from a single test suite or test module. Go for it. Signed-off-by: Janusz Krzysztofik

[PATCH i-g-t v2 1/2] lib/kunit: Execute test cases synchronously

2024-02-27 Thread Janusz Krzysztofik
- subtests if unloading the test module fails, - update commit description with a more detailed justification of why we need these changes. Signed-off-by: Janusz Krzysztofik Cc: Mauro Carvalho Chehab --- lib/igt_kmod.c | 157 - 1 file changed

[PATCH v6 2/3] drm/i915: Remove extra multi-gt pm-references

2024-02-29 Thread Janusz Krzysztofik
o drop the no longer used .wakeref_gt0 field from struct i915_execbuffer. v2: Avoid the word "revert" in commit message (Rodrigo), - update commit description reusing relevant chunks dropped from the description of the proper fix (Rodrigo). Signed-off-by: Janusz Krzysztofik Cc

[PATCH v6 3/3] Revert "drm/i915: Wait for active retire before i915_active_fini()"

2024-02-29 Thread Janusz Krzysztofik
This reverts commit 7a2280e8dcd2f1f436db9631287c0b21cf6a92b0, obsoleted by "drm/i915/vma: Fix UAF on destroy against retire race". Signed-off-by: Janusz Krzysztofik Cc: Nirmoy Das --- drivers/gpu/drm/i915/i915_vma.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gp

[PATCH v6 0/3] drm/i915: Fix VMA UAF on destroy against deactivate race

2024-02-29 Thread Janusz Krzysztofik
s and move them to separate patches (Nirmoy). - clean up commit message and description a bit. v3: Identify root cause more precisely, and a commit to blame, - identify and drop former workarounds, - update commit message and description. v2: Get the wakeref before VM mutex to avoid circular loc

<    3   4   5   6   7   8   9   >