public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Punit Agrawal <punit.agrawal@bytedance.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Punit Agrawal <punit.agrawal@bytedance.com>,
	akpm@linux-foundation.org, shuah@kernel.org,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: Re: [PATCH] selftests: proc: Fix proc-empty-vm build error on non x86_64
Date: Wed, 09 Nov 2022 17:25:56 +0000	[thread overview]
Message-ID: <87leok11ln.fsf_-_@stealth> (raw)
In-Reply-To: <Y2vcc00tszEg7Ljz@p183> (Alexey Dobriyan's message of "Wed, 9 Nov 2022 19:59:31 +0300")

Alexey Dobriyan <adobriyan@gmail.com> writes:

> On Wed, Nov 09, 2022 at 11:06:21AM +0000, Punit Agrawal 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.
>
> Ehh, can you just port it to whatever arch you're using?
> What's the address space on arm/arm64?

On arm64, it is 0x0000ffffffffffff ((1 << 48) - 1) when using 48bit VA,
but goes up when using 52-bit VA[0].

> 	#ifdef __amd64__
>                 munmap(NULL, ((size_t)1 << 47) - 4096);
> 	#else
> 	#error "implement 'unmap everything'"
> 	#endif
>
> This program is almost arch-independent.

I did try updating the #ifdef but then hit the asm block in
vsyscall(). Also, the test would be still fail to build on other
architectures.

While support for architectures is added, it would be good to not have
the compiler throw an error on unsuspecting kselftest users.

>> +TEST_GEN_PROGS_x86_64 += proc-empty-vm

[0] https://docs.kernel.org/arm64/memory.html

  reply	other threads:[~2022-11-09 17:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 11:06 [PATCH] selftests: proc: Fix proc-empty-vm build error on non x86_64 Punit Agrawal
2022-11-09 16:59 ` Alexey Dobriyan
2022-11-09 17:25   ` Punit Agrawal [this message]
2022-11-09 22:07 ` 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=87leok11ln.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