crypto_remove_spawns: BUG: unable to handle kernel NULL pointer dereference at 0000000000000018

2010-02-14 Thread Alexey Dobriyan
BUG: unable to handle kernel NULL pointer dereference at 0018
IP: [81145bf4] crypto_remove_spawns+0xd4/0x340
PGD bdc48067 PUD bc954067 PMD 0 
Oops:  [#1] PREEMPT SMP DEBUG_PAGEALLOC
last sysfs file: 
/sys/devices/pci:00/:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
CPU 0 
Pid: 16500, comm: rmmod Not tainted 2.6.33-rc7-next-20100212+ #9 P5E/P5E
RIP: 0010:[81145bf4]  [81145bf4] 
crypto_remove_spawns+0xd4/0x340
RSP: 0018:8800bc9dfde8  EFLAGS: 00010282
RAX: 8800bc901498 RBX:  RCX: 8800ba859610
RDX: 8800bc900380 RSI: 8800bc9dfe18 RDI: 8800bc9015c0
RBP: 8800bc9dfe68 R08:  R09: 
R10:  R11:  R12: 8800bc901488
R13: 8800bc9dfe18 R14: a05817e0 R15: 
FS:  7fdd2ec1c6f0() GS:88000220() knlGS:
CS:  0010 DS:  ES:  CR0: 8005003b
CR2: 0018 CR3: bca34000 CR4: 06f0
DR0:  DR1:  DR2: 
DR3:  DR6: 0ff0 DR7: 0400
Process rmmod (pid: 16500, threadinfo 8800bc9de000, task 8800bd53ad90)
Stack:
 8800bc9dfe08 8800bc9dfe28 8800bc9dfe98 042181636020
0 8800bc9dfe08 8800bc9dfe08 8800bc9015c0 8800bc900380
0 8800ba859808 8800ba859610 8800bc9dfe98 a05817e0
Call Trace:
 [81145eb1] crypto_remove_alg+0x51/0x60
 [81145ef3] crypto_unregister_alg+0x33/0x90
 [a058175c] aes_fini+0x10/0x12 [aes_x86_64]
 [8107266c] sys_delete_module+0x19c/0x250
 [8100256b] system_call_fastpath+0x16/0x1b
Code: 02 00 eb c3 0f 1f 00 48 8b 47 08 48 8d 75 c0 4c 89 28 49 89 45 08 48 8b 
55 c0 e8 a8 fa 02 00 48 8d 45 a0 48 8b 18 48 39 d8 74 44 4c 8b 63 18 4d 39 f4 
0f 84 4e 02 00 00 48 8b 13 48 8b 43 08 4c 
RIP  [81145bf4] crypto_remove_spawns+0xd4/0x340
 RSP 8800bc9dfde8
CR2: 0018


crypto_remove_spawns:

spawn = list_first_entry(spawns, struct crypto_spawn, list);
inst = spawn-inst;

spawn is NULL here.
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] crypto/arc4: convert this stream cipher into a block cipher

2010-02-14 Thread Sebastian Andrzej Siewior
* Sebastian Andrzej Siewior | 2010-02-12 09:42:28 [+0100]:

+static void arc4_ivsetup(struct arc4_ctx *ctx, u8 *iv)
 {
-  struct arc4_ctx *ctx = crypto_tfm_ctx(tfm);
+  if (unlikely(!ctx-new_key))

That should be likely(). Do you want me resend the whole thing? Haven't
noticed anything else :)

+  return;
+  memcpy(iv, ctx-iv, sizeof(ctx-iv));
+  ctx-new_key = 0;
+}

Sebastian
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] crypto/arc4: convert this stream cipher into a block cipher

2010-02-14 Thread Herbert Xu
On Sun, Feb 14, 2010 at 09:42:54PM +0100, Sebastian Andrzej Siewior wrote:
 * Sebastian Andrzej Siewior | 2010-02-12 09:42:28 [+0100]:
 
 +static void arc4_ivsetup(struct arc4_ctx *ctx, u8 *iv)
  {
 -struct arc4_ctx *ctx = crypto_tfm_ctx(tfm);
 +if (unlikely(!ctx-new_key))
 
 That should be likely(). Do you want me resend the whole thing? Haven't
 noticed anything else :)

How about we just remove it? It's not on a hot path anyway.

I can do this when integrating the patch so you don't have to
resend.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} herb...@gondor.apana.org.au
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: crypto_remove_spawns: BUG: unable to handle kernel NULL pointer dereference at 0000000000000018

2010-02-14 Thread Herbert Xu
On Sun, Feb 14, 2010 at 07:45:07PM +0200, Alexey Dobriyan wrote:
 BUG: unable to handle kernel NULL pointer dereference at 0018
 IP: [81145bf4] crypto_remove_spawns+0xd4/0x340
 PGD bdc48067 PUD bc954067 PMD 0 
 Oops:  [#1] PREEMPT SMP DEBUG_PAGEALLOC
 last sysfs file: 
 /sys/devices/pci:00/:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
 CPU 0 
 Pid: 16500, comm: rmmod Not tainted 2.6.33-rc7-next-20100212+ #9 P5E/P5E
 RIP: 0010:[81145bf4]  [81145bf4] 
 crypto_remove_spawns+0xd4/0x340
 RSP: 0018:8800bc9dfde8  EFLAGS: 00010282
 RAX: 8800bc901498 RBX:  RCX: 8800ba859610
 RDX: 8800bc900380 RSI: 8800bc9dfe18 RDI: 8800bc9015c0
 RBP: 8800bc9dfe68 R08:  R09: 
 R10:  R11:  R12: 8800bc901488
 R13: 8800bc9dfe18 R14: a05817e0 R15: 
 FS:  7fdd2ec1c6f0() GS:88000220() knlGS:
 CS:  0010 DS:  ES:  CR0: 8005003b
 CR2: 0018 CR3: bca34000 CR4: 06f0
 DR0:  DR1:  DR2: 
 DR3:  DR6: 0ff0 DR7: 0400
 Process rmmod (pid: 16500, threadinfo 8800bc9de000, task 8800bd53ad90)
 Stack:
  8800bc9dfe08 8800bc9dfe28 8800bc9dfe98 042181636020
 0 8800bc9dfe08 8800bc9dfe08 8800bc9015c0 8800bc900380
 0 8800ba859808 8800ba859610 8800bc9dfe98 a05817e0
 Call Trace:
  [81145eb1] crypto_remove_alg+0x51/0x60
  [81145ef3] crypto_unregister_alg+0x33/0x90
  [a058175c] aes_fini+0x10/0x12 [aes_x86_64]
  [8107266c] sys_delete_module+0x19c/0x250
  [8100256b] system_call_fastpath+0x16/0x1b
 Code: 02 00 eb c3 0f 1f 00 48 8b 47 08 48 8d 75 c0 4c 89 28 49 89 45 08 48 8b 
 55 c0 e8 a8 fa 02 00 48 8d 45 a0 48 8b 18 48 39 d8 74 44 4c 8b 63 18 4d 39 
 f4 0f 84 4e 02 00 00 48 8b 13 48 8b 43 08 4c 
 RIP  [81145bf4] crypto_remove_spawns+0xd4/0x340
  RSP 8800bc9dfde8
 CR2: 0018
 
 
 crypto_remove_spawns:
 
   spawn = list_first_entry(spawns, struct crypto_spawn, list);
   inst = spawn-inst;
 
 spawn is NULL here.

Is this reproducible every time you unload aes_x86_64 after boot?
Please attach your config file?

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} herb...@gondor.apana.org.au
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: crypto_remove_spawns: BUG: unable to handle kernel NULL pointer dereference at 0000000000000018

2010-02-14 Thread Alexey Dobriyan
On Mon, Feb 15, 2010 at 7:27 AM, Herbert Xu herb...@gondor.apana.org.au wrote:
 Is this reproducible every time you unload aes_x86_64 after boot?

No, what I do is

1. setup ipcomp in tunnel mode _in fresh netns_ and immediately exit
2. modprobe/rmmod all modules (not much)

~1 hour of this workload and it hits sometimes with aes_x86_64,
sometimes with aes_generic.

 Please attach your config file?

Full config later, for now it's ipv4 only, XFRM stuff as modules,
crypto modules as modules, almost all debugging on.
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html