public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David Härdeman" <david@2gen.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-kernel@vger.kernel.org, dhowells@redhat.com
Subject: Re: [PATCH 02/04] Add dsa crypto ops
Date: Tue, 24 Jan 2006 07:49:52 +0100	[thread overview]
Message-ID: <20060124064952.GA18879@hardeman.nu> (raw)
In-Reply-To: <E1F1Csk-0000lm-00@gondolin.me.apana.org.au>

On Tue, Jan 24, 2006 at 12:22:02PM +1100, Herbert Xu wrote:
>David H?rdeman <david@2gen.com> wrote:
>>
>> +static int dsa_setkey(void *ctx, const u8 *key, unsigned int keylen, u32 *flags)
>> +{
>> +       struct dsa_ctx *dctx = ctx;
>> +
>> +       if (keylen != sizeof(struct key_payload_dsa *)) {
>> +               printk("Invalid key size in dsa_setkey\n");
>> +               return -EINVAL;
>> +       }
>> +
>> +       dctx->key = (struct key_payload_dsa *)key;
>> +       return 0;
>> +}
>
>This is bad.  You're putting a pointer to an object with an unknown
>lifetime into the tfm.
>
>Is there anything wrong with allocating the memory for it and storing
>the key in the tfm like everyone else?

No, not at all, it's a mistake and I'll change it...


  reply	other threads:[~2006-01-24  6:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <11380489522552@2gen.com>
2006-01-23 20:42 ` [PATCH 02/04] Add dsa crypto ops David Härdeman
2006-01-23 20:42   ` [PATCH 03/04] Add encryption ops to the keyctl syscall David Härdeman
2006-01-23 20:42     ` [PATCH 04/04] Add dsa key type David Härdeman
2006-01-24 11:08       ` David Howells
2006-01-25 19:14         ` David Härdeman
2006-01-26  9:41           ` David Howells
2006-01-24  4:33     ` [PATCH 03/04] Add encryption ops to the keyctl syscall Randy.Dunlap
2006-01-24 10:58     ` David Howells
2006-01-25 20:40       ` David Härdeman
2006-01-26  9:43         ` David Howells
2006-01-24 11:09     ` David Howells
2006-01-24  1:22   ` [PATCH 02/04] Add dsa crypto ops Herbert Xu
2006-01-24  6:49     ` David Härdeman [this message]
2006-01-24 10:37 ` [PATCH 01/04] Add multi-precision-integer maths library David Howells
2006-01-25 20:46   ` David Härdeman
2006-01-26  9:45     ` David Howells
2006-01-26 21:58 [PATCH 00/04] Add DSA key type David Härdeman
2006-01-26 21:58 ` [PATCH 02/04] Add dsa crypto ops David Härdeman

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=20060124064952.GA18879@hardeman.nu \
    --to=david@2gen.com \
    --cc=dhowells@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@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