Re: [PATCH v3 1/2] mm: Add an F_SEAL_FUTURE_WRITE seal to memfd

2018-10-22 Thread Joel Fernandes
On Wed, Oct 17, 2018 at 11:59:07PM -0700, Joel Fernandes (Google) wrote: > Android uses ashmem for sharing memory regions. We are looking forward > to migrating all usecases of ashmem to memfd so that we can possibly > remove the ashmem driver in the future from staging while also > benefiting from

Re: [PATCH v3 1/2] mm: Add an F_SEAL_FUTURE_WRITE seal to memfd

2018-10-19 Thread Joel Fernandes
On Fri, Oct 19, 2018 at 02:49:11PM -0400, valdis.kletni...@vt.edu wrote: > On Fri, 19 Oct 2018 10:57:31 -0700, Joel Fernandes said: > > On Fri, Oct 19, 2018 at 10:32 AM, wrote: > > > What is supposed to happen if some other process has an already existing > > > R/W > > > mmap of the region? (Fo

Re: [PATCH v3 1/2] mm: Add an F_SEAL_FUTURE_WRITE seal to memfd

2018-10-19 Thread valdis . kletnieks
On Fri, 19 Oct 2018 10:57:31 -0700, Joel Fernandes said: > On Fri, Oct 19, 2018 at 10:32 AM, wrote: > > What is supposed to happen if some other process has an already existing R/W > > mmap of the region? (For that matter, the test program doesn't seem to > > actually test that the existing mmap

Re: [PATCH v3 1/2] mm: Add an F_SEAL_FUTURE_WRITE seal to memfd

2018-10-19 Thread Joel Fernandes
On Fri, Oct 19, 2018 at 10:32 AM, wrote: > On Wed, 17 Oct 2018 23:59:07 -0700, "Joel Fernandes (Google)" said: >> This usecase cannot be implemented with the existing F_SEAL_WRITE seal. >> To support the usecase, this patch adds a new F_SEAL_FUTURE_WRITE seal >> which prevents any future mmap and

Re: [PATCH v3 1/2] mm: Add an F_SEAL_FUTURE_WRITE seal to memfd

2018-10-19 Thread valdis . kletnieks
On Wed, 17 Oct 2018 23:59:07 -0700, "Joel Fernandes (Google)" said: > This usecase cannot be implemented with the existing F_SEAL_WRITE seal. > To support the usecase, this patch adds a new F_SEAL_FUTURE_WRITE seal > which prevents any future mmap and write syscalls from succeeding while > keeping