[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87leok11ln.fsf_-_@stealth>
Date: Wed, 09 Nov 2022 17:25:56 +0000
From: Punit Agrawal <punit.agrawal@...edance.com>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: Punit Agrawal <punit.agrawal@...edance.com>,
akpm@...ux-foundation.org, shuah@...nel.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: Re: Re: [PATCH] selftests: proc: Fix proc-empty-vm build error on
non x86_64
Alexey Dobriyan <adobriyan@...il.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
Powered by blists - more mailing lists