Re: [PATCH v8 4/9] mm: introduce memfd_secret system call to create "secret" memory areas

2020-11-15 Thread Mike Rapoport
On Fri, Nov 13, 2020 at 02:06:56PM +, Matthew Wilcox wrote: > On Tue, Nov 10, 2020 at 05:14:39PM +0200, Mike Rapoport wrote: > > diff --git a/mm/Kconfig b/mm/Kconfig > > index c89c5444924b..d8d170fa5210 100644 > > --- a/mm/Kconfig > > +++ b/mm/Kconfig > > @@ -884,4 +884,7 @@ config

Re: [PATCH v8 4/9] mm: introduce memfd_secret system call to create "secret" memory areas

2020-11-15 Thread Mike Rapoport
On Fri, Nov 13, 2020 at 01:58:48PM +, Matthew Wilcox wrote: > On Tue, Nov 10, 2020 at 05:14:39PM +0200, Mike Rapoport wrote: > > +static vm_fault_t secretmem_fault(struct vm_fault *vmf) > > +{ > > + struct address_space *mapping = vmf->vma->vm_file->f_mapping; > > + struct inode *inode =

Re: [PATCH v8 4/9] mm: introduce memfd_secret system call to create "secret" memory areas

2020-11-13 Thread Matthew Wilcox
On Tue, Nov 10, 2020 at 05:14:39PM +0200, Mike Rapoport wrote: > diff --git a/mm/Kconfig b/mm/Kconfig > index c89c5444924b..d8d170fa5210 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -884,4 +884,7 @@ config ARCH_HAS_HUGEPD > config MAPPING_DIRTY_HELPERS > bool > > +config SECRETMEM

Re: [PATCH v8 4/9] mm: introduce memfd_secret system call to create "secret" memory areas

2020-11-13 Thread Matthew Wilcox
On Tue, Nov 10, 2020 at 05:14:39PM +0200, Mike Rapoport wrote: > +static vm_fault_t secretmem_fault(struct vm_fault *vmf) > +{ > + struct address_space *mapping = vmf->vma->vm_file->f_mapping; > + struct inode *inode = file_inode(vmf->vma->vm_file); > + pgoff_t offset = vmf->pgoff; > +

[PATCH v8 4/9] mm: introduce memfd_secret system call to create "secret" memory areas

2020-11-10 Thread Mike Rapoport
From: Mike Rapoport Introduce "memfd_secret" system call with the ability to create memory areas visible only in the context of the owning process and not mapped not only to other processes but in the kernel page tables as well. The user will create a file descriptor using the memfd_secret()