All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Shuah Khan" <shuah@kernel.org>, "Dev Jain" <dev.jain@arm.com>,
	"Thomas Gleixner" <tglx@linutronix.de>
Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/4] selftests/mm: virtual_address_range: Unmap chunks after validation
Date: Tue, 14 Jan 2025 14:11:58 +0100	[thread overview]
Message-ID: <059fcb77-7eea-4e3d-9b70-d88975388d9b@redhat.com> (raw)
In-Reply-To: <20250113-virtual_address_range-tests-v3-2-f4a8e6b7feed@linutronix.de>

On 13.01.25 14:15, Thomas Weißschuh wrote:
> For each accessed chunk a PTE is created.
> More than 1GiB of PTEs is used in this way.
> Remove each PTE after validating a chunk to reduce peak memory usage.
> 
> It is important to only unmap memory that previously mmap()ed,
> as unmapping other mappings like the stack, heap or executable mappings
> will crash the process.
> The mappings read from /proc/self/maps and the return values from mmap()
> don't allow a simple correlation due to merging and no guaranteed order.
> To correlate the pointers and mappings use prctl(PR_SET_VMA_ANON_NAME).
> While it introduces a test dependency, other alternatives would
> introduce runtime or development overhead.
> 
> Fixes: 010409649885 ("selftests/mm: confirm VA exhaustion without reliance on correctness of mmap()")
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---

Acked-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb


  reply	other threads:[~2025-01-14 13:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-13 13:15 [PATCH v3 0/4] selftests/mm: virtual_address_range: Reduce memory usage and avoid VM_IO access Thomas Weißschuh
2025-01-13 13:15 ` [PATCH v3 1/4] selftests/mm: virtual_address_range: mmap() without PROT_WRITE Thomas Weißschuh
2025-01-13 15:46   ` Dev Jain
2025-01-13 13:15 ` [PATCH v3 2/4] selftests/mm: virtual_address_range: Unmap chunks after validation Thomas Weißschuh
2025-01-14 13:11   ` David Hildenbrand [this message]
2025-01-13 13:15 ` [PATCH v3 3/4] selftests/mm: vm_util: Split up /proc/self/smaps parsing Thomas Weißschuh
2025-01-14 10:01   ` David Hildenbrand
2025-01-13 13:15 ` [PATCH v3 4/4] selftests/mm: virtual_address_range: Avoid reading from VM_IO mappings Thomas Weißschuh
2025-01-14  1:25   ` Andrew Morton
2025-01-14 10:15   ` David Hildenbrand

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=059fcb77-7eea-4e3d-9b70-d88975388d9b@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dev.jain@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thomas.weissschuh@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.