Am 2021-11-18 um 10:55 a.m. schrieb philip yang:
>
>
> On 2021-11-18 10:07 a.m., Felix Kuehling wrote:
>> Am 2021-11-18 um 10:00 a.m. schrieb philip yang:
>>> On 2021-11-17 7:10 p.m., Felix Kuehling wrote:
On 2021-11-16 10:43 p.m., Philip Yang wrote:
> VMA may be removed before unmap
On 2021-11-18 10:07 a.m., Felix
Kuehling wrote:
Am 2021-11-18 um 10:00 a.m. schrieb philip yang:
On 2021-11-17 7:10 p.m., Felix Kuehling wrote:
On 2021-11-16 10:43 p.m., Philip Yang wrote:
VMA may
Am 2021-11-18 um 10:00 a.m. schrieb philip yang:
>
>
> On 2021-11-17 7:10 p.m., Felix Kuehling wrote:
>> On 2021-11-16 10:43 p.m., Philip Yang wrote:
>>> VMA may be removed before unmap notifier callback, restore pages take
>>> mmap write lock to lookup VMA to avoid race,
>>
>> The old code looked
On 2021-11-17 7:10 p.m., Felix Kuehling
wrote:
On
2021-11-16 10:43 p.m., Philip Yang wrote:
VMA may be removed before unmap notifier
callback, restore pages take
mmap write lock to lookup VMA to avoid race,
On 2021-11-16 10:43 p.m., Philip Yang wrote:
VMA may be removed before unmap notifier callback, restore pages take
mmap write lock to lookup VMA to avoid race,
The old code looked up the VMA after taking the mmap lock (either read
or write) and kept holding the lock afterwards. I think even
VMA may be removed before unmap notifier callback, restore pages take
mmap write lock to lookup VMA to avoid race, and then create unregister
new range and check VMA access permission, then downgrade to take mmap
read lock to recover fault. Refactor code to avoid duplicate VMA lookup.