lkml.org 
[lkml]   [2020]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 0/5] madvise MADV_DOEXEC
From
Date
On 7/31/2020 1:48 PM, Jason Gunthorpe wrote:
> On Fri, Jul 31, 2020 at 01:15:34PM -0400, Steven Sistare wrote:
>> On 7/31/2020 12:56 PM, Jason Gunthorpe wrote:
>>> On Fri, Jul 31, 2020 at 12:11:52PM -0400, Steven Sistare wrote:
>>>>> Your preservation-across-exec use-case might or might not need the
>>>>> VMA to be mapped at the same address.
>>>>
>>>> It does. qemu registers memory with vfio which remembers the va's in kernel
>>>> metadata for the device.
>>>
>>> Once the memory is registered with vfio the VA doesn't matter, vfio
>>> will keep the iommu pointing at the same physical pages no matter
>>> where they are mapped.
>>
>> Yes, but there are other code paths that compute and use offsets between va and the
>> base va. Mapping at a different va in the new process breaks vfio; I have tried it.
>
> Maybe you could fix vfio instead of having this adventure, if vfio is
> the only motivation.

Maybe. We still need to preserve an anonymous segment, though. MADV_DOEXEC, or mshare,
or something else. And I think the ability to preserve memory containing pointers to itself
is an interesting use case, though not ours.

- Steve

\
 
 \ /
  Last update: 2020-07-31 19:57    [W:4.314 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site