From: David Hildenbrand <david@redhat.com>
To: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
Shuah Khan <shuah@kernel.org>, Jason Gunthorpe <jgg@nvidia.com>,
John Hubbard <jhubbard@nvidia.com>, Nadav Amit <namit@vmware.com>,
Peter Xu <peterx@redhat.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Vlastimil Babka <vbabka@suse.cz>, Mike Rapoport <rppt@kernel.org>,
Christoph von Recklinghausen <crecklin@redhat.com>,
Don Dutile <ddutile@redhat.com>
Subject: Re: [PATCH v1 7/7] selftests/vm: anon_cow: add R/O longterm tests via gup_test
Date: Wed, 19 Oct 2022 14:33:17 +0200 [thread overview]
Message-ID: <c1bcb281-c4ef-3b7d-f24d-82569602939b@redhat.com> (raw)
In-Reply-To: <74adbb51-6e33-f636-8a9c-2ad87bd9007e@redhat.com>
On 19.10.22 14:31, David Hildenbrand wrote:
> On 27.09.22 13:01, David Hildenbrand wrote:
>> Let's trigger a R/O longterm pin on three cases of R/O mapped anonymous
>> pages:
>> * exclusive (never shared)
>> * shared (child still alive)
>> * previously shared (child no longer alive)
>>
>> ... and make sure that the pin is reliable: whatever we write via the page
>> tables has to be observable via the pin.
>>
>> Signed-off-by: David Hildenbrand <david@redhat.com>
>> ---
>
> The following on top should silence the warning on 32bit:
>
> https://lore.kernel.org/all/202210182101.XOyPZEQV-lkp@intel.com/T/#u
>
>
> diff --git a/mm/gup_test.c b/mm/gup_test.c
> index 2bbfacd31f5a..57c343f2dc51 100644
> --- a/mm/gup_test.c
> +++ b/mm/gup_test.c
> @@ -299,7 +299,8 @@ static inline int pin_longterm_test_read(unsigned long arg)
> for (i = 0; i < pin_longterm_test_nr_pages; i++) {
> void *addr = page_to_virt(pin_longterm_test_pages[i]);
>
> - if (copy_to_user((void __user *)user_addr, addr, PAGE_SIZE))
> + if (copy_to_user((void __user *)(unsigned long)user_addr, addr,
> + PAGE_SIZE))
> return -EFAULT;
> user_addr += PAGE_SIZE;
> }
>
>
Ehm, wrong patch, it actually belongs into #6/7
https://lkml.kernel.org/r/20220927110120.106906-7-david@redhat.com
@Andrew, if your confused, I can just resend the whole thing.
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2022-10-19 12:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 11:01 [PATCH v1 0/7] selftests/vm: test COW handling of anonymous memory David Hildenbrand
2022-09-27 11:01 ` [PATCH v1 1/7] selftests/vm: anon_cow: " David Hildenbrand
2022-10-24 16:57 ` Rafael Mendonca
2022-10-25 7:05 ` David Hildenbrand
2022-10-25 7:07 ` David Hildenbrand
2022-09-27 11:01 ` [PATCH v1 2/7] selftests/vm: factor out pagemap_is_populated() into vm_util David Hildenbrand
2022-09-27 11:01 ` [PATCH v1 3/7] selftests/vm: anon_cow: THP tests David Hildenbrand
2022-09-27 11:01 ` [PATCH v1 4/7] selftests/vm: anon_cow: hugetlb tests David Hildenbrand
2022-09-27 11:01 ` [PATCH v1 5/7] selftests/vm: anon_cow: add liburing test cases David Hildenbrand
2022-10-25 7:10 ` David Hildenbrand
2022-09-27 11:01 ` [PATCH v1 6/7] mm/gup_test: start/stop/read functionality for PIN LONGTERM test David Hildenbrand
2022-09-27 11:01 ` [PATCH v1 7/7] selftests/vm: anon_cow: add R/O longterm tests via gup_test David Hildenbrand
2022-10-19 12:31 ` David Hildenbrand
2022-10-19 12:33 ` David Hildenbrand [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=c1bcb281-c4ef-3b7d-f24d-82569602939b@redhat.com \
--to=david@redhat.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=crecklin@redhat.com \
--cc=ddutile@redhat.com \
--cc=jgg@nvidia.com \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=namit@vmware.com \
--cc=peterx@redhat.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=vbabka@suse.cz \
/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