* Re: net: Remove iocb argument from sendmsg and recvmsg [not found] <54FFAA5B.3080608@intel.com> @ 2015-03-11 3:18 ` Ying Xue 2015-03-11 3:25 ` Tadeusz Struk 2015-03-11 4:06 ` David Miller 2015-03-11 4:02 ` David Miller 1 sibling, 2 replies; 8+ messages in thread From: Ying Xue @ 2015-03-11 3:18 UTC (permalink / raw) To: Tadeusz Struk, David S. Miller, Herbert Xu Cc: Christoph Hellwig, Al Viro, netdev, Linux Crypto Mailing List Sorry, I did not realize the case when I created the commit. However, although I don't understand its scenario, in my opinion, adding one redundant argument for all sockets to satisfy the special case seems unreasonable for us. Regards, Ying On 03/11/2015 10:37 AM, Tadeusz Struk wrote: > Hi, > After couple of attempts to implement an user space interface to crypto HW that would meet our performance requirements, and after discussion with Herbert, we have come to conclusion that using AF_ALG sockets and AIO interface is the way to go. > Unfortunately it looks like AIO operations will no longer be supported on sockets because of the commit 1b784140474e4fc94281a49e96c67d29df0efbde. > My question is why do we want to abandon AIO support in the socket layer? Is it not worth keeping it for scenarios like this? > Do we have any alternative? > The mentioned patch attached for your reference. > Regards, > Tadeusz > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: net: Remove iocb argument from sendmsg and recvmsg 2015-03-11 3:18 ` net: Remove iocb argument from sendmsg and recvmsg Ying Xue @ 2015-03-11 3:25 ` Tadeusz Struk 2015-03-11 4:06 ` David Miller 2015-03-11 4:06 ` David Miller 1 sibling, 1 reply; 8+ messages in thread From: Tadeusz Struk @ 2015-03-11 3:25 UTC (permalink / raw) To: Ying Xue, David S. Miller, Herbert Xu Cc: Christoph Hellwig, Al Viro, netdev, Linux Crypto Mailing List On 03/10/2015 08:18 PM, Ying Xue wrote: > Sorry, I did not realize the case when I created the commit. However, although I > don't understand its scenario, in my opinion, adding one redundant argument for > all sockets to satisfy the special case seems unreasonable for us. In my opinion this is not about a single, special case, but rather about being able to support asynchronous operations on socket interface. It is important for AF_ALG since we have crypto HW accelerators, that people want to access from user space, but in the future there might be other use cases. Regards, Tadeusz ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: net: Remove iocb argument from sendmsg and recvmsg 2015-03-11 3:25 ` Tadeusz Struk @ 2015-03-11 4:06 ` David Miller 2015-03-11 4:39 ` Tadeusz Struk 0 siblings, 1 reply; 8+ messages in thread From: David Miller @ 2015-03-11 4:06 UTC (permalink / raw) To: tadeusz.struk; +Cc: ying.xue, herbert, hch, viro, netdev, linux-crypto From: Tadeusz Struk <tadeusz.struk@intel.com> Date: Tue, 10 Mar 2015 20:25:29 -0700 > In my opinion this is not about a single, special case, but rather > about being able to support asynchronous operations on socket > interface. Nobody used the socket AIO facility for two decades, it just rotted and turned out to be buggy and reference freed stack memory on top of that. I am absolutely not convinced this is the only way to solve your problem. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: net: Remove iocb argument from sendmsg and recvmsg 2015-03-11 4:06 ` David Miller @ 2015-03-11 4:39 ` Tadeusz Struk 0 siblings, 0 replies; 8+ messages in thread From: Tadeusz Struk @ 2015-03-11 4:39 UTC (permalink / raw) To: David Miller; +Cc: ying.xue, herbert, hch, viro, netdev, linux-crypto On 03/10/2015 09:06 PM, David Miller wrote: >> In my opinion this is not about a single, special case, but rather >> > about being able to support asynchronous operations on socket >> > interface. > Nobody used the socket AIO facility for two decades, it just > rotted and turned out to be buggy and reference freed stack > memory on top of that. > > I am absolutely not convinced this is the only way to solve your > problem. Do you have any suggestion? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: net: Remove iocb argument from sendmsg and recvmsg 2015-03-11 3:18 ` net: Remove iocb argument from sendmsg and recvmsg Ying Xue 2015-03-11 3:25 ` Tadeusz Struk @ 2015-03-11 4:06 ` David Miller 2015-03-11 16:25 ` Tadeusz Struk 1 sibling, 1 reply; 8+ messages in thread From: David Miller @ 2015-03-11 4:06 UTC (permalink / raw) To: ying.xue; +Cc: tadeusz.struk, herbert, hch, viro, netdev, linux-crypto From: Ying Xue <ying.xue@windriver.com> Date: Wed, 11 Mar 2015 11:18:01 +0800 > Sorry, I did not realize the case when I created the commit. However, although I > don't understand its scenario, in my opinion, adding one redundant argument for > all sockets to satisfy the special case seems unreasonable for us. And the AIO socket mechanism was buggy and references freed up stack objects. That whole set of problems would need to be addressed fully before we could even think of adding AIO support back to the socket layer. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: net: Remove iocb argument from sendmsg and recvmsg 2015-03-11 4:06 ` David Miller @ 2015-03-11 16:25 ` Tadeusz Struk 0 siblings, 0 replies; 8+ messages in thread From: Tadeusz Struk @ 2015-03-11 16:25 UTC (permalink / raw) To: David Miller, ying.xue; +Cc: herbert, hch, viro, netdev, linux-crypto On 03/10/2015 09:06 PM, David Miller wrote: > From: Ying Xue <ying.xue@windriver.com> > Date: Wed, 11 Mar 2015 11:18:01 +0800 > >> Sorry, I did not realize the case when I created the commit. However, although I >> don't understand its scenario, in my opinion, adding one redundant argument for >> all sockets to satisfy the special case seems unreasonable for us. > > And the AIO socket mechanism was buggy and references freed up stack > objects. > > That whole set of problems would need to be addressed fully before > we could even think of adding AIO support back to the socket layer. > Maybe we can add new sock_aio_read_iter() and sock_aio_write_iter() functions in socket.c, and set the aio_read() and aio_write() ptrs to these in the socket_file_ops struct. Then we can add new async_sendmsg() and async_recvmsg() to struct proto_ops that will still take the struct kiocb. These new async_sendmsg() and async_recvmsg() functions will be called from the sock_aio_read_iter() and sock_aio_write_iter()? Do you want me to put a patch together? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: net: Remove iocb argument from sendmsg and recvmsg [not found] <54FFAA5B.3080608@intel.com> 2015-03-11 3:18 ` net: Remove iocb argument from sendmsg and recvmsg Ying Xue @ 2015-03-11 4:02 ` David Miller 2015-03-11 16:09 ` Tadeusz Struk 1 sibling, 1 reply; 8+ messages in thread From: David Miller @ 2015-03-11 4:02 UTC (permalink / raw) To: tadeusz.struk; +Cc: ying.xue, herbert, hch, viro, netdev, linux-crypto Because of the way you quoted the patch, it looked like a list posting looping back to the list again, because of the "List-ID: " email header. Therefore your posting was blocked and you'll have to resend your posting in a way such that this doesn't happen. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: net: Remove iocb argument from sendmsg and recvmsg 2015-03-11 4:02 ` David Miller @ 2015-03-11 16:09 ` Tadeusz Struk 0 siblings, 0 replies; 8+ messages in thread From: Tadeusz Struk @ 2015-03-11 16:09 UTC (permalink / raw) To: David Miller; +Cc: ying.xue, herbert, hch, viro, netdev, linux-crypto On 03/10/2015 09:02 PM, David Miller wrote: > > Because of the way you quoted the patch, it looked like a list posting > looping back to the list again, because of the "List-ID: " email header. > > Therefore your posting was blocked and you'll have to resend your posting > in a way such that this doesn't happen. > Oops, sorry, here it is. Hi, After couple of attempts to implement an user space interface to crypto HW that would meet our performance requirements, and after discussion with Herbert, we have come to conclusion that using AF_ALG sockets and AIO interface is the way to go. Unfortunately it looks like AIO operations will no longer be supported on sockets because of the commit 1b784140474e4fc94281a49e96c67d29df0efbde. My question is why do we want to abandon AIO support in the socket layer? Is it not worth keeping it for scenarios like this? Do we have any alternative? Here is the mentioned patch. https://patchwork.kernel.org/patch/5971491/ Regards, Tadeusz ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-03-11 16:28 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <54FFAA5B.3080608@intel.com> 2015-03-11 3:18 ` net: Remove iocb argument from sendmsg and recvmsg Ying Xue 2015-03-11 3:25 ` Tadeusz Struk 2015-03-11 4:06 ` David Miller 2015-03-11 4:39 ` Tadeusz Struk 2015-03-11 4:06 ` David Miller 2015-03-11 16:25 ` Tadeusz Struk 2015-03-11 4:02 ` David Miller 2015-03-11 16:09 ` Tadeusz Struk
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.