[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <diqz5ya319rb.fsf@ackerleytng-cloudtop.c.googlers.com>
Date: Tue, 11 Apr 2023 01:35:20 +0000
From: Ackerley Tng <ackerleytng@...gle.com>
To: David Hildenbrand <david@...hat.com>
Cc: kvm@...r.kernel.org, linux-api@...r.kernel.org,
linux-arch@...r.kernel.org, linux-doc@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, qemu-devel@...gnu.org, aarcange@...hat.com,
ak@...ux.intel.com, akpm@...ux-foundation.org, arnd@...db.de,
bfields@...ldses.org, bp@...en8.de, chao.p.peng@...ux.intel.com,
corbet@....net, dave.hansen@...el.com, ddutile@...hat.com,
dhildenb@...hat.com, hpa@...or.com, hughd@...gle.com,
jlayton@...nel.org, jmattson@...gle.com, joro@...tes.org,
jun.nakajima@...el.com, kirill.shutemov@...ux.intel.com,
linmiaohe@...wei.com, luto@...nel.org, mail@...iej.szmigiero.name,
mhocko@...e.com, michael.roth@....com, mingo@...hat.com,
naoya.horiguchi@....com, pbonzini@...hat.com, qperret@...gle.com,
rppt@...nel.org, seanjc@...gle.com, shuah@...nel.org,
steven.price@....com, tabba@...gle.com, tglx@...utronix.de,
vannapurve@...gle.com, vbabka@...e.cz, vkuznets@...hat.com,
wanpengli@...cent.com, wei.w.wang@...el.com, x86@...nel.org,
yu.c.zhang@...ux.intel.com
Subject: Re: [RFC PATCH v3 2/2] selftests: restrictedmem: Check hugepage-ness
of shmem file backing restrictedmem fd
David Hildenbrand <david@...hat.com> writes:
> On 01.04.23 01:50, Ackerley Tng wrote:
>> For memfd_restricted() calls without a userspace mount, the backing
>> file should be the shmem mount in the kernel, and the size of backing
>> pages should be as defined by system-wide shmem configuration.
>> If a userspace mount is provided, the size of backing pages should be
>> as defined in the mount.
>> Also includes negative tests for invalid inputs, including fds
>> representing read-only superblocks/mounts.
> When you talk about "hugepage" in this patch, do you mean THP or
> hugetlb? I suspect thp, so it might be better to spell that out. IIRC,
> there are plans to support actual huge pages in the future, at which
> point "hugepage" terminology could be misleading.
Thanks for pointing this out! I've replaced references to hugepage with
thp, please see RFC v4 at
https://lore.kernel.org/lkml/cover.1681176340.git.ackerleytng@google.com/T/
>> Signed-off-by: Ackerley Tng <ackerleytng@...gle.com>
>> ---
>> tools/testing/selftests/Makefile | 1 +
>> .../selftests/restrictedmem/.gitignore | 3 +
>> .../testing/selftests/restrictedmem/Makefile | 15 +
>> .../testing/selftests/restrictedmem/common.c | 9 +
>> .../testing/selftests/restrictedmem/common.h | 8 +
>> .../restrictedmem_hugepage_test.c | 486 ++++++++++++++++++
>> 6 files changed, 522 insertions(+)
>> create mode 100644 tools/testing/selftests/restrictedmem/.gitignore
>> create mode 100644 tools/testing/selftests/restrictedmem/Makefile
>> create mode 100644 tools/testing/selftests/restrictedmem/common.c
>> create mode 100644 tools/testing/selftests/restrictedmem/common.h
>> create mode 100644
>> tools/testing/selftests/restrictedmem/restrictedmem_hugepage_test.c
>> ...
Powered by blists - more mailing lists