Re: [v2] fs/proc/task_mmu: Implement IOCTL for efficient page table scanning

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

 



On 7/24/23 9:10 PM, Michał Mirosław wrote:
[...]>>>> @@ -2219,22 +2225,24 @@ static int pagemap_scan_get_args(struct
pm_scan_arg
>>>> *arg,
>>>>              arg->category_anyof_mask | arg->return_mask) & ~PM_SCAN_CATEGORIES)
>>>>                 return -EINVAL;
>>>>
>>>> -       start = untagged_addr((unsigned long)arg->start);
>>>> -       end = untagged_addr((unsigned long)arg->end);
>>>> -       vec = untagged_addr((unsigned long)arg->vec);
>>>> +       arg->start = untagged_addr((unsigned long)arg->start);
>>>> +       arg->end = untagged_addr((unsigned long)arg->end);
>>>> +       arg->vec = untagged_addr((unsigned long)arg->vec);
>>>
>>> BTW, We should we keep the tag in args writeback().
>> Sorry what?
>> After this function, the start, end and vec would be used. We need to make
>> sure that the address are untagged before that.
> 
> We do write back the address the walk ended at to arg->start in
> userspace. This pointer I think needs the tag reconstructed so that
> retrying the ioctl() will be possible.
Even if we reconstruct the tag for end and vec, We need to update the start
address. Can we just put same tag as original start in it? I'm not sure.

-- 
BR,
Muhammad Usama Anjum



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux