From: Punit Agrawal <punit.agrawal@bytedance.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Punit Agrawal <punit.agrawal@bytedance.com>,
shuah@kernel.org, adobriyan@gmail.com,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [External] Re: [PATCH v2 1/2] selftests: proc: Fix proc-empty-vm build error on non x86_64
Date: Thu, 10 Nov 2022 14:34:07 +0000 [thread overview]
Message-ID: <8735aq280w.fsf@stealth> (raw)
In-Reply-To: <20221109160243.0db030ca1cbae5f180af3855@linux-foundation.org> (Andrew Morton's message of "Wed, 9 Nov 2022 16:02:43 -0800")
Hi Andrew,
Thanks for taking a look.
Andrew Morton <akpm@linux-foundation.org> writes:
> On Wed, 9 Nov 2022 22:11:03 +0000 Punit Agrawal <punit.agrawal@bytedance.com> wrote:
>
>> The proc-empty-vm test is implemented for x86_64 and fails to build
>> for other architectures. Rather then emitting a compiler error it
>> would be preferable to only build the test on supported architectures.
>
> Why does it fail? What would be involved in making it available
> on other architectures?
The test is written to fail building on architectures other than
x86_64.
#ifdef __amd64__
munmap(NULL, ((size_t)1 << 47) - 4096);
#else
#error "implement 'unmap everything'"
#endif
I hit the build failure while semi-automating the running of tests on
internal infrastructure.
I am not familiar with the issue being tested but after a bit of
staring, it looks like there are two architecture dependent components
to the tests -
1. TASK_SIZE / application memory layout - the test unmaps the
entire the user virtual address space. For this, it needs to know
the length to pass to munmap().
Although it's possible to add this per-architecture, I am not
sure if there is a way to discover the length passed to munmap().
2. How the vsyscall page (if implemented) is mapped - this
influences the known good values used for comparison in the test.
It doesn't look like vsyscall page is used on arm64 but I am not
sure about the situation with other architectures.
(Alexey, please add if I've missed anything)
Thanks,
Punit
next prev parent reply other threads:[~2022-11-10 14:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 22:11 [PATCH v2 1/2] selftests: proc: Fix proc-empty-vm build error on non x86_64 Punit Agrawal
2022-11-09 22:11 ` [PATCH v2 2/2] selftests: proc: Mark proc-pid-vm as x86_64 only Punit Agrawal
2022-11-10 1:12 ` Shuah Khan
2022-11-10 0:02 ` [PATCH v2 1/2] selftests: proc: Fix proc-empty-vm build error on non x86_64 Andrew Morton
2022-11-10 1:44 ` Shuah Khan
2022-11-10 14:34 ` Punit Agrawal [this message]
2022-11-10 0:20 ` Shuah Khan
2022-11-10 14:45 ` [External] " Punit Agrawal
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=8735aq280w.fsf@stealth \
--to=punit.agrawal@bytedance.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.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