encrypted swap on loop in 2.4.10-pre12?
i've been using encrypted swap over loopdev using the new cryptoapi patches. i just built a 2.4.10-pre12 kernel and i got a panic doing mkswap on the loopdev. the mkswap process becomes unkillable after this and never finishes. this is repeatable everytime. i've had no problems whatsoever until this kernel even under high load.. any ideas? :>
Sep 19 11:06:13 discord kernel: Unabl Sep 19 11:06:13 discord kernel: e to handle kernel NULL pointer dereference at virtual address 00000000 Sep 19 11:06:13 discord kernel: printing eip: Sep 19 11:06:13 discord kernel: 00000000 Sep 19 11:06:13 discord kernel: *pde = 0f444067 Sep 19 11:06:13 discord kernel: *pte = 00000000 Sep 19 11:06:13 discord kernel: Oops: 0000 Sep 19 11:06:13 discord kernel: CPU: 0 Sep 19 11:06:13 discord kernel: EIP: 0010:[<00000000>] Sep 19 11:06:13 discord kernel: EFLAGS: 00010206 Sep 19 11:06:13 discord kernel: eax: c02fbca0 ebx: cf47d000 ecx: 00000400 edx: cfb428c0 Sep 19 11:06:13 discord kernel: esi: 00001000 edi: 00000c00 ebp: c1394d78 esp: cf447efc Sep 19 11:06:13 discord kernel: ds: 0018 es: 0018 ss: 0018 Sep 19 11:06:13 discord kernel: Process mkswap (pid: 9902, stackpage=cf447000) Sep 19 11:06:13 discord kernel: Stack: c012a371 cfb428c0 c1394d78 00000400 00001000 cfcd61b0 001828c4 00000000 Sep 19 11:06:13 discord kernel: 00000000 00001000 00000400 00000c00 fffffff4 00000000 00000400 00000000 Sep 19 11:06:13 discord kernel: cfa9210c cfa92060 00000000 c01a1ba0 00126000 00001000 00000003 32000022 Sep 19 11:06:13 discord kernel: Call Trace: [<c012a371>] [<c01a1ba0>] [<c01359c0>] [<c01357fe>] [<c0106ebb>] Sep 19 11:06:13 discord kernel: Sep 19 11:06:13 discord kernel: Code: Bad EIP value. Sep 19 11:06:13 discord kernel: Unable to find swap-space signature
Signature · 4 lines
http://chemlab.org - email [email protected] for pgp public key chemlab radio! - drop out @ http://mp3.chemlab.org:8000 24-7-365 "i could build anything if i could just find my tools.."
Quoted 27 lines · steve j. kondik
i've been using encrypted swap over loopdev using the new cryptoapi patches. i just built a 2.4.10-pre12 kernel and i got a panic doing mkswap on the loopdev. the mkswap process becomes unkillable after this and never finishes. this is repeatable everytime. i've had no problems whatsoever until this kernel even under high load.. any ideas? :>
Sep 19 11:06:13 discord kernel: Unabl Sep 19 11:06:13 discord kernel: e to handle kernel NULL pointer dereference at virtual address 00000000 Sep 19 11:06:13 discord kernel: printing eip: Sep 19 11:06:13 discord kernel: 00000000 Sep 19 11:06:13 discord kernel: *pde = 0f444067 Sep 19 11:06:13 discord kernel: *pte = 00000000 Sep 19 11:06:13 discord kernel: Oops: 0000 Sep 19 11:06:13 discord kernel: CPU: 0 Sep 19 11:06:13 discord kernel: EIP: 0010:[<00000000>] Sep 19 11:06:13 discord kernel: EFLAGS: 00010206 Sep 19 11:06:13 discord kernel: eax: c02fbca0 ebx: cf47d000 ecx: 00000400 edx: cfb428c0 Sep 19 11:06:13 discord kernel: esi: 00001000 edi: 00000c00 ebp: c1394d78 esp: cf447efc Sep 19 11:06:13 discord kernel: ds: 0018 es: 0018 ss: 0018 Sep 19 11:06:13 discord kernel: Process mkswap (pid: 9902, stackpage=cf447000) Sep 19 11:06:13 discord kernel: Stack: c012a371 cfb428c0 c1394d78 00000400 00001000 cfcd61b0 001828c4 00000000 Sep 19 11:06:13 discord kernel: 00000000 00001000 00000400
Quoted 8 lines
00000c00fffffff400000000 00000400 00000000Sep 19 11:06:13 discord kernel: cfa9210c cfa92060 00000000 c01a1ba0 00126000 00001000 00000003 32000022 Sep 19 11:06:13 discord kernel: Call Trace: [<c012a371>] [<c01a1ba0>] [<c01359c0>] [<c01357fe>] [<c0106ebb>] Sep 19 11:06:13 discord kernel: Sep 19 11:06:13 discord kernel: Code: Bad EIP value. Sep 19 11:06:13 discord kernel: Unable to find swap-space signature
ksymoops it please
Signature · 1 line
Jens Axboe
read in the wrong file. here it is:
Sep 19 13:15:09 discord kernel: Unable to handle kernel NULL pointer dereference at virtual Sep 19 13:15:09 discord kernel: 00000000 Sep 19 13:15:09 discord kernel: *pde = 0f602067 Sep 19 13:15:09 discord kernel: Oops: 0000 Sep 19 13:15:09 discord kernel: CPU: 0 Sep 19 13:15:09 discord kernel: EIP: 0010:[<00000000>] Using defaults from ksymoops -t elf32-i386 -a i386 Sep 19 13:15:09 discord kernel: EFLAGS: 00010206 Sep 19 13:15:09 discord kernel: eax: c02fbca0 ebx: cf613000 ecx: 00000400 edx: cfb428c0 Sep 19 13:15:09 discord kernel: esi: 00001000 edi: 00000c00 ebp: c139aca0 esp: cf605efc Sep 19 13:15:09 discord kernel: ds: 0018 es: 0018 ss: 0018 Sep 19 13:15:09 discord kernel: Process mkswap (pid: 5695, stackpage=cf605000) Sep 19 13:15:09 discord kernel: Stack: c012a371 cfb428c0 c139aca0 00000400 00001000 cfcd61b0 001828c4 00000000 Sep 19 13:15:09 discord kernel: 00000000 00001000 00000400 00000c00 fffffff4 00000000 00000400 00000000 Sep 19 13:15:09 discord kernel: cfa9210c cfa92060 00000000 c01a1ba0 00126000 00001000 00000003 32000022 Sep 19 13:15:09 discord kernel: Call Trace: [<c012a371>] [<c01a1ba0>] [<c01359c0>] [<c01357fe>] [<c0106ebb>] Sep 19 13:15:09 discord kernel: Code: Bad EIP value.
Quoted 1 line
Quoted 1 line
EIP; 00000000 Before first symbol
Trace; c012a370 <generic_file_write+410/810>
Trace; c01a1ba0 <write_chan+0/1c0>
Trace; c01359c0 <sys_write+b0/d0>
Trace; c01357fe <sys_llseek+fe/140>
Trace; c0106eba <system_call+32/38>
Quoted 39 lines · Jens Axboe
Quoted 27 lines · steve j. kondik
i've been using encrypted swap over loopdev using the new cryptoapi patches. i just built a 2.4.10-pre12 kernel and i got a panic doing mkswap on the loopdev. the mkswap process becomes unkillable after this and never finishes. this is repeatable everytime. i've had no problems whatsoever until this kernel even under high load.. any ideas? :>
Sep 19 11:06:13 discord kernel: Unabl Sep 19 11:06:13 discord kernel: e to handle kernel NULL pointer dereference at virtual address 00000000 Sep 19 11:06:13 discord kernel: printing eip: Sep 19 11:06:13 discord kernel: 00000000 Sep 19 11:06:13 discord kernel: *pde = 0f444067 Sep 19 11:06:13 discord kernel: *pte = 00000000 Sep 19 11:06:13 discord kernel: Oops: 0000 Sep 19 11:06:13 discord kernel: CPU: 0 Sep 19 11:06:13 discord kernel: EIP: 0010:[<00000000>] Sep 19 11:06:13 discord kernel: EFLAGS: 00010206 Sep 19 11:06:13 discord kernel: eax: c02fbca0 ebx: cf47d000 ecx: 00000400 edx: cfb428c0 Sep 19 11:06:13 discord kernel: esi: 00001000 edi: 00000c00 ebp: c1394d78 esp: cf447efc Sep 19 11:06:13 discord kernel: ds: 0018 es: 0018 ss: 0018 Sep 19 11:06:13 discord kernel: Process mkswap (pid: 9902, stackpage=cf447000) Sep 19 11:06:13 discord kernel: Stack: c012a371 cfb428c0 c1394d78 00000400 00001000 cfcd61b0 001828c4 00000000 Sep 19 11:06:13 discord kernel: 00000000 00001000 00000400Quoted 8 lines
00000c00fffffff400000000 00000400 00000000Sep 19 11:06:13 discord kernel: cfa9210c cfa92060 00000000 c01a1ba0 00126000 00001000 00000003 32000022 Sep 19 11:06:13 discord kernel: Call Trace: [<c012a371>] [<c01a1ba0>] [<c01359c0>] [<c01357fe>] [<c0106ebb>] Sep 19 11:06:13 discord kernel: Sep 19 11:06:13 discord kernel: Code: Bad EIP value. Sep 19 11:06:13 discord kernel: Unable to find swap-space signatureksymoops it please
Signature · 4 lines
http://chemlab.org - email [email protected] for pgp public key chemlab radio! - drop out @ http://mp3.chemlab.org:8000 24-7-365 "i could build anything if i could just find my tools.."
Quoted 5 lines · steve j. kondik
i've been using encrypted swap over loopdev using the new cryptoapi patches. i just built a 2.4.10-pre12 kernel and i got a panic doing mkswap on the loopdev. the mkswap process becomes unkillable after this and never finishes. this is repeatable everytime. i've had no problems whatsoever until this kernel even under high load.. any ideas? :>
Cryptoapi can't be used to encrypt swap. It has nasties like sleeping in make_request_fn() and potential memory allocation deadlock.
loop-AES works with encrypted swap. Announcement is here:
http://mail.nl.linux.org/linux-crypto/2001-09/msg00006.html http://marc.theaimsgroup.com/?l=linux-crypto&m=99953544804810&w=2
Regards,
Jari Ruusu <[email protected]>
Quoted 9 lines · Jari Ruusu
Quoted 5 lines · steve j. kondik
i've been using encrypted swap over loopdev using the new cryptoapi patches. i just built a 2.4.10-pre12 kernel and i got a panic doing mkswap on the loopdev. the mkswap process becomes unkillable after this and never finishes. this is repeatable everytime. i've had no problems whatsoever until this kernel even under high load.. any ideas? :>
Cryptoapi can't be used to encrypt swap. It has nasties like sleeping in
make_request_fn()and potential memory allocation deadlock.
sleeping in make_request_fn is not a nasty in itself, btw. in fact loop just needs an emergency page pool for swap to be perfectly safe.
Signature · 1 line
Jens Axboe
Quoted 6 lines · Jens Axboe
Quoted 2 lines · Jari Ruusu
Cryptoapi can't be used to encrypt swap. It has nasties like sleeping in
make_request_fn()and potential memory allocation deadlock.sleeping in
make_request_fnis not a nasty in itself, btw. in fact loop just needs an emergency page pool for swap to be perfectly safe.
loop-AES provides emergency page pool for device backed loop. Take a look.
Regards,
Jari Ruusu <[email protected]>
Quoted 9 lines · Jari Ruusu
Quoted 6 lines · Jens Axboe
Quoted 2 lines · Jari Ruusu
Cryptoapi can't be used to encrypt swap. It has nasties like sleeping in
make_request_fn()and potential memory allocation deadlock.sleeping in
make_request_fnis not a nasty in itself, btw. in fact loop just needs an emergency page pool for swap to be perfectly safe.loop-AES provides emergency page pool for device backed loop. Take a look.
Then sleeping in make_request_fn is not a nasty at all. In fact the kernel does it all the time anyways.
Signature · 1 line
Jens Axboe
loop-aes does not work to encrypt swap using 2.4.10-pre12. the same panic results during mkswap.
Quoted 14 lines · Jens Axboe
Quoted 9 lines · Jari Ruusu
Quoted 6 lines · Jens Axboe
Quoted 2 lines · Jari Ruusu
Cryptoapi can't be used to encrypt swap. It has nasties like sleeping in
make_request_fn()and potential memory allocation deadlock.sleeping in
make_request_fnis not a nasty in itself, btw. in fact loop just needs an emergency page pool for swap to be perfectly safe.loop-AES provides emergency page pool for device backed loop. Take a look.
Then sleeping in
make_request_fnis not a nasty at all. In fact the kernel does it all the time anyways.
Signature · 4 lines
http://chemlab.org - email [email protected] for pgp public key chemlab radio! - drop out @ http://mp3.chemlab.org:8000 24-7-365 "i could build anything if i could just find my tools.."
Quoted 2 lines · steve j. kondik
loop-aes does not work to encrypt swap using 2.4.10-pre12. the same panic results during mkswap.
Did you remove _any_ of the kernel compile time generated files from kernel source tree? Some of those generated files are _required_ to correctly compile modules.
Regards,
Jari Ruusu <[email protected]>
hmm? both cryptoapi and loop-aes work just fine when encrypting anything but swap. this is _only_ with kernel 2.4.10-pre12. i would suspect something changed that breaks swap on loopdev in general in this kernel.
-steve
Quoted 11 lines · Jari Ruusu
Quoted 2 lines · steve j. kondik
loop-aes does not work to encrypt swap using 2.4.10-pre12. the same panic results during mkswap.
Did you remove _any_ of the kernel compile time generated files from kernel source tree? Some of those generated files are _required_ to correctly compile modules.
Regards,
Jari Ruusu <[email protected]>
Signature · 4 lines
http://chemlab.org - email [email protected] for pgp public key chemlab radio! - drop out @ http://mp3.chemlab.org:8000 24-7-365 "i could build anything if i could just find my tools.."
Quoted 4 lines · steve j. kondik
hmm? both cryptoapi and loop-aes work just fine when encrypting anything but swap. this is _only_ with kernel 2.4.10-pre12. i would suspect something changed that breaks swap on loopdev in general in this kernel.
loop-AES encrypted swap works just fine on 2.4.10-pre12, see:
# uname -a Linux debian 2.4.10-pre12 #1 Thu Sep 20 20:15:08 EEST 2001 i686 unknown # vmstat procs memory swap io system cpu r b w swpd free buff cache si so bi bo in cs us sy id 0 0 1 4708 2708 1824 12856 19 28 682 623 223 119 5 74 21 # swapon -s Filename Type Size Used Priority /dev/loop6 partition 191512 4704 -1 # losetup /dev/loop6 /dev/loop6: [0301]:170184 (/dev/hda2) offset 0, AES encryption
Regards,
Jari Ruusu <[email protected]>
Quoted 7 lines · Jari Ruusu
Quoted 4 lines · steve j. kondik
hmm? both cryptoapi and loop-aes work just fine when encrypting anything but swap. this is _only_ with kernel 2.4.10-pre12. i would suspect something changed that breaks swap on loopdev in general in this kernel.
loop-AES encrypted swap works just fine on 2.4.10-pre12, see:
But that's only your system. He obvious has a counter example
(which may not be the fault of loop-AES, but something else, that has yet to be determined). So the two of you are now reduced to figuring out why his is broken as yours is not. Standard debugging situation.
Quoted 12 lines
# uname -a Linux debian 2.4.10-pre12 #1 Thu Sep 20 20:15:08 EEST 2001 i686 unknown # vmstat procs memory swap io system cpu r b w swpd free buff cache si so bi bo in cs us sy id 0 0 1 4708 2708 1824 12856 19 28 682 623 223 119 5 74 21 # swapon -s Filename Type Size Used Priority /dev/loop6 partition 191512 4704 -1 # losetup /dev/loop6 /dev/loop6: [0301]:170184 (/dev/hda2) offset 0, AES encryption
Quoted 2 lines
Regards,
Jari Ruusu <[email protected]>
Mike
Signature · 4 lines
Michael H. Warfield | (770) 985-6132 | [email protected] (The Mad Wizard) | (678) 463-0932 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it!
agreed. i've had this problem on two seperate systems, however i _am_ running a few other patches- notably the kpreempt patch. but again, no problems at all until 2.4.10-pre12. i'll try some things in the morning and see what i can come up with. i see you are doing swapon, however have you tried mkswap over your loopdev? i can actually swapon just fine, its mkswap that causes the panic.
Quoted 41 lines · Michael H. Warfield
Quoted 7 lines · Jari Ruusu
Quoted 4 lines · steve j. kondik
hmm? both cryptoapi and loop-aes work just fine when encrypting anything but swap. this is _only_ with kernel 2.4.10-pre12. i would suspect something changed that breaks swap on loopdev in general in this kernel.
loop-AES encrypted swap works just fine on 2.4.10-pre12, see:
But that's only your system. He obvious has a counter example
(which may not be the fault of loop-AES, but something else, that has yet to be determined). So the two of you are now reduced to figuring out why his is broken as yours is not. Standard debugging situation.Quoted 12 lines
# uname -a Linux debian 2.4.10-pre12 #1 Thu Sep 20 20:15:08 EEST 2001 i686 unknown # vmstat procs memory swap io system cpu r b w swpd free buff cache si so bi bo in cs us sy id 0 0 1 4708 2708 1824 12856 19 28 682 623 223 119 5 74 21 # swapon -s Filename Type Size Used Priority /dev/loop6 partition 191512 4704 -1 # losetup /dev/loop6 /dev/loop6: [0301]:170184 (/dev/hda2) offset 0, AES encryptionQuoted 2 lines
Regards,
Jari Ruusu <[email protected]>Mike
Signature · 10 lines
Michael H. Warfield | (770) 985-6132 | [email protected] (The Mad Wizard) | (678) 463-0932 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Signature · 4 lines
http://chemlab.org - email [email protected] for pgp public key chemlab radio! - drop out @ http://mp3.chemlab.org:8000 24-7-365 "i could build anything if i could just find my tools.."
Quoted 6 lines · steve j. kondik
agreed. i've had this problem on two seperate systems, however i _am_ running a few other patches- notably the kpreempt patch. but again, no problems at all until 2.4.10-pre12. i'll try some things in the morning and see what i can come up with. i see you are doing swapon, however have you tried mkswap over your loopdev? i can actually swapon just fine, its mkswap that causes the panic.
I losetup the encrypted swap loop with a random key every time the box boots, so mkswap is done before swapon. I used the example script in the loop-AES README file.
For testing purposes, can you back out the kpreempt patch, and let me know if that cures the problem.
Regards,
Jari Ruusu <[email protected]>
i am successfully running 2.4.10-pre13 with kpreempt, grsec, and ext3 with encrypted swap now.
Quoted 23 lines · Jari Ruusu
Quoted 6 lines · steve j. kondik
agreed. i've had this problem on two seperate systems, however i _am_ running a few other patches- notably the kpreempt patch. but again, no problems at all until 2.4.10-pre12. i'll try some things in the morning and see what i can come up with. i see you are doing swapon, however have you tried mkswap over your loopdev? i can actually swapon just fine, its mkswap that causes the panic.
I losetup the encrypted swap loop with a random key every time the box boots, so mkswap is done before swapon. I used the example script in the loop-AES README file.
For testing purposes, can you back out the kpreempt patch, and let me know if that cures the problem.
Regards,
Jari Ruusu <[email protected]>-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 4 lines
http://chemlab.org - email [email protected] for pgp public key chemlab radio! - drop out @ http://mp3.chemlab.org:8000 24-7-365 "i could build anything if i could just find my tools.."