Working with kernel 3.12.14, in AEAD mode, I register my crypto driver
and the givencrypt() method in the driver gets called when I send
IPSec traffic. I store the request, and later call its complete()
method from a work queue. There is no actual encryption happening at
the moment, I'm just testing flow. As stated, the complete() call
stumbles upon a NULL pointer exception in xfrm_output_resume() because
skb_dst(skb) is NULL. When I receive the request in givencrypt(), dst
is not null in the SKB.
Why would the framework meddle with the SKB? Has anyone experienced
anything similar?
Thanks,
Dennis.
Denis B <[email protected]> wrote:
> Working with kernel 3.12.14, in AEAD mode, I register my crypto driver
> and the givencrypt() method in the driver gets called when I send
> IPSec traffic. I store the request, and later call its complete()
> method from a work queue. There is no actual encryption happening at
> the moment, I'm just testing flow. As stated, the complete() call
> stumbles upon a NULL pointer exception in xfrm_output_resume() because
> skb_dst(skb) is NULL. When I receive the request in givencrypt(), dst
> is not null in the SKB.
>
> Why would the framework meddle with the SKB? Has anyone experienced
> anything similar?
This is probably the result of some kind of a bug in your driver.
If however you're sure that your driver is doing the right thing,
then the bug would be in the network stack. You should discuss
networking issues on [email protected].
Cheers,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
The bug was: return value of my driver's encrypt() function should
have been -EINPROGRESS to support asynchronous operation.
Thanks.
On Thu, May 26, 2016 at 12:29 PM, Herbert Xu
<[email protected]> wrote:
> Denis B <[email protected]> wrote:
>> Working with kernel 3.12.14, in AEAD mode, I register my crypto driver
>> and the givencrypt() method in the driver gets called when I send
>> IPSec traffic. I store the request, and later call its complete()
>> method from a work queue. There is no actual encryption happening at
>> the moment, I'm just testing flow. As stated, the complete() call
>> stumbles upon a NULL pointer exception in xfrm_output_resume() because
>> skb_dst(skb) is NULL. When I receive the request in givencrypt(), dst
>> is not null in the SKB.
>>
>> Why would the framework meddle with the SKB? Has anyone experienced
>> anything similar?
>
> This is probably the result of some kind of a bug in your driver.
>
> If however you're sure that your driver is doing the right thing,
> then the bug would be in the network stack. You should discuss
> networking issues on [email protected].
>
> Cheers,
> --
> Email: Herbert Xu <[email protected]>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt