From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Chris Wilson" <chris.p.wilson@linux.intel.com>,
intel-gfx@lists.freedesktop.org,
"Andrzej Hajda" <andrzej.hajda@intel.com>,
dri-devel@lists.freedesktop.org,
"Daniel Vetter" <daniel@ffwll.ch>,
"David Airlie" <airlied@gmail.com>,
"Nirmoy Das" <nirmoy.das@intel.com>
Subject: Re: [PATCH v4 2/3] Manually revert "drm/i915: Fix a VMA UAF for multi-gt platform"
Date: Mon, 22 Jan 2024 16:13:32 -0500 [thread overview]
Message-ID: <Za7afPr_7qjyHHIM@intel.com> (raw)
In-Reply-To: <20240122141007.401490-7-janusz.krzysztofik@linux.intel.com>
On Mon, Jan 22, 2024 at 03:04:43PM +0100, Janusz Krzysztofik wrote:
> This reverts changes introduced by commit f56fe3e91787, obsoleted by
> "drm/i915/vma: Fix UAF on destroy against retire race".
I believe the good chunk of the first commit message should be moved
here instead.
But why did you do a 'manually revert'? revert itself didn't apply?
maybe you could avoid the word 'revert' and use something like
Remove extra multi-gt pm-references... or something like that.
>
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 17 -----------------
> 1 file changed, 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> index d3a771afb083e..cedca8fd8754d 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -2686,7 +2686,6 @@ static int
> eb_select_engine(struct i915_execbuffer *eb)
> {
> struct intel_context *ce, *child;
> - struct intel_gt *gt;
> unsigned int idx;
> int err;
>
> @@ -2710,17 +2709,10 @@ eb_select_engine(struct i915_execbuffer *eb)
> }
> }
> eb->num_batches = ce->parallel.number_children + 1;
> - gt = ce->engine->gt;
>
> for_each_child(ce, child)
> intel_context_get(child);
> eb->wakeref = intel_gt_pm_get(ce->engine->gt);
> - /*
> - * Keep GT0 active on MTL so that i915_vma_parked() doesn't
> - * free VMAs while execbuf ioctl is validating VMAs.
> - */
> - if (gt->info.id)
> - eb->wakeref_gt0 = intel_gt_pm_get(to_gt(gt->i915));
>
> if (!test_bit(CONTEXT_ALLOC_BIT, &ce->flags)) {
> err = intel_context_alloc_state(ce);
> @@ -2759,9 +2751,6 @@ eb_select_engine(struct i915_execbuffer *eb)
> return err;
>
> err:
> - if (gt->info.id)
> - intel_gt_pm_put(to_gt(gt->i915), eb->wakeref_gt0);
> -
> intel_gt_pm_put(ce->engine->gt, eb->wakeref);
> for_each_child(ce, child)
> intel_context_put(child);
> @@ -2775,12 +2764,6 @@ eb_put_engine(struct i915_execbuffer *eb)
> struct intel_context *child;
>
> i915_vm_put(eb->context->vm);
> - /*
> - * This works in conjunction with eb_select_engine() to prevent
> - * i915_vma_parked() from interfering while execbuf validates vmas.
> - */
> - if (eb->gt->info.id)
> - intel_gt_pm_put(to_gt(eb->gt->i915), eb->wakeref_gt0);
> intel_gt_pm_put(eb->context->engine->gt, eb->wakeref);
> for_each_child(eb->context, child)
> intel_context_put(child);
> --
> 2.43.0
>
WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: "Tvrtko Ursulin" <tvrtko.ursulin@linux.intel.com>,
"Andi Shyti" <andi.shyti@linux.intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Chris Wilson" <chris.p.wilson@linux.intel.com>,
intel-gfx@lists.freedesktop.org,
"Andrzej Hajda" <andrzej.hajda@intel.com>,
dri-devel@lists.freedesktop.org,
"Daniel Vetter" <daniel@ffwll.ch>,
"David Airlie" <airlied@gmail.com>,
"Nirmoy Das" <nirmoy.das@intel.com>
Subject: Re: [PATCH v4 2/3] Manually revert "drm/i915: Fix a VMA UAF for multi-gt platform"
Date: Mon, 22 Jan 2024 16:13:32 -0500 [thread overview]
Message-ID: <Za7afPr_7qjyHHIM@intel.com> (raw)
In-Reply-To: <20240122141007.401490-7-janusz.krzysztofik@linux.intel.com>
On Mon, Jan 22, 2024 at 03:04:43PM +0100, Janusz Krzysztofik wrote:
> This reverts changes introduced by commit f56fe3e91787, obsoleted by
> "drm/i915/vma: Fix UAF on destroy against retire race".
I believe the good chunk of the first commit message should be moved
here instead.
But why did you do a 'manually revert'? revert itself didn't apply?
maybe you could avoid the word 'revert' and use something like
Remove extra multi-gt pm-references... or something like that.
>
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 17 -----------------
> 1 file changed, 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> index d3a771afb083e..cedca8fd8754d 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -2686,7 +2686,6 @@ static int
> eb_select_engine(struct i915_execbuffer *eb)
> {
> struct intel_context *ce, *child;
> - struct intel_gt *gt;
> unsigned int idx;
> int err;
>
> @@ -2710,17 +2709,10 @@ eb_select_engine(struct i915_execbuffer *eb)
> }
> }
> eb->num_batches = ce->parallel.number_children + 1;
> - gt = ce->engine->gt;
>
> for_each_child(ce, child)
> intel_context_get(child);
> eb->wakeref = intel_gt_pm_get(ce->engine->gt);
> - /*
> - * Keep GT0 active on MTL so that i915_vma_parked() doesn't
> - * free VMAs while execbuf ioctl is validating VMAs.
> - */
> - if (gt->info.id)
> - eb->wakeref_gt0 = intel_gt_pm_get(to_gt(gt->i915));
>
> if (!test_bit(CONTEXT_ALLOC_BIT, &ce->flags)) {
> err = intel_context_alloc_state(ce);
> @@ -2759,9 +2751,6 @@ eb_select_engine(struct i915_execbuffer *eb)
> return err;
>
> err:
> - if (gt->info.id)
> - intel_gt_pm_put(to_gt(gt->i915), eb->wakeref_gt0);
> -
> intel_gt_pm_put(ce->engine->gt, eb->wakeref);
> for_each_child(ce, child)
> intel_context_put(child);
> @@ -2775,12 +2764,6 @@ eb_put_engine(struct i915_execbuffer *eb)
> struct intel_context *child;
>
> i915_vm_put(eb->context->vm);
> - /*
> - * This works in conjunction with eb_select_engine() to prevent
> - * i915_vma_parked() from interfering while execbuf validates vmas.
> - */
> - if (eb->gt->info.id)
> - intel_gt_pm_put(to_gt(eb->gt->i915), eb->wakeref_gt0);
> intel_gt_pm_put(eb->context->engine->gt, eb->wakeref);
> for_each_child(eb->context, child)
> intel_context_put(child);
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-01-22 21:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 14:04 [PATCH v4 0/3] drm/i915: Fix VMA UAF on destroy against deactivate race Janusz Krzysztofik
2024-01-22 14:04 ` Janusz Krzysztofik
2024-01-22 14:04 ` [PATCH v4 1/3] drm/i915/vma: Fix UAF on destroy against retire race Janusz Krzysztofik
2024-01-22 14:04 ` Janusz Krzysztofik
2024-01-22 21:09 ` Rodrigo Vivi
2024-01-22 21:09 ` Rodrigo Vivi
2024-01-23 10:51 ` Janusz Krzysztofik
2024-01-23 10:51 ` Janusz Krzysztofik
2024-01-23 22:33 ` Rodrigo Vivi
2024-01-23 22:33 ` Rodrigo Vivi
2024-01-22 14:04 ` [PATCH v4 2/3] Manually revert "drm/i915: Fix a VMA UAF for multi-gt platform" Janusz Krzysztofik
2024-01-22 14:04 ` Janusz Krzysztofik
2024-01-22 21:13 ` Rodrigo Vivi [this message]
2024-01-22 21:13 ` Rodrigo Vivi
2024-01-22 14:04 ` [PATCH v4 3/3] Revert "drm/i915: Wait for active retire before i915_active_fini()" Janusz Krzysztofik
2024-01-22 14:04 ` Janusz Krzysztofik
2024-01-22 21:05 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Fix VMA UAF on destroy against deactivate race Patchwork
2024-01-22 21:05 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-01-22 21:23 ` ✗ Fi.CI.BAT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Za7afPr_7qjyHHIM@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=chris.p.wilson@linux.intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=janusz.krzysztofik@linux.intel.com \
--cc=nirmoy.das@intel.com \
--cc=thomas.hellstrom@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.