[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1ac669c9-331b-493c-a241-8a7a07716eed@redhat.com>
Date: Fri, 10 Jan 2025 16:28:55 +0100
From: David Hildenbrand <david@...hat.com>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>, Shuah Khan <shuah@...nel.org>,
Dev Jain <dev.jain@....com>, Thomas Gleixner <tglx@...utronix.de>
Cc: linux-mm@...ck.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] selftests/mm: virtual_address_range: mmap()
without PROT_WRITE
On 10.01.25 14:05, Thomas Weißschuh wrote:
> When mapping a larger chunk than physical memory is available with
> PROT_WRITE and overcommit is disabled, the mapping will fail.
> This will prevent the test from running on systems with less then ~1GiB
> of memory and triggering an inscrutinable test failure.
> As the mappings are never written to anyways, the flag can be removed.
>
> Fixes: 010409649885 ("selftests/mm: confirm VA exhaustion without reliance on correctness of mmap()")
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
>
> ---
> I went with dropping PROT_WRITE instead of adding MAP_NORESERVE as this
> works even in the face of OVERCOMMIT_NEVER.
Yes, makes sense, it's certainly simpler this way.
Acked-by: David Hildenbrand <david@...hat.com>
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists