linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: Zbigniew Szmek <zjedrzejewski-szmek@wp.pl>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] make crypto modular
Date: Wed, 10 Nov 2004 14:38:34 -0500	[thread overview]
Message-ID: <41926E3A.5020005@tmr.com> (raw)
In-Reply-To: <200411082149.54723.zjedrzejewski-szmek@wp.pl>

Zbigniew Szmek wrote:
> Cryptoapi can be modular, so why not?
> This patch does the following:
> 1. Change Kconfig option CRYPTO to tristate
> 2. Add __exit functions to crypto/api.c and crypto/proc.c
> 3. Change crypto/api.c:init_crypto() from void to int
> 4. Change crypto/Makefile to link hmac.o as part 
>    of the new crypto.ko module. 
>    
>    hmac.c could be compiled as a seperate module, if not for the fact,
>    that sizeof(struct digest_tfm) depends on CONFIG_CRYPTO_HMAC.
>    Linking them together ensures that there is no mismatch. If the user
>    compiles crypto.ko without HMAC, and then compiles another module
>    with HMAC, (for example ah4.ko), it will correctly fail with
>    "ah4: Unknown symbol crypto_hmac_init".
> 
> When CONFIG_CRYPTO=y the code generated should be identical,
> apart from point 3. above. When CONFIG_CRYPTO=m 
> size of crypto/crypto.ko is 15k.
> 
> The patch is against 2.6.10-rc1-mm1, applies cleanly to 2.6.10-rc1 and
> to 2.6.7 with two offsets.
> 
Good job! Reduces the memory cost of having the capability "just in 
case" needed in small memory machines.

-- 
    -bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me


      parent reply	other threads:[~2004-11-10 20:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-08 20:49 [PATCH] make crypto modular Zbigniew Szmek
2004-11-08 22:23 ` Sam Ravnborg
2004-11-09  0:02   ` Zbigniew Szmek
2004-11-12  8:45     ` James Morris
2004-11-10 19:38 ` Bill Davidsen [this message]

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=41926E3A.5020005@tmr.com \
    --to=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zjedrzejewski-szmek@wp.pl \
    /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;
as well as URLs for NNTP newsgroup(s).