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:

[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

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 ->

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.

[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

[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

[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 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,

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 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

[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

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

[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

[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 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 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 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 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

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 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: >

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: ✗ 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 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

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

2024-03-05 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 v7 2/3] drm/i915: Remove extra multi-gt pm-references

2024-03-05 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 v7 1/3] drm/i915/vma: Fix UAF on destroy against retire race

2024-03-05 Thread Janusz Krzysztofik
age 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 Krzysztofik Cc: Thomas He

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

2024-03-05 Thread Janusz Krzysztofik
es (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, - drop question

Re: ✗ Fi.CI.IGT: failure for drm/i915/selftests: Fix dependency of some timeouts on HZ

2024-03-01 Thread Janusz Krzysztofik
On Friday, 23 February 2024 05:10:10 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/selftests: Fix dependency of some timeouts on HZ > URL : https://patchwork.freedesktop.org/series/130249/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_14316_full

Re: ✗ Fi.CI.IGT: failure for drm/i915/selftest_hangcheck: Check sanity with more patience

2024-03-01 Thread Janusz Krzysztofik
On Thursday, 29 February 2024 23:16:22 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/selftest_hangcheck: Check sanity with more patience > URL : https://patchwork.freedesktop.org/series/130512/ > State : failure > > == Summary == > > CI Bug Log - changes from

[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 1/3] drm/i915/vma: Fix UAF on destroy against retire race

2024-02-29 Thread Janusz Krzysztofik
s, - 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-b

[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

[PATCH] drm/i915/selftest_hangcheck: Check sanity with more patience

2024-02-28 Thread Janusz Krzysztofik
with the i915 module also when loaded in selftest mode, relax our expectations on time consumed by the sanity check request before it completes. Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[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 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 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] 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

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 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 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

[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 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 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

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

[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

[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 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

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

[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] [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

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/vma: Fix potential UAF on multi-tile platforms (rev3)

2023-11-09 Thread Janusz Krzysztofik
On Thursday, 9 November 2023 22:44:02 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/vma: Fix potential UAF on multi-tile platforms (rev3) > URL : https://patchwork.freedesktop.org/series/126012/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_13856

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/vma: Fix potential UAF on multi-tile platforms (rev2)

2023-11-09 Thread Janusz Krzysztofik
On Wednesday, 8 November 2023 22:27:35 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/vma: Fix potential UAF on multi-tile platforms (rev2) > URL : https://patchwork.freedesktop.org/series/126012/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_13852

[Intel-gfx] [PATCH v2] drm/i915/vma: Fix potential UAF on multi-tile platforms

2023-11-08 Thread Janusz Krzysztofik
Lake. v2: Get the wakeref before vm mutex to avoid circular locking dependency, - drop questionable Fixes: tag. Closes: https://gitlab.freedesktop.org/drm/intel/issues/8875 Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/i915_vma.c | 26 +++--- 1 file changed

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/vma: Fix potential UAF on multi-tile platforms

2023-11-07 Thread Janusz Krzysztofik
On Monday, 6 November 2023 20:16:20 CET Patchwork wrote: > == Series Details == > > Series: drm/i915/vma: Fix potential UAF on multi-tile platforms > URL : https://patchwork.freedesktop.org/series/126012/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_13844 ->

Re: [Intel-gfx] [PATCH] drm/i915/vma: Fix potential UAF on multi-tile platforms

2023-11-06 Thread Janusz Krzysztofik
Hi Jani, Thanks for looking at this. On Monday, 6 November 2023 10:53:11 CET Jani Nikula wrote: > On Mon, 06 Nov 2023, Janusz Krzysztofik wrote: > > Object debugging tools were sporadically reporting illegal attempts to > > free a still active i915 VMA object from when par

[Intel-gfx] [PATCH] drm/i915/vma: Fix potential UAF on multi-tile platforms

2023-11-06 Thread Janusz Krzysztofik
async variant of wakeref put. Closes: https://gitlab.freedesktop.org/drm/intel/issues/8875 Fixes: Fixes: 213c43676beb ("drm/i915/mtl: Remove the 'force_probe' requirement for Meteor Lake") Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/i915_vma.c | 18

[Intel-gfx] [PATCH i-g-t v3 10/11] lib/kunit: Fetch a list of test cases in advance

2023-10-11 Thread Janusz Krzysztofik
kunit_kmsg_get_result(), - use kunit_results_free() helper, - fix typos (Kamil), - update commit description. Signed-off-by: Janusz Krzysztofik Acked-by: Kamil Konieczny # v2 --- lib/igt_kmod.c | 277 ++--- 1 file changed, 264 insertions(+), 13

[Intel-gfx] [PATCH i-g-t v3 11/11] lib/kunit: Execute kunit test cases only when needed

2023-10-11 Thread Janusz Krzysztofik
sub-subtests, and do that only from the first actually executed dynamic sub-subtest. v2: Always pass last result to next dynamic sub-subtest, fetch first result right after loading the kunit test module for execution. Signed-off-by: Janusz Krzysztofik Reviewed-by: Kamil Konieczny --- lib

[Intel-gfx] [PATCH i-g-t v3 07/11] tests/kms_selftest: Let subtest names match suite names

2023-10-11 Thread Janusz Krzysztofik
to kunit and the i915 module potentially providing three test suites: mock, live and perf). [1] https://docs.kernel.org/dev-tools/kunit/style.html Signed-off-by: Janusz Krzysztofik Reviewed-by: Kamil Konieczny --- tests/kms_selftest.c | 37 - 1 file changed

[Intel-gfx] [PATCH i-g-t v3 08/11] lib/kunit: Provide all results cleanup helper

2023-10-11 Thread Janusz Krzysztofik
Planned changes require a couple of loops around kunit_result_free(). Since we already have such loop, move it into a helper in preparation for future uses. Signed-off-by: Janusz Krzysztofik Reviewed-by: Kamil Konieczny --- lib/igt_kmod.c | 20 ++-- 1 file changed, 14

[Intel-gfx] [PATCH i-g-t v3 09/11] lib/kunit: Prepare for KTAP parsing after modprobe completed

2023-10-11 Thread Janusz Krzysztofik
will be performed after the kunit test module is successfully loaded and there will be no concurrently running modprobe thread, we need to make synchronization of reads from /dev/kmsg with potential errors modprobe thread optional. Signed-off-by: Janusz Krzysztofik Reviewed-by: Kamil Konieczny --- lib

[Intel-gfx] [PATCH i-g-t v3 06/11] lib/kunit: Omit suite name prefix if the same as subtest name

2023-10-11 Thread Janusz Krzysztofik
is into account when composing names for IGT dynamic sub-subtest names and drop the leading test suite name component when it is the same as subtest name. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 11 --- 1 file changed, 8 insertions(+),

[Intel-gfx] [PATCH i-g-t v3 04/11] lib/kunit: Fix misplaced igt_kunit() doc

2023-10-11 Thread Janusz Krzysztofik
-by: Janusz Krzysztofik Reviewed-by: Kamil Konieczny --- lib/igt_kmod.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index df0e650d49..426ae5b26f 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -762,15 +762,6 @@ static void

[Intel-gfx] [PATCH i-g-t v3 05/11] lib/kunit: Parse KTAP report from the main process thread

2023-10-11 Thread Janusz Krzysztofik
be failure. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab # v2 --- lib/igt_kmod.c | 264 +++ lib/igt_ktap.c | 569 + lib/igt_ktap.h | 22 -- 3 files changed, 226 insertions(+), 629 deletions(-) diff -

[Intel-gfx] [PATCH i-g-t v3 03/11] lib/kunit: Be more verbose on errors

2023-10-11 Thread Janusz Krzysztofik
Use a more verbose variant of igt_fail() when failing a dynamic sub- subtest on kernel taint. Also, print a debug message on string duplication failure. Signed-off-by: Janusz Krzysztofik Reviewed-by: Kamil Konieczny --- lib/igt_kmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[Intel-gfx] [PATCH i-g-t v3 02/11] lib/kunit: Fix handling of potential errors from F_GETFL

2023-10-11 Thread Janusz Krzysztofik
Function fcntl(..., F_GETFL, ...) that returns file status flags may also return a negative error code. Handle that error instead of blindly using the returned value as flags. Signed-off-by: Janusz Krzysztofik Reviewed-by: Kamil Konieczny --- lib/igt_kmod.c | 4 ++-- 1 file changed, 2

[Intel-gfx] [PATCH i-g-t v3 00/11] Kunit fixes and improvements

2023-10-11 Thread Janusz Krzysztofik
always pass last result to next dynamic sub-subtest, fetch first result right after loading the kunit test module for execution, - still break the loop of test cases on unexpected return codes from kunit_kmsg_get_result(), - fix typos (Kamil), - update commit descriptions. Janusz Kr

[Intel-gfx] [PATCH i-g-t v3 01/11] lib/ktap: Improve TODO workaround description

2023-10-11 Thread Janusz Krzysztofik
workaround in place. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 5eac102417..3df4d6950d 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c @@ -91,9 +91,16 @@ int igt_ktap_p

Re: [Intel-gfx] [PATCH i-g-t v2 04/11] lib/kunit: Parse KTAP report from the main process thread

2023-10-10 Thread Janusz Krzysztofik
Hi Mauro, Thanks for review. On Tuesday, 10 October 2023 15:33:57 CEST Mauro Carvalho Chehab wrote: > On Mon, 9 Oct 2023 14:27:55 +0200 > Janusz Krzysztofik wrote: > > > There was an attempt to parse KTAP reports in the background while a kunit > > test module is loa

Re: [Intel-gfx] [PATCH i-g-t v2 04/11] lib/kunit: Parse KTAP report from the main process thread

2023-10-10 Thread Janusz Krzysztofik
Hi Kamil, Thanks for review. On Tuesday, 10 October 2023 17:59:56 CEST Kamil Konieczny wrote: > Hi Janusz, > On 2023-10-09 at 14:27:55 +0200, Janusz Krzysztofik wrote: > > There was an attempt to parse KTAP reports in the background while a kunit > > test module is loadin

Re: [Intel-gfx] [PATCH i-g-t v2 09/11] lib/kunit: Prepare for KTAP parsing after modprobe completed

2023-10-10 Thread Janusz Krzysztofik
Hi Kamil, Thanks for review. On Monday, 9 October 2023 19:37:31 CEST Kamil Konieczny wrote: > Hi Janusz, > On 2023-10-09 at 14:28:00 +0200, Janusz Krzysztofik wrote: > > We are going to add support for reading a list of kunit test cases > > provided by a kunit test module

[Intel-gfx] [PATCH i-g-t v2 11/11] lib/kunit: Execute kunit test cases only when needed

2023-10-09 Thread Janusz Krzysztofik
sub-subtests, and do that only from the first actually executed dynamic sub-subtest. v2: Always pass last result to next dynamic sub-subtest, fetch first result right after loading the kunit test module for execution. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 66

[Intel-gfx] [PATCH i-g-t v2 10/11] lib/kunit: Fetch a list of test cases in advance

2023-10-09 Thread Janusz Krzysztofik
dynamic sub-subtest, and we always free last result before looping to next sub-subtest, - still break the loop of test cases on unexpected return codes from kunit_kmsg_get_result(), - use kunit_results_free() helper, - fix typos (Kamil), - update commit description. Signed-off-by: Janusz

[Intel-gfx] [PATCH i-g-t v2 09/11] lib/kunit: Prepare for KTAP parsing after modprobe completed

2023-10-09 Thread Janusz Krzysztofik
will be performed after the kunit test module is successfully loaded and there will be no concurrently running modprobe thread, we need to make synchronization of reads from /dev/kmsg with potential errors modprobe thread optional. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 50

[Intel-gfx] [PATCH i-g-t v2 08/11] lib/kunit: Provide all results cleanup helper

2023-10-09 Thread Janusz Krzysztofik
Planned changes require a couple of loops around kunit_result_free(). Since we already have such loop, move it into a helper in preparation for future uses. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff

[Intel-gfx] [PATCH i-g-t v2 06/11] tests/kms_selftest: Let subtest names match suite names

2023-10-09 Thread Janusz Krzysztofik
to kunit and the i915 module potentially providing three test suites: mock, live and perf). [1] https://docs.kernel.org/dev-tools/kunit/style.html Signed-off-by: Janusz Krzysztofik Reviewed-by: Kamil Konieczny --- tests/kms_selftest.c | 37 - 1 file changed

[Intel-gfx] [PATCH i-g-t v2 07/11] lib/ktap: Drop workaround for missing top level KTAP headers

2023-10-09 Thread Janusz Krzysztofik
has fixed that issue, that workaround is no longer needed. Drop it. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 12 lib/tests/igt_ktap_parser.c | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index

[Intel-gfx] [PATCH i-g-t v2 05/11] lib/kunit: Omit suite name prefix if the same as subtest name

2023-10-09 Thread Janusz Krzysztofik
is into account when composing names for IGT dynamic sub-subtest names and drop the leading test suite name component when it is the same as subtest name. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 11 --- 1 file changed, 8 insertions(+),

[Intel-gfx] [PATCH i-g-t v2 04/11] lib/kunit: Parse KTAP report from the main process thread

2023-10-09 Thread Janusz Krzysztofik
been processed, - fix trailing newlines missing from error messages, - add more debug statements, - integrate common code around kunit_result_free() into it. v2: Interrupt blocking read() on modprobe failure. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab # v2 --- lib

[Intel-gfx] [PATCH i-g-t v2 03/11] lib/kunit: Fix misplaced igt_kunit() doc

2023-10-09 Thread Janusz Krzysztofik
-by: Janusz Krzysztofik Reviewed-by: Kamil Konieczny --- lib/igt_kmod.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index df0e650d49..426ae5b26f 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -762,15 +762,6 @@ static void

[Intel-gfx] [PATCH i-g-t v2 01/11] lib/kunit: Fix handling of potential errors from F_GETFL

2023-10-09 Thread Janusz Krzysztofik
Function fcntl(..., F_GETFL, ...) that returns file status flags may also return a negative error code. Handle that error instead of blindly using the returned value as flags. Signed-off-by: Janusz Krzysztofik Reviewed-by: Kamil Konieczny --- lib/igt_kmod.c | 4 ++-- 1 file changed, 2

[Intel-gfx] [PATCH i-g-t v2 02/11] lib/kunit: Be more verbose on errors

2023-10-09 Thread Janusz Krzysztofik
Use a more verbose variant of igt_fail() when failing a dynamic sub- subtest on kernel taint. Also, print a debug message on string duplication failure. Signed-off-by: Janusz Krzysztofik Reviewed-by: Kamil Konieczny --- lib/igt_kmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[Intel-gfx] [PATCH i-g-t v2 00/11] Kunit fixes and improvements

2023-10-09 Thread Janusz Krzysztofik
- still break the loop of test cases on unexpected return codes from kunit_kmsg_get_result(), - fix typos (Kamil), - update commit descriptions. Janusz Krzysztofik (11): lib/kunit: Fix handling of potential errors from F_GETFL lib/kunit: Be more verbose on errors lib/kunit: Fix

Re: [Intel-gfx] [PATCH i-g-t 8/9] lib/kunit: Fetch a list of test cases in advance

2023-10-06 Thread Janusz Krzysztofik
Hi Kamil, Thanks for review. On Thursday, 5 October 2023 23:28:44 CEST Kamil Konieczny wrote: > Hi Janusz, > > On 2023-10-03 at 11:10:53 +0200, Janusz Krzysztofik wrote: > > Recent improvements to the kernel kunit framework allow us to obtain a > > list of test cases pro

[Intel-gfx] [PATCH i-g-t 9/9] lib/kunit: Execute kunit test cases only when needed

2023-10-03 Thread Janusz Krzysztofik
sub-subtests, and do that only from the first actually executed dynamic sub-subtest. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 59 -- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index

[Intel-gfx] [PATCH i-g-t 6/9] tests/kms_selftest: Let subtest names match suite names

2023-10-03 Thread Janusz Krzysztofik
to kunit and the i915 module potentially providing three test suites: mock, live and perf). [1] https://docs.kernel.org/dev-tools/kunit/style.html Signed-off-by: Janusz Krzysztofik --- tests/kms_selftest.c | 37 - 1 file changed, 16 insertions(+), 21 deletions

[Intel-gfx] [PATCH i-g-t 7/9] lib/ktap: Drop workaround for missing top level KTAP headers

2023-10-03 Thread Janusz Krzysztofik
has fixed that issue, that workaround is no longer needed. Drop it. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 12 lib/tests/igt_ktap_parser.c | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index

[Intel-gfx] [PATCH i-g-t 8/9] lib/kunit: Fetch a list of test cases in advance

2023-10-03 Thread Janusz Krzysztofik
in advance, then we stop parsing KTAP report as soon as we get a result from the last test case from the list. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 217 +++-- 1 file changed, 157 insertions(+), 60 deletions(-) diff --git a/lib/igt_kmod.c b

[Intel-gfx] [PATCH i-g-t 5/9] lib/kunit: Omit suite name prefix if the same as subtest name

2023-10-03 Thread Janusz Krzysztofik
is into account when composing names for IGT dynamic sub-subtest names and drop the leading test suite name component when it is the same as subtest name. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 11 --- 1 file changed, 8 insertions(+),

[Intel-gfx] [PATCH i-g-t 4/9] lib/kunit: Parse KTAP report from the main process thread

2023-10-03 Thread Janusz Krzysztofik
been processed, - fix trailing newlines missing from error messages, - add more debug statements, - integrate common code around kunit_result_free() into it. v2: Interrupt blocking read() on modprobe failure. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab # v2 --- lib

  1   2   3   4   5   6   7   8   9   >