From: Peter Xu <peterx@redhat.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: David Hildenbrand <david@redhat.com>,
Nadav Amit <nadav.amit@gmail.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm/mprotect: Fix soft-dirty check in can_change_pte_writable()
Date: Wed, 20 Jul 2022 18:02:56 -0400 [thread overview]
Message-ID: <Yth7kPbqiJcIy5Rs@xz-m1.local> (raw)
In-Reply-To: <20220720215319.87839-1-peterx@redhat.com>
On Wed, Jul 20, 2022 at 05:53:19PM -0400, Peter Xu wrote:
> void clear_refs_write(void)
> {
> int fd = open("/proc/self/clear_refs", O_RDWR);
>
> assert(fd >= 0);
> write(fd, "4", 2);
> close(fd);
> }
>
Oops, git dropped some of the lines starting with "#".. Let me retry, sorry.
> bool dirty = pagemap_read_vaddr(fd, page) & PM_SOFT_DIRTY; \
> if (dirty != expect) { \
> printf("ERROR: %s, soft-dirty=%d (expect: %d)\n", str, dirty, expect); \
> exit(-1); \
> } \
> } while (0)
--
Peter Xu
prev parent reply other threads:[~2022-07-20 22:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 21:53 Peter Xu
2022-07-20 22:02 ` Peter Xu [this message]
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=Yth7kPbqiJcIy5Rs@xz-m1.local \
--to=peterx@redhat.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nadav.amit@gmail.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