From: David Hildenbrand <david@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Mike Rapoport <rppt@kernel.org>
Subject: Re: [PATCH] secretmem: Conert page_is_secretmem() to folio_is_secretmem()
Date: Mon, 21 Aug 2023 18:14:32 +0200 [thread overview]
Message-ID: <1d2e0cae-25a2-3f7b-764d-d34160271414@redhat.com> (raw)
In-Reply-To: <ZOOIfF1rm85NCaw1@casper.infradead.org>
On 21.08.23 17:53, Matthew Wilcox wrote:
> On Mon, Aug 21, 2023 at 05:32:50PM +0200, David Hildenbrand wrote:
>>> - if (PageCompound(page) || !PageLRU(page))
>>> + if (folio_test_large(folio) || folio_test_lru(folio))
>>> return false;
>>
>> You converted a "!PageLRU(page)" into a "folio_test_lru(folio)".
>>
>> Shouldn't that be a "!folio_test_lru(folio)" ?
>
> Well, that's embarrassing. Obviously I don't have any secretmem
> hardware, so my smoke-test didn't catch it. Thanks, will do a v2.
>
We do have a selftest:
tools/testing/selftests/mm/memfd_secret.c
I doubt it would have caught it, because ptrace doesn't use GUP-fast
IIRC, so we always fail early in GUP code when doing the
vma_is_secretmem() check.
We'd explicitly have to call something that triggers GUP-fast
(get_user_pages_fast/pin_user_pages_fast).
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2023-08-21 16:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-21 14:17 Matthew Wilcox (Oracle)
2023-08-21 14:48 ` Mike Rapoport
2023-08-21 15:32 ` David Hildenbrand
2023-08-21 15:53 ` Matthew Wilcox
2023-08-21 16:14 ` 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=1d2e0cae-25a2-3f7b-764d-d34160271414@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=rppt@kernel.org \
--cc=willy@infradead.org \
/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