All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars Ellenberg <Lars.Ellenberg@linbit.com>
To: drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] drbd-svn can't handle modular hmac, and crashes if hash can't be found
Date: Mon, 15 Jan 2007 08:45:12 +0100	[thread overview]
Message-ID: <20070115074512.GD8577@soda.linbit> (raw)
In-Reply-To: <45AA65F4.90709@glines.org>

/ 2007-01-14 09:18:44 -0800
\ Mark Glines:
> Hi,
> 
> A few minor issues.
> 
> 1.  CONFIG_CRYPTO_HMAC can be defined as a module; the drbd code currently requires it to be built into the kernel, 
> apparently for no good reason.
> 
> 2.  If the hash algorithm itself isn't available (like sha1.ko wasn't loaded yet), crypto_alloc_hash() returns 
> -ENOENT.  It does not return NULL, which is what the drbd code currently checks for.  This leads to crashes later.

right... we know 't was unfinished code,
but checked in anyways, to get it going.

> 3.  Once #2 is fixed, the user tools try to report the error, and the error message contains a typo, an extra ")".  
> "Failure: (120) The 'cram-hmac-alg' you specified is not known in )the kernel."  It also doesn't tell the user what 
> to do to fix it.
> 
> The attached patch fixes the above issues, and applies cleanly to your current svn.  Please review and apply.

thanks, will do.

> P.S.  Since drbd no longer requires any exported symbols from the hmac/hash module, is there any reason to check 
> CONFIG_CRYPTO_HMAC at all?  A simpler check on CONFIG_CRYPTO to make sure the basic API exists should be all you 
> need...

we build against older kernels as well,
and as long as debian, suse, redhat & co have their
vendor kernels the way they are, this probably needs to stay this way.
we should be able to relax it for builds against newer kernels, though.

-- 
: Lars Ellenberg                            Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH      Fax +43-1-8178292-82 :
: Vivenotgasse 48, A-1120 Vienna/Europe    http://www.linbit.com :

  reply	other threads:[~2007-01-15  7:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-14 17:18 [Drbd-dev] drbd-svn can't handle modular hmac, and crashes if hash can't be found Mark Glines
2007-01-15  7:45 ` Lars Ellenberg [this message]
2007-01-15  7:52   ` Mark Glines

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=20070115074512.GD8577@soda.linbit \
    --to=lars.ellenberg@linbit.com \
    --cc=drbd-dev@lists.linbit.com \
    /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 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.