Desirable this (2.41) release?

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Thu Dec 19 16:17:55 GMT 2024



On 08/12/24 19:52, Cristian Rodríguez wrote:
> On Sun, Dec 8, 2024 at 6:31 PM Andreas K. Huettel <dilfridge@gentoo.org> wrote:
>>
>> Since the holidays and new year are somewhat in the way, let me
>> ask this question rather early...
>>
>> https://sourceware.org/glibc/wiki/Release/2.41#Desirable_this_release.3F
>>
>> I updated the old "desirable" items listed on the wiki page.
>> What else should still go into upcoming 2.41 (that is not in master yet)?
>>
>>
> 
> Support for lightweight guard pages on Linux
> madvise(..MADV_GUARD_INSTALL) _everywhere_ where there is already a
> guard page.. and reconsider adding it in more cases.

Since we don't have already a patch to enable this feature, I think this
is unlikely to get it for 2.41.

For glibc it seems that we can potentially use at least on pthread stack
allocation.  It would require some minimal support to handle old kernels 
(mainly to avoid keeping issue the syscall where kernel does not support it),
but at least the interface semantic seems to fit the current pthread guarding
setup where libc just need to issue madvise (MADV_GUARD_INSTALL) (it it succeeds,
kernel will unmap the region and setup the guard page).

For heap management I am not sure if it fits, since current the grow_heap
code will just to try mmap (PROT_READ | PROT_WRITE) on a reserved range with 
a new range.

Unfortunately MADV_GUARD_INSTALL only supports anonymous memory, so we can't 
really leverage it on _dl_map_segments. And _dl_map_segment already unmap
the unused regions.  


More information about the Libc-alpha mailing list