Re: [PATCH v1 1/4] [RFC] fs/trampfd: Implement the trampoline file descriptor API

2020-07-28 Thread Oleg Nesterov
On 07/28, Madhavan T. Venkataraman wrote: > > I guess since the symbol is not used by any modules, I don't need to > export it. Yes, Oleg.

Re: [PATCH v1 1/4] [RFC] fs/trampfd: Implement the trampoline file descriptor API

2020-07-28 Thread Madhavan T. Venkataraman
Thanks. See inline.. On 7/28/20 9:50 AM, Oleg Nesterov wrote: > On 07/28, madve...@linux.microsoft.com wrote: >> +bool is_trampfd_vma(struct vm_area_struct *vma) >> +{ >> +struct file *file = vma->vm_file; >> + >> +if (!file) >> +return false; >> +return !strcmp(file->f

Re: [PATCH v1 1/4] [RFC] fs/trampfd: Implement the trampoline file descriptor API

2020-07-28 Thread Oleg Nesterov
On 07/28, madve...@linux.microsoft.com wrote: > > +bool is_trampfd_vma(struct vm_area_struct *vma) > +{ > + struct file *file = vma->vm_file; > + > + if (!file) > + return false; > + return !strcmp(file->f_path.dentry->d_name.name, trampfd_name); Hmm, this looks obvious

[PATCH v1 1/4] [RFC] fs/trampfd: Implement the trampoline file descriptor API

2020-07-28 Thread madvenka
From: "Madhavan T. Venkataraman" There are many applications that use trampoline code. Trampoline code is usually placed in a data page or a stack page. In order to execute a trampoline, the page that contains the trampoline needs to have execute permissions. Writable pages with execute permissi