All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] cryptsetup problem with memory allocation
@ 2014-06-23  8:50 Belisko Marek
  2014-06-23  9:01 ` .. ink ..
  2014-06-23 21:45 ` Milan Broz
  0 siblings, 2 replies; 11+ messages in thread
From: Belisko Marek @ 2014-06-23  8:50 UTC (permalink / raw)
  To: dm-crypt

Hi,

I'm trying to use cryptsetup on beaglebone to encrypt some data.
cryptsetup version is 1.6.2. When running luksFormat (with verbose
option) I get following:

# Allocating crypt device /dev/loop0 context.
# Trying to open and read device /dev/loop0.
# Initialising device-mapper backend library.
# Timeout set to 0 miliseconds.
# Iteration time set to 1000 miliseconds.
# Interactive passphrase entry requested.
Enter passphrase:
Verify passphrase:
# Formatting device /dev/loop0 as type LUKS1.
# Crypto backend (gcrypt 1.5.0) initialized.
# Topology: IO (512/0), offset = 0; Required alignment is 1048576 bytes.
# Generating LUKS header version 1 using hash sha1, aes,
cbc-essiv:sha256, MK 32 bytes
# Crypto backend (gcrypt 1.5.0) initialized.
# KDF pbkdf2, hash sha1: 18204 iterations per second.
# Data offset 4096, UUID 9b15dba5-058d-4b81-aa14-e085698e87c1, digest
iterations 2125
# Updating LUKS header of size 1024 on device /dev/loop0
# Key length 32, device size 8192 sectors, header size 2050 sectors.
# Reading LUKS header of size 1024 from device /dev/loop0
# Key length 32, device size 8192 sectors, header size 2050 sectors.
# Adding new keyslot -1 using volume key.
# Calculating data for key slot 0
# Crypto backend (gcrypt 1.5.0) initialized.
# KDF pbkdf2, hash sha1: 18204 iterations per second.
# Key slot 0 use 8888 password iterations.
# Using hash sha1 for AF in key slot 0, 4000 stripes
# Updating key slot 0 [0x1000] area.
# Calculated device size is 250 sectors (RW), offset 8.
# Detected kernel Linux 3.9.0-g7897c55-dirty armv7l.
Couldn't create ioctl argument.
Cannot initialize device-mapper. Is dm_mod kernel module loaded?
# Releasing crypt device /dev/loop0 context.
# Releasing device-mapper backend.
# Unlocking memory.
Command failed with code 5: Cannot initialize device-mapper. Is dm_mod
kernel module loaded?

I track it down that malloc fails (ENONMEM) in libdevmapper and then
_dm_check_versions() fails when creating dm task (dmt =
dm_task_create(DM_DEVICE_LIST_VERSIONS). There is enough of free
memory in this case:

             total         used         free       shared      buffers
Mem:        247396        68656       178740            0            0

Any idea why allocation runs out of memory and due to that cryptsetup fails?

Thanks in advance.

BR,

marek


-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-07-08  6:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-23  8:50 [dm-crypt] cryptsetup problem with memory allocation Belisko Marek
2014-06-23  9:01 ` .. ink ..
2014-06-23  9:05   ` Belisko Marek
2014-06-23 12:31   ` Belisko Marek
2014-06-23 21:45 ` Milan Broz
2014-06-23 23:12   ` Alasdair G Kergon
2014-07-04 15:02     ` Belisko Marek
2014-07-04 16:44       ` Milan Broz
2014-07-08  6:22         ` Belisko Marek
2014-06-23 23:17   ` Alasdair G Kergon
2014-07-04 14:44   ` Belisko Marek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.