From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Andrei Vagin <avagin@gmail.com>
Cc: "Muhammad Usama Anjum" <usama.anjum@collabora.com>,
"Peter Xu" <peterx@redhat.com>,
"David Hildenbrand" <david@redhat.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Michał Mirosław" <emmir@google.com>,
"Danylo Mocherniuk" <mdanylo@google.com>,
"Paul Gofman" <pgofman@codeweavers.com>,
"Cyrill Gorcunov" <gorcunov@gmail.com>,
"Mike Rapoport" <rppt@kernel.org>,
"Nadav Amit" <namit@vmware.com>,
"Alexander Viro" <viro@zeniv.linux.org.uk>,
"Shuah Khan" <shuah@kernel.org>,
"Christian Brauner" <brauner@kernel.org>,
"Yang Shi" <shy828301@gmail.com>,
"Vlastimil Babka" <vbabka@suse.cz>,
"Liam R . Howlett" <Liam.Howlett@oracle.com>,
"Yun Zhou" <yun.zhou@windriver.com>,
"Suren Baghdasaryan" <surenb@google.com>,
"Alex Sierra" <alex.sierra@amd.com>,
"Matthew Wilcox" <willy@infradead.org>,
"Pasha Tatashin" <pasha.tatashin@soleen.com>,
"Axel Rasmussen" <axelrasmussen@google.com>,
"Gustavo A . R . Silva" <gustavoars@kernel.org>,
"Dan Williams" <dan.j.williams@intel.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
"Greg KH" <gregkh@linuxfoundation.org>,
kernel@collabora.com
Subject: Re: [PATCH v24 2/5] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs
Date: Wed, 12 Jul 2023 08:16:34 +0500 [thread overview]
Message-ID: <2a4e523a-9d8d-5370-b6f0-f24505f0acea@collabora.com> (raw)
In-Reply-To: <CANaxB-zvYpKw-aeF8nd_spARdkV29H7ZJDDhusnmqOPZX1xXtw@mail.gmail.com>
On 7/12/23 12:42 AM, Andrei Vagin wrote:
> On Tue, Jul 11, 2023 at 5:53 AM Muhammad Usama Anjum
> <usama.anjum@collabora.com> wrote:
>
> <snip>
>
>> +static int pagemap_scan_pte_hole(unsigned long addr, unsigned long end,
>> + int depth, struct mm_walk *walk)
>> +{
>> + unsigned long n_pages = (end - addr)/PAGE_SIZE;
>> + struct pagemap_scan_private *p = walk->private;
>> + struct vm_area_struct *vma = walk->vma;
>> + int ret = 0;
>> +
>> + if (!vma)
>> + return 0;
>> +
>> + if (IS_PM_SCAN_GET(p->flags)) {
>> + if (n_pages > p->max_pages - p->found_pages)
>> + n_pages = p->max_pages - p->found_pages;
>> +
>> + ret = pagemap_scan_output(PM_SCAN_FLAGS(false, false, false,
>> + false, false), p, addr, n_pages);
>
> Why do we report holes unconditionally?
It seems I've missed the filtering part for holes. It got missed and no
test/reviewer caught it earlier. I'll add it pretty quickly.
Are you satisfied with the remaining patch and can you sent reviewed/acked
by tag?
>
>> + }
>> +
>> + if (IS_PM_SCAN_WP(p->flags) &&
>> + uffd_wp_range(vma, addr, end - addr, true) < 0)
>> + ret = -EINVAL;
>> +
>> + return ret;
>> +}
>
> Thanks,
> Andrei
--
BR,
Muhammad Usama Anjum
next prev parent reply other threads:[~2023-07-12 3:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 12:52 [PATCH v24 0/5] " Muhammad Usama Anjum
2023-07-11 12:52 ` [PATCH v24 1/5] userfaultfd: UFFD_FEATURE_WP_ASYNC Muhammad Usama Anjum
2023-07-11 12:52 ` [PATCH v24 2/5] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs Muhammad Usama Anjum
2023-07-11 19:42 ` Andrei Vagin
2023-07-12 3:16 ` Muhammad Usama Anjum [this message]
2023-07-11 12:52 ` [PATCH v24 3/5] tools headers UAPI: Update linux/fs.h with the kernel sources Muhammad Usama Anjum
2023-07-11 12:52 ` [PATCH v24 4/5] mm/pagemap: add documentation of PAGEMAP_SCAN IOCTL Muhammad Usama Anjum
2023-07-11 12:52 ` [PATCH v24 5/5] selftests: mm: add pagemap ioctl tests Muhammad Usama Anjum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a4e523a-9d8d-5370-b6f0-f24505f0acea@collabora.com \
--to=usama.anjum@collabora.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=alex.sierra@amd.com \
--cc=avagin@gmail.com \
--cc=axelrasmussen@google.com \
--cc=brauner@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=david@redhat.com \
--cc=emmir@google.com \
--cc=gorcunov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=gustavoars@kernel.org \
--cc=kernel@collabora.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mdanylo@google.com \
--cc=namit@vmware.com \
--cc=pasha.tatashin@soleen.com \
--cc=peterx@redhat.com \
--cc=pgofman@codeweavers.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=shy828301@gmail.com \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--cc=yun.zhou@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox