lkml.org 
[lkml]   [2023]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [v2] fs/proc/task_mmu: Implement IOCTL for efficient page table scanning
    From
    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

    \
     
     \ /
      Last update: 2023-07-25 09:29    [W:8.572 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site