lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 10 Nov 2022 14:34:07 +0000
From:   Punit Agrawal <punit.agrawal@...edance.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Punit Agrawal <punit.agrawal@...edance.com>, shuah@...nel.org,
        adobriyan@...il.com, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [External] Re: [PATCH v2 1/2] selftests: proc: Fix
 proc-empty-vm build error on non x86_64

Hi Andrew,

Thanks for taking a look.

Andrew Morton <akpm@...ux-foundation.org> writes:

> On Wed,  9 Nov 2022 22:11:03 +0000 Punit Agrawal <punit.agrawal@...edance.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ