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