Re: [PATCH v1] s390x/mm: cleanup gmap_pte_op_walk()

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

 



On 13.11.2017 16:19, Janosch Frank wrote:
> This is KVM, not qemu, subject s/x//
> 
> 
> On 10.11.2017 16:18, David Hildenbrand wrote:
>> gmap_mprotect_notify() refuses shadow gmaps. Turns out that
>> a) gmap_protect_range()
>> b) gmap_read_table()
>> c) gmap_pte_op_walk()
>>
>> Are never called for gmap shadows. And never should be. This dates back
>> to gmap shadow prototypes where we allowed to call mprotect_notify() on
>> the gmap shadow (to get notified about the prefix pages getting removed).
>> This is avoided by always getting notified about any change on the gmap
>> shadow.
>>
>> The only real function for walking page tables on shadow gmaps is
>> gmap_table_walk().
>>
>> So, essentially, these functions should never get called and
>> gmap_pte_op_walk() can be cleaned up. Add some checks to callers of
>> gmap_pte_op_walk().
> 
> This already made sense when discussing, but I traced the callers anyhow
> to make sure we didn't accidentally forget one.
> 
> Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxxxxxxx> with one nit below
> 

Thanks!

>> @@ -889,7 +879,6 @@ static void gmap_pte_op_end(spinlock_t *ptl)
>>   *
>>   * Called with sg->mm->mmap_sem in read.
>>   *
>> - * Note: Can also be called for shadow gmaps.
> 
> How about also getting rid of the line above this one?
> 

Sure, can the person picking this up fix that one up?

-- 

Thanks,

David / dhildenb



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux