Re: [PATCH v2] i915/selftest/igt_mmap: let mmap tests run in kthread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2025-03-07 at 12:31:25 +0100, Chris Wilson wrote:
> 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

I still don't know if it would be feasible to use methods that are
exposed only to kunit to run our selftest. Do you think we should go that way?

Mikołaj



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux