Re: [PATCH v7 2/4] mseal: add mseal syscall

2024-01-24 Thread Jeff Xu
On Wed, Jan 24, 2024 at 2:49 PM Jeff Xu wrote: > > On Wed, Jan 24, 2024 at 12:06 PM Liam R. Howlett > wrote: > > > > > Considering this is the MAP_FIXED case, and maybe that is not used > > > that often in practice, I think this is acceptable performance-wise, > > > unless you know another soluti

Re: [PATCH v7 2/4] mseal: add mseal syscall

2024-01-24 Thread Jeff Xu
On Wed, Jan 24, 2024 at 12:06 PM Liam R. Howlett wrote: > > * Jeff Xu [240124 12:50]: > > On Tue, Jan 23, 2024 at 10:15 AM Liam R. Howlett > > wrote: > > > > > > * jef...@chromium.org [240122 10:29]: > > > > From: Jeff Xu > > > > > > > > The new mseal() is an syscall on 64 bit CPU, and with >

Re: [PATCH v7 2/4] mseal: add mseal syscall

2024-01-24 Thread Theo de Raadt
Theo de Raadt wrote: > This discussion about the malloc heap is ridiculous. Obviously it is > programmer error to lock the permissions on memory you will free for > reuse. But you can't fix this problem with malloc(), without breaking > other extremely common circumstances where the allocation

Re: [PATCH v7 2/4] mseal: add mseal syscall

2024-01-24 Thread Theo de Raadt
Liam R. Howlett wrote: > > Adding mseal() into picture, however, the heap is then sealed > > partially, user can still free it, but the memory remains to be RO, > > and the result of brk-shrink is nondeterministic, depending on if > > munmap() will try to free the sealed memory.(brk uses munmap t

Re: [PATCH v7 2/4] mseal: add mseal syscall

2024-01-24 Thread Liam R. Howlett
* Jeff Xu [240124 12:50]: > On Tue, Jan 23, 2024 at 10:15 AM Liam R. Howlett > wrote: > > > > * jef...@chromium.org [240122 10:29]: > > > From: Jeff Xu > > > > > > The new mseal() is an syscall on 64 bit CPU, and with > > > following signature: > > > > > > int mseal(void addr, size_t len, unsig

Re: [PATCH v7 2/4] mseal: add mseal syscall

2024-01-24 Thread Jeff Xu
On Tue, Jan 23, 2024 at 10:15 AM Liam R. Howlett wrote: > > * jef...@chromium.org [240122 10:29]: > > From: Jeff Xu > > > > The new mseal() is an syscall on 64 bit CPU, and with > > following signature: > > > > int mseal(void addr, size_t len, unsigned long flags) > > addr/len: memory range. > >

Re: [PATCH v7 2/4] mseal: add mseal syscall

2024-01-23 Thread Liam R. Howlett
* jef...@chromium.org [240122 10:29]: > From: Jeff Xu > > The new mseal() is an syscall on 64 bit CPU, and with > following signature: > > int mseal(void addr, size_t len, unsigned long flags) > addr/len: memory range. > flags: reserved. > > mseal() blocks following operations for the given me

[PATCH v7 2/4] mseal: add mseal syscall

2024-01-22 Thread jeffxu
From: Jeff Xu The new mseal() is an syscall on 64 bit CPU, and with following signature: int mseal(void addr, size_t len, unsigned long flags) addr/len: memory range. flags: reserved. mseal() blocks following operations for the given memory range. 1> Unmapping, moving to another location, and