Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor

2020-07-31 Thread Madhavan T. Venkataraman
Thanks for the comments. I will respond to these and your next email on Monday. Madhavan On 7/31/20 1:09 PM, Mark Rutland wrote: > Hi, > > On Tue, Jul 28, 2020 at 08:10:46AM -0500, madve...@linux.microsoft.com wrote: >> From: "Madhavan T. Venkataraman" >> T

Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor

2020-07-31 Thread Madhavan T. Venkataraman
On 7/30/20 3:54 PM, Andy Lutomirski wrote: > On Thu, Jul 30, 2020 at 7:24 AM Madhavan T. Venkataraman > wrote: >> ... >> Creating a code page >> >> >> We can do this in one of the following ways: >> >> - Allocate a wr

Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor

2020-07-30 Thread Madhavan T. Venkataraman
will respond to the others in separate emails if that is alright with you. On 7/28/20 12:31 PM, Andy Lutomirski wrote: >> On Jul 28, 2020, at 6:11 AM, madve...@linux.microsoft.com wrote: >> >> From: "Madhavan T. Venkataraman" >> >> The kernel creates the trampoli

Re: [PATCH v1 2/4] [RFC] x86/trampfd: Provide support for the trampoline file descriptor

2020-07-30 Thread Madhavan T. Venkataraman
Yes. I will fix this. Thanks. Madhavan On 7/30/20 4:06 AM, Greg KH wrote: > On Tue, Jul 28, 2020 at 08:10:48AM -0500, madve...@linux.microsoft.com wrote: >> +EXPORT_SYMBOL_GPL(trampfd_valid_regs); > Why are all of these exported? I don't see a module user in this > series, or did I miss it

Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor

2020-07-29 Thread Madhavan T. Venkataraman
On 7/29/20 3:36 AM, David Laight wrote: > From: Madhavan T. Venkataraman >> Sent: 28 July 2020 19:52 > ... >> trampfd faults are instruction faults that go through a different code path >> than >> the one that calls handle_mm_fault(). Perhaps, it is the handle_

Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor

2020-07-28 Thread Madhavan T. Venkataraman
I am working on a response to this. I will send it soon. Thanks. Madhavan On 7/28/20 12:31 PM, Andy Lutomirski wrote: >> On Jul 28, 2020, at 6:11 AM, madve...@linux.microsoft.com wrote: >> >> From: "Madhavan T. Venkataraman" >> >> The kernel cr

Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor

2020-07-28 Thread Madhavan T. Venkataraman
On 7/28/20 12:16 PM, Andy Lutomirski wrote: > On Tue, Jul 28, 2020 at 9:32 AM Madhavan T. Venkataraman > wrote: >> Thanks. See inline.. >> >> On 7/28/20 10:13 AM, David Laight wrote: >>> From: madve...@linux.microsoft.com >>>> Sent: 28 Ju

Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor

2020-07-28 Thread Madhavan T. Venkataraman
On 7/28/20 12:05 PM, James Morris wrote: > On Tue, 28 Jul 2020, Casey Schaufler wrote: > >> You could make a separate LSM to do these checks instead of limiting >> it to SELinux. Your use case, your call, of course. > It's not limited to SELinux. This is hooked via the LSM API and >

Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor

2020-07-28 Thread Madhavan T. Venkataraman
Thanks. On 7/28/20 11:05 AM, Casey Schaufler wrote: >> In this solution, the kernel recognizes certain sequences of instructions >> as "well-known" trampolines. When such a trampoline is executed, a page >> fault happens because the trampoline page does not have execute permission. >> The kernel

Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor

2020-07-28 Thread Madhavan T. Venkataraman
Thanks. See inline.. On 7/28/20 10:13 AM, David Laight wrote: > From: madve...@linux.microsoft.com >> Sent: 28 July 2020 14:11 > ... >> The kernel creates the trampoline mapping without any permissions. When >> the trampoline is executed by user code, a page fault happens and the >> kernel gets

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

<    1   2