Re: [PATCH 1/3] selftests/mm: virtual_address_range: Fix error when CommitLimit < 1GiB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09.01.25 14:05, David Hildenbrand wrote:
  >
That is clear. The issue would be to figure which chunks are valid to
unmap. If something critical like the executable file is unmapped,
the process crashes. But see below.

Ah, now I see what you mean. Yes, also the stack etc. will be
problematic. So IIUC, you want to limit the munmap optimization only to
the manually mmap()ed parts.


Is it fine to rely on CONFIG_ANON_VMA_NAME?
That would make it much easier to implement.

Can you elaborate how you would do it?

First set the VMA name after mmap():

I took a look at the implementation, and VMA merging seems to be able to merge such VMAs that share the same name (even when set separately).

So assuming you use the same name for all, that should indeed also work.

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux