All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris.p.wilson@linux.intel.com>
To: Krzysztof Niemiec <krzysztof.niemiec@intel.com>,
	Mikolaj Wasiak <mikolaj.wasiak@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] i915/selftest/igt_mmap: let mmap tests run in kthread
Date: Fri, 07 Mar 2025 12:31:25 +0100	[thread overview]
Message-ID: <174134708564.785137.4586842576093518384@DEV-409> (raw)
In-Reply-To: <2l2xubl54w5lppc55lvksasp7ged4tactvumqoxvuocbaqnb36@as6ekkdh57zy>

Quoting Mikolaj Wasiak (2025-03-07 08:44:29)
> Hi Krzysztof,
> 
> On 2025-03-05 at 17:31:49 +0100, Krzysztof Niemiec wrote:
> > Don't we run into the same issue as in V1, meaning we use an unknown
> > current->active_mm (since we run in a kthread, and cannot control it) to
> > use as the current->mm? Maybe a better approach would be to create a new
> > mm for the duration of the test, similarly to how the patch Janusz
> > mentioned does it? (51104c19d857)
> 
> As per discussion with Chris, using active_mm is the correct way of
> enabling current->mm in kthread. On the other hand it may also expose
> issues with underlying tests because they didn't previously run on such
> hardware. I think potential fixes to those tests should be addressed in
> separate patch.

We've looked at the tests, and they should all be finding unused space
in the mm and cleaning up after themselves...

If we put on our paranoia hats, the biggest problem with borrowing
userspace's mm is that it gives them temporary insight into whatever
we place into that mm. We don't expose any data, unless by error...
Not sure how much effort we want to put on making the selftests paranoia
proof, but that (and the surety of cleaning up afterwards) would be a
good argument for creating a temporary mm for our use.
-Chris

  reply	other threads:[~2025-03-07 11:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04  8:43 [PATCH v2] i915/selftest/igt_mmap: let mmap tests run in kthread Mikolaj Wasiak
2025-03-04 11:37 ` ✓ i915.CI.BAT: success for i915/selftest/igt_mmap: let mmap tests run in kthread (rev2) Patchwork
2025-03-04 15:28 ` ✓ i915.CI.BAT: success for i915/selftest/igt_mmap: let mmap tests run in kthread (rev3) Patchwork
2025-03-05  3:08 ` ✗ i915.CI.Full: failure for i915/selftest/igt_mmap: let mmap tests run in kthread (rev2) Patchwork
2025-03-05  6:35 ` ✗ i915.CI.Full: failure for i915/selftest/igt_mmap: let mmap tests run in kthread (rev3) Patchwork
2025-03-05 16:31 ` [PATCH v2] i915/selftest/igt_mmap: let mmap tests run in kthread Krzysztof Niemiec
2025-03-07  7:44   ` Mikolaj Wasiak
2025-03-07 11:31     ` Chris Wilson [this message]
2025-03-07 12:14       ` Mikolaj Wasiak
2025-03-07 13:18       ` Krzysztof Niemiec
2025-03-11 10:37         ` Krzysztof Karas
2025-03-14 14:26 ` Andi Shyti
2025-03-14 15:18 ` Andi Shyti

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=174134708564.785137.4586842576093518384@DEV-409 \
    --to=chris.p.wilson@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=krzysztof.niemiec@intel.com \
    --cc=mikolaj.wasiak@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.