Re: malloc: prep for immutable pages

2022-10-06 Thread Theo de Raadt
Marc Espie wrote: > On Wed, Oct 05, 2022 at 07:54:41AM -0600, Theo de Raadt wrote: > > Marc Espie wrote: > > > > > On Tue, Oct 04, 2022 at 10:15:51AM -0600, Theo de Raadt wrote: > > > > A note on why this chance is coming. > > > > > > > > malloc.c (as it is today), does mprotects back and

Re: malloc: prep for immutable pages

2022-10-06 Thread Marc Espie
On Wed, Oct 05, 2022 at 07:54:41AM -0600, Theo de Raadt wrote: > Marc Espie wrote: > > > On Tue, Oct 04, 2022 at 10:15:51AM -0600, Theo de Raadt wrote: > > > A note on why this chance is coming. > > > > > > malloc.c (as it is today), does mprotects back and forth between RW and > > > R, to

Re: malloc: prep for immutable pages

2022-10-05 Thread Theo de Raadt
Marc Espie wrote: > On Tue, Oct 04, 2022 at 10:15:51AM -0600, Theo de Raadt wrote: > > A note on why this chance is coming. > > > > malloc.c (as it is today), does mprotects back and forth between RW and > > R, to protect an internal object. This object is in bss, it is not > > allocated with

Re: malloc: prep for immutable pages

2022-10-05 Thread Otto Moerbeek
On Wed, Oct 05, 2022 at 02:47:19PM +0200, Marc Espie wrote: > On Tue, Oct 04, 2022 at 10:15:51AM -0600, Theo de Raadt wrote: > > A note on why this chance is coming. > > > > malloc.c (as it is today), does mprotects back and forth between RW and > > R, to protect an internal object. This object

Re: malloc: prep for immutable pages

2022-10-05 Thread Marc Espie
On Tue, Oct 04, 2022 at 10:15:51AM -0600, Theo de Raadt wrote: > A note on why this chance is coming. > > malloc.c (as it is today), does mprotects back and forth between RW and > R, to protect an internal object. This object is in bss, it is not > allocated with mmap. With the upcoming

Re: malloc: prep for immutable pages

2022-10-04 Thread Theo de Raadt
A note on why this chance is coming. malloc.c (as it is today), does mprotects back and forth between RW and R, to protect an internal object. This object is in bss, it is not allocated with mmap. With the upcoming mimmutable change, the bss will become immutable by default, at program load

malloc: prep for immutable pages

2022-09-29 Thread Otto Moerbeek
Hi, Rearrange things so that we do not have to flip protection of r/o pages back and forth when swicthing from single-threaded to multi-threaded. Also saves work in many cases by not initing pools until they are used: the pool used for MAP_CONCEAL pages is not used by very many processes and if