Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Stephan Mueller <smueller@chronox.de>
To: herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org
Subject: module ref count
Date: Tue, 21 Apr 2015 14:35:47 +0200	[thread overview]
Message-ID: <1513971.JRWYZvf2T6@myon.chronox.de> (raw)

Hi Herbert,

I am currently working on the template for SP800-38F key wrapping. The module 
is operational and calculates what I want.

However, I have one problem I am having difficulties to track down and I am 
wondering whether you could point me to the right direction.

When a caller calls

	crypto_alloc_aead("kw(aes)", 0, 0);

somehow the refcount of the kernel module implementing the keywrapping is not 
increased. Once can see that in lsmod where the "Used by" value remains 0.

Then when the caller deallocates the cipher handle, the refcount is -1 
according to lsmod. With that, a second invocation of crypto_alloc_aead will 
fail and I even cannot remove the module from the kernel.

Who increases the refcount on the kernel crypto API side?

Thanks a lot

-- 
Ciao
Stephan

             reply	other threads:[~2015-04-21 12:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21 12:35 Stephan Mueller [this message]
2015-04-21 12:56 ` module ref count Stephan Mueller
2015-04-21 14:43   ` Stephan Mueller
2015-04-22  7:26     ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1513971.JRWYZvf2T6@myon.chronox.de \
    --to=smueller@chronox.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox