luksOpen takes long time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I was experimenting to use dm-crypt/LUKS in an embedded SBC running
Linux with kernel 2.6.16.54, using a Compact Flash as disk storage and
with the following CPU:

 processor       : 0
 vendor_id       : SiS SiS SiS
 cpu family      : 5
 model           : 0
 model name      : ff/00
 stepping        : 5
 cpu MHz         : 166.641
 fdiv_bug        : no
 hlt_bug         : no
 f00f_bug        : no
 coma_bug        : no
 fpu             : yes
 fpu_exception   : yes
 cpuid level     : 1
 wp              : yes
 flags           : fpu tsc cx8 mmx
 bogomips        : 334.26

After successfully initializing a partition on my Compact Flash with
this command:

# cryptsetup --cipher=aes-cbc-essiv:sha256 --key-size=192 luksFormat
/dev/hda3 <key file>

when I open partition, I get a delay of 35 seconds until the command
succeeds!

Here goes an extract of an strace with timing information for this command:

     0.001033 read(4, "1", 1)           = 1 <0.000340>
     0.001098 read(4, "\216", 1)        = 1 <0.000247>
     0.001086 read(4, "x", 1)           = 1 <0.000249>
     0.001006 read(4, "", 1)            = 0 <0.000220>
     0.000921 close(4)                  = 0 <0.000235>
     0.001010 ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfd17510) = -1
EBADF (Bad file descriptor) <0.000192>
     0.000978 open("/dev/hda3", O_RDONLY|O_SYNC|O_DIRECT|O_LARGEFILE) =
4 <0.000440>
     0.001259 ioctl(4, BLKSSZGET, 0xbfd17804) = 0 <0.000215>
     0.001061 read(4,
"LUKS\272\276\0\1aes\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
<0.001615>
     0.002662 read(4,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4"..., 512) = 512
<0.000950>
     0.002211 close(4)                  = 0 <0.000312>
    35.012490 getpid()                  = 737 <0.000200>
     0.001314 open("/dev/hda3", O_RDONLY|O_LARGEFILE) = 4 <0.000499>
     0.001309 ioctl(4, BLKSSZGET, 0xbfd176b4) = 0 <0.000229>
     0.000950 close(4)                  = 0 <0.000323>
     0.001890 ioctl(3, DM_DEV_CREATE, 0x8128aa8) = 0 <0.013570>
     0.014758 ioctl(3, DM_TABLE_LOAD, 0x8128aa8) = 0 <0.002070>
     0.003255 ioctl(3, DM_DEV_SUSPEND, 0x8128a28) = 0 <0.001167>
     0.001988 close(3)                  = 0 <0.000252>
     0.001030 stat64("/dev/mapper/temporary-cryptsetup-737", 0xbfd165d0)
= -1 ENOENT (No such file or directory) <0.000365>
     0.001322 umask(0)                  = 022 <0.000202>
     0.001033 mknod("/dev/mapper/temporary-cryptsetup-737",
S_IFBLK|0600, makedev(254, 1)) = 0 <0.000412>
     0.001413 umask(022)                = 0 <0.000200>
     0.000895 chown32("/dev/mapper/temporary-cryptsetup-737", 0, 0) = 0
<0.000365>
     0.001282 open("/dev/mapper/temporary-cryptsetup-737",
O_RDONLY|O_SYNC|O_DIRECT|O_LARGEFILE) = 3 <0.000444>
     0.001479 ioctl(3, BLKSSZGET, 0xbfd17694) = 0 <0.000232>
     0.001002 read(3,
"MQ\206\332\336\257\263\252a*\267mkt<1\\\275V\343\22\223"..., 512) = 512
<0.002048>
     0.003051 read(3,
"QL\237\316*\356\211x\276q\240\"\216\301E)\240b\352\37-"..., 512) = 512
<0.001553>
     0.002579 read(3,
"o4\220\362~\220\210\267&\32\336\324\254\255~6\245y\224"..., 512) = 512
<0.001561>
     0.002698 read(3,
"\3<9\346O\201q\0219\313<\320M\252\10\335\342\207\37\374"..., 512) = 512
<0.001682>

What could be the cause for this long delay opening the encrypted partition?

Best regards,
José Miguel Gonçalves

---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux