Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-12-08 Thread Jarkko Sakkinen
On Thu, Dec 07, 2017 at 07:37:38PM +0200, Jarkko Sakkinen wrote: > I think I could replace pipes with anonymous inodes. Is that a better > idea than pipes? I can work on that v8 if the export is a show stopper > as it seems. We are using that to do some other stuff in tpm_vtpm_proxy. I'll go with

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-12-08 Thread Jarkko Sakkinen
On Thu, Dec 07, 2017 at 07:37:38PM +0200, Jarkko Sakkinen wrote: > I think I could replace pipes with anonymous inodes. Is that a better > idea than pipes? I can work on that v8 if the export is a show stopper > as it seems. We are using that to do some other stuff in tpm_vtpm_proxy. I'll go with

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-12-07 Thread Jarkko Sakkinen
On Mon, Dec 04, 2017 at 11:00:59AM +0200, Jarkko Sakkinen wrote: > On Thu, Nov 30, 2017 at 10:38:30AM -0800, James Bottomley wrote: > > On Thu, 2017-11-30 at 18:43 +0200, Jarkko Sakkinen wrote: > > > On Wed, Nov 29, 2017 at 03:13:57PM -0800, Christoph Hellwig wrote: > > > > > > > > On Tue, Nov

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-12-07 Thread Jarkko Sakkinen
On Mon, Dec 04, 2017 at 11:00:59AM +0200, Jarkko Sakkinen wrote: > On Thu, Nov 30, 2017 at 10:38:30AM -0800, James Bottomley wrote: > > On Thu, 2017-11-30 at 18:43 +0200, Jarkko Sakkinen wrote: > > > On Wed, Nov 29, 2017 at 03:13:57PM -0800, Christoph Hellwig wrote: > > > > > > > > On Tue, Nov

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-12-04 Thread Jarkko Sakkinen
On Thu, Nov 30, 2017 at 10:38:30AM -0800, James Bottomley wrote: > On Thu, 2017-11-30 at 18:43 +0200, Jarkko Sakkinen wrote: > > On Wed, Nov 29, 2017 at 03:13:57PM -0800, Christoph Hellwig wrote: > > > > > > On Tue, Nov 28, 2017 at 11:57:53PM +0200, Jarkko Sakkinen wrote: > > > > > > > > > > >

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-12-04 Thread Jarkko Sakkinen
On Thu, Nov 30, 2017 at 10:38:30AM -0800, James Bottomley wrote: > On Thu, 2017-11-30 at 18:43 +0200, Jarkko Sakkinen wrote: > > On Wed, Nov 29, 2017 at 03:13:57PM -0800, Christoph Hellwig wrote: > > > > > > On Tue, Nov 28, 2017 at 11:57:53PM +0200, Jarkko Sakkinen wrote: > > > > > > > > > > >

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-30 Thread James Bottomley
On Thu, 2017-11-30 at 18:43 +0200, Jarkko Sakkinen wrote: > On Wed, Nov 29, 2017 at 03:13:57PM -0800, Christoph Hellwig wrote: > > > > On Tue, Nov 28, 2017 at 11:57:53PM +0200, Jarkko Sakkinen wrote: > > > > > > > > > > > Yes.  You still shall not play nasty games with file > > > > descriptors.

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-30 Thread James Bottomley
On Thu, 2017-11-30 at 18:43 +0200, Jarkko Sakkinen wrote: > On Wed, Nov 29, 2017 at 03:13:57PM -0800, Christoph Hellwig wrote: > > > > On Tue, Nov 28, 2017 at 11:57:53PM +0200, Jarkko Sakkinen wrote: > > > > > > > > > > > Yes.  You still shall not play nasty games with file > > > > descriptors.

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-30 Thread Jarkko Sakkinen
On Wed, Nov 29, 2017 at 03:13:57PM -0800, Christoph Hellwig wrote: > On Tue, Nov 28, 2017 at 11:57:53PM +0200, Jarkko Sakkinen wrote: > > > Yes. You still shall not play nasty games with file descriptors. > > > > I need to put something to file descriptors in order to have a IO > > channels for

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-30 Thread Jarkko Sakkinen
On Wed, Nov 29, 2017 at 03:13:57PM -0800, Christoph Hellwig wrote: > On Tue, Nov 28, 2017 at 11:57:53PM +0200, Jarkko Sakkinen wrote: > > > Yes. You still shall not play nasty games with file descriptors. > > > > I need to put something to file descriptors in order to have a IO > > channels for

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-29 Thread Christoph Hellwig
On Tue, Nov 28, 2017 at 11:57:53PM +0200, Jarkko Sakkinen wrote: > > Yes. You still shall not play nasty games with file descriptors. > > I need to put something to file descriptors in order to have a IO > channels for the launch enclave hosting process. Just do it like any other program - open

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-29 Thread Christoph Hellwig
On Tue, Nov 28, 2017 at 11:57:53PM +0200, Jarkko Sakkinen wrote: > > Yes. You still shall not play nasty games with file descriptors. > > I need to put something to file descriptors in order to have a IO > channels for the launch enclave hosting process. Just do it like any other program - open

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 01:05:51PM -0800, Christoph Hellwig wrote: > On Tue, Nov 28, 2017 at 10:42:20PM +0200, Jarkko Sakkinen wrote: > > On Tue, Nov 28, 2017 at 06:35:04AM -0800, Christoph Hellwig wrote: > > > Repeated NAK - any interface that deals with raw file descriptor table > > > entries

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 01:05:51PM -0800, Christoph Hellwig wrote: > On Tue, Nov 28, 2017 at 10:42:20PM +0200, Jarkko Sakkinen wrote: > > On Tue, Nov 28, 2017 at 06:35:04AM -0800, Christoph Hellwig wrote: > > > Repeated NAK - any interface that deals with raw file descriptor table > > > entries

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-28 Thread Christoph Hellwig
On Tue, Nov 28, 2017 at 10:42:20PM +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 06:35:04AM -0800, Christoph Hellwig wrote: > > Repeated NAK - any interface that deals with raw file descriptor table > > entries has absolutely no business in a driver. > > > > Please fix your API already.

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-28 Thread Christoph Hellwig
On Tue, Nov 28, 2017 at 10:42:20PM +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 06:35:04AM -0800, Christoph Hellwig wrote: > > Repeated NAK - any interface that deals with raw file descriptor table > > entries has absolutely no business in a driver. > > > > Please fix your API already.

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 06:35:04AM -0800, Christoph Hellwig wrote: > Repeated NAK - any interface that deals with raw file descriptor table > entries has absolutely no business in a driver. > > Please fix your API already. Does it make a differnece if the code is moved to arch/x86, which could

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 06:35:04AM -0800, Christoph Hellwig wrote: > Repeated NAK - any interface that deals with raw file descriptor table > entries has absolutely no business in a driver. > > Please fix your API already. Does it make a differnece if the code is moved to arch/x86, which could

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-28 Thread Christoph Hellwig
Repeated NAK - any interface that deals with raw file descriptor table entries has absolutely no business in a driver. Please fix your API already.

Re: [PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-28 Thread Christoph Hellwig
Repeated NAK - any interface that deals with raw file descriptor table entries has absolutely no business in a driver. Please fix your API already.

[PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-25 Thread Jarkko Sakkinen
Exported create_pipe_files() and replace_fd() because the SGX driver needs to be able to setup pipes in order to communicate with the helper process that hosts the Launch Enclave (LE). The pipe creation will be done in the init-callback supplied to call_usermodehelper_setup(). The driver will use

[PATCH v6 09/11] fs/pipe.c: export create_pipe_files() and replace_fd()

2017-11-25 Thread Jarkko Sakkinen
Exported create_pipe_files() and replace_fd() because the SGX driver needs to be able to setup pipes in order to communicate with the helper process that hosts the Launch Enclave (LE). The pipe creation will be done in the init-callback supplied to call_usermodehelper_setup(). The driver will use