From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gilad Ben-Yossef Subject: Re: [PATCH v7 00/19] simplify crypto wait for async op Date: Tue, 5 Sep 2017 15:16:57 +0300 Message-ID: References: <1503584350-7831-1-git-send-email-gilad@benyossef.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Herbert Xu , "David S. Miller" , Jonathan Corbet , David Howells , Tom Lendacky , Gary Hook , Boris Brezillon , Arnaud Ebalard , Matthias Brugger , Alasdair Kergon , Mike Snitzer , device-mapper development , Shaohua Li , Steve French , "Theodore Y. Ts'o" , Jaegeuk Kim , Mimi Zohar , Dmitry Kasatkin , James Morris , "Serge E. Hallyn To: Harsh Jain Return-path: In-Reply-To: Sender: owner-linux-security-module@vger.kernel.org List-Id: linux-crypto.vger.kernel.org On Tue, Sep 5, 2017 at 2:23 PM, Harsh Jain wrote: > On Sun, Sep 3, 2017 at 11:47 AM, Gilad Ben-Yossef wrote: >> On Thu, Aug 31, 2017 at 3:31 PM, Harsh Jain wrote: >>> HI Gilad, >>> >>> I think we need an update in ESP also. Now EBUSY return means driver >>> has accepted, Packet should not be dropped in >>> >>> esp_output_tail() function. >> >> Good catch. You are right and the same holds true for ah_output() in ah4.c. >> >> But I do wonder, the code there now treats -EBUSY as a special case >> and returns NET_XMIT_DROP >> but if an AEAD or AHASH transformation return some other error, like >> -ENOMEM or -EINVAL shouldn't >> we return NET_XMIT_DROP in that case too? > I think we should not, XMIT_DROP implies drop current packet only, > later on when device is recovered from busy state, Upper layer > protocol(TCP) will re-transmit the packet. It helps in flow control. >> I see. Makes sense. Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: References: <1503584350-7831-1-git-send-email-gilad@benyossef.com> From: Gilad Ben-Yossef Date: Tue, 5 Sep 2017 15:16:57 +0300 Message-ID: Subject: Re: [PATCH v7 00/19] simplify crypto wait for async op Content-Type: text/plain; charset="UTF-8" Sender: keyrings-owner@vger.kernel.org To: Harsh Jain Cc: Herbert Xu , "David S. Miller" , Jonathan Corbet , David Howells , Tom Lendacky , Gary Hook , Boris Brezillon , Arnaud Ebalard , Matthias Brugger , Alasdair Kergon , Mike Snitzer , device-mapper development , Shaohua Li , Steve French , "Theodore Y. Ts'o" , Jaegeuk Kim , Mimi Zohar , Dmitry Kasatkin , James Morris , "Serge E. Hallyn" , Linux Crypto Mailing List , linux-doc@vger.kernel.org, Linux kernel mailing list , keyrings@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-raid@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-fscrypt@vger.kernel.org, linux-ima-devel@lists.sourceforge.net, linux-ima-user@lists.sourceforge.net, linux-security-module@vger.kernel.org, Ofir Drang List-ID: On Tue, Sep 5, 2017 at 2:23 PM, Harsh Jain wrote: > On Sun, Sep 3, 2017 at 11:47 AM, Gilad Ben-Yossef wrote: >> On Thu, Aug 31, 2017 at 3:31 PM, Harsh Jain wrote: >>> HI Gilad, >>> >>> I think we need an update in ESP also. Now EBUSY return means driver >>> has accepted, Packet should not be dropped in >>> >>> esp_output_tail() function. >> >> Good catch. You are right and the same holds true for ah_output() in ah4.c. >> >> But I do wonder, the code there now treats -EBUSY as a special case >> and returns NET_XMIT_DROP >> but if an AEAD or AHASH transformation return some other error, like >> -ENOMEM or -EINVAL shouldn't >> we return NET_XMIT_DROP in that case too? > I think we should not, XMIT_DROP implies drop current packet only, > later on when device is recovered from busy state, Upper layer > protocol(TCP) will re-transmit the packet. It helps in flow control. >> I see. Makes sense. Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gilad Ben-Yossef Date: Tue, 05 Sep 2017 12:16:57 +0000 Subject: Re: [PATCH v7 00/19] simplify crypto wait for async op Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit List-Id: References: <1503584350-7831-1-git-send-email-gilad@benyossef.com> In-Reply-To: To: Harsh Jain Cc: Herbert Xu , "David S. Miller" , Jonathan Corbet , David Howells , Tom Lendacky , Gary Hook , Boris Brezillon , Arnaud Ebalard , Matthias Brugger , Alasdair Kergon , Mike Snitzer , device-mapper development , Shaohua Li , Steve French , "Theodore Y. Ts'o" , Jaegeuk Kim , Mimi Zohar , Dmitry Kasatkin , James Morris , Serge On Tue, Sep 5, 2017 at 2:23 PM, Harsh Jain wrote: > On Sun, Sep 3, 2017 at 11:47 AM, Gilad Ben-Yossef wrote: >> On Thu, Aug 31, 2017 at 3:31 PM, Harsh Jain wrote: >>> HI Gilad, >>> >>> I think we need an update in ESP also. Now EBUSY return means driver >>> has accepted, Packet should not be dropped in >>> >>> esp_output_tail() function. >> >> Good catch. You are right and the same holds true for ah_output() in ah4.c. >> >> But I do wonder, the code there now treats -EBUSY as a special case >> and returns NET_XMIT_DROP >> but if an AEAD or AHASH transformation return some other error, like >> -ENOMEM or -EINVAL shouldn't >> we return NET_XMIT_DROP in that case too? > I think we should not, XMIT_DROP implies drop current packet only, > later on when device is recovered from busy state, Upper layer > protocol(TCP) will re-transmit the packet. It helps in flow control. >> I see. Makes sense. Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru From mboxrd@z Thu Jan 1 00:00:00 1970 From: gilad@benyossef.com (Gilad Ben-Yossef) Date: Tue, 5 Sep 2017 15:16:57 +0300 Subject: [PATCH v7 00/19] simplify crypto wait for async op In-Reply-To: References: <1503584350-7831-1-git-send-email-gilad@benyossef.com> Message-ID: To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org On Tue, Sep 5, 2017 at 2:23 PM, Harsh Jain wrote: > On Sun, Sep 3, 2017 at 11:47 AM, Gilad Ben-Yossef wrote: >> On Thu, Aug 31, 2017 at 3:31 PM, Harsh Jain wrote: >>> HI Gilad, >>> >>> I think we need an update in ESP also. Now EBUSY return means driver >>> has accepted, Packet should not be dropped in >>> >>> esp_output_tail() function. >> >> Good catch. You are right and the same holds true for ah_output() in ah4.c. >> >> But I do wonder, the code there now treats -EBUSY as a special case >> and returns NET_XMIT_DROP >> but if an AEAD or AHASH transformation return some other error, like >> -ENOMEM or -EINVAL shouldn't >> we return NET_XMIT_DROP in that case too? > I think we should not, XMIT_DROP implies drop current packet only, > later on when device is recovered from busy state, Upper layer > protocol(TCP) will re-transmit the packet. It helps in flow control. >> I see. Makes sense. Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: gilad@benyossef.com (Gilad Ben-Yossef) Date: Tue, 5 Sep 2017 15:16:57 +0300 Subject: [PATCH v7 00/19] simplify crypto wait for async op In-Reply-To: References: <1503584350-7831-1-git-send-email-gilad@benyossef.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Sep 5, 2017 at 2:23 PM, Harsh Jain wrote: > On Sun, Sep 3, 2017 at 11:47 AM, Gilad Ben-Yossef wrote: >> On Thu, Aug 31, 2017 at 3:31 PM, Harsh Jain wrote: >>> HI Gilad, >>> >>> I think we need an update in ESP also. Now EBUSY return means driver >>> has accepted, Packet should not be dropped in >>> >>> esp_output_tail() function. >> >> Good catch. You are right and the same holds true for ah_output() in ah4.c. >> >> But I do wonder, the code there now treats -EBUSY as a special case >> and returns NET_XMIT_DROP >> but if an AEAD or AHASH transformation return some other error, like >> -ENOMEM or -EINVAL shouldn't >> we return NET_XMIT_DROP in that case too? > I think we should not, XMIT_DROP implies drop current packet only, > later on when device is recovered from busy state, Upper layer > protocol(TCP) will re-transmit the packet. It helps in flow control. >> I see. Makes sense. Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru