lkml.org 
[lkml]   [2022]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCHv8 00/11] Linear Address Masking enabling
From
On 9/15/22 10:28, Kirill A. Shutemov wrote:> +	/* Serialize against
address tagging enabling *
> + if (mmap_write_lock_killable(mm))
> + return -EINTR;
> +
> + if (!arch_can_alloc_pasid(mm)) {
> + mmap_write_unlock(mm);
> + return -EBUSY;
> + }

Shouldn't this actually be some kind of *device* check?

The question here is whether the gunk in the mm's address space is
compatible with the device.

* Can the device walk the page tables in use under the mm?
* Does the device interpret addresses the same way as the CPUs
using the mm?

The page table format is, right now, wholly determined at boot at the
latest. But, it probably wouldn't hurt to pretend like it _might_
change at runtime.

The address interpretation part is, of course, what LAM changes. It's
also arguable that it includes features like protection keys. I can
totally see a case where folks might want to be careful and disallow
device access to an mm where pkeys are in use.

\
 
 \ /
  Last update: 2022-09-21 18:59    [W:0.119 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site