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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d91c8c36-b01d-48f9-b0f6-8faa58edaed0@arm.com>
Date: Fri, 22 Mar 2024 10:42:47 +0530
From: Dev Jain <dev.jain@....com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: shuah@...nel.org, linux-mm@...ck.org, linux-kselftest@...r.kernel.org,
 linux-kernel@...r.kernel.org, Anshuman.Khandual@....com
Subject: Re: [PATCH] selftests/mm: Confirm VA exhaustion without reliance on
 correctness of mmap()


On 3/22/24 03:21, Andrew Morton wrote:
> On Thu, 21 Mar 2024 16:05:22 +0530 Dev Jain <dev.jain@....com> wrote:
>
>> Currently, VA exhaustion is being checked by passing a hint to mmap() and
>> expecting it to fail. This patch makes a stricter test by successful write()
>> calls from /proc/self/maps to a dump file, confirming that a free chunk is
>> indeed not available.
> What's wrong with the current approach?
While populating the lower VA space, mmap() fails because we have 
exhausted the space.

Then, in validate_lower_address_hint(), because mmap() fails, we confirm 
that we have

indeed exhausted the space. There is a circular logic involved here.

Assume that there is a bug in mmap(), also assume that it exists 
independent of whether

you pass a hint address or not; that for some reason it is not able to 
find a 1GB chunk.

My idea is to assert the exhaustion against some other method.


Also, in the following line in validate_complete_va_space():

         if (start_addr - prev_end_addr >= SZ_1GB)

I made a small error, I forgot to use MAP_CHUNK_SIZE instead of SZ_1GB.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ