Re: Significance of MALLOC_OPTIONS=G

2023-09-28 Thread Masato Asou
From: Otto Moerbeek Date: Fri, 29 Sep 2023 07:36:08 +0200 > In this caseof a single malloc call you'll get a page that is followed > by unmapped memory as the kernel does that. In general, that may not > happen though, depending on what happended previously (i.e. contents > of the caches used by

Re: Significance of MALLOC_OPTIONS=G

2023-09-28 Thread Otto Moerbeek
On Fri, Sep 29, 2023 at 12:11:51PM +0900, Masato Asou wrote: > I am investigating what problems can bt detected with MALLOC_OPTIONS. > SEGV occurs even if MALLOC_OPTIONS=G is not specified. Normally, the > areas allocated by malloc() are not contiguous. However, after many > malloc() operations

Re: Significance of MALLOC_OPTIONS=G

2023-09-28 Thread Masato Asou
From: "Theo de Raadt" Date: Thu, 28 Sep 2023 21:43:47 -0600 > Our kernel also has the concept of guard-pages, meaning it will try to > keep a gap of 1 page between mmap() allocations. I didn't know about guard-pages feature. > The way it is coded, it isn't perfect, but it tends to work and > ca

Re: Significance of MALLOC_OPTIONS=G

2023-09-28 Thread Theo de Raadt
Our kernel also has the concept of guard-pages, meaning it will try to keep a gap of 1 page between mmap() allocations. The way it is coded, it isn't perfect, but it tends to work and catch some issues.

Significance of MALLOC_OPTIONS=G

2023-09-28 Thread Masato Asou
I am investigating what problems can bt detected with MALLOC_OPTIONS. SEGV occurs even if MALLOC_OPTIONS=G is not specified. Normally, the areas allocated by malloc() are not contiguous. However, after many malloc() operations and not free() these areas, contiguous areas may be allocated. I gues