From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nm22-vm2.bullet.mail.ne1.yahoo.com (nm22-vm2.bullet.mail.ne1.yahoo.com [98.138.91.210]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Wed, 23 Dec 2015 20:05:56 +0100 (CET) Date: Wed, 23 Dec 2015 19:05:52 +0000 (UTC) From: H McCurdy Reply-To: H McCurdy Message-ID: <1738110781.2276602.1450897552997.JavaMail.yahoo@mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2276601_1257647630.1450897552994" References: <1738110781.2276602.1450897552997.JavaMail.yahoo.ref@mail.yahoo.com> Subject: [dm-crypt] Can LUKS be used on a tmpfs? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "dm-crypt@saout.de" ------=_Part_2276601_1257647630.1450897552994 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, Is it possible to get crypt_init() to use a tmpfs instead of a block device= or a file? I realize there are sanity issues related to such an inquiry because the ke= y is in RAM and so is the "disk."=C2=A0 Regardless, I have the question. BTW, an older ramdisk (/dev/ram0) does appear to work. Hugh ------=_Part_2276601_1257647630.1450897552994 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Hi,

Is it possible to get crypt_init() to use a tmpfs instead of a block device or a file?

I realize there are sanity issues related to such an inquiry because the key is in RAM and so is the "disk."  Regardless, I have the question.

BTW, an older ramdisk (/dev/ram0) does appear to work.

Hugh
------=_Part_2276601_1257647630.1450897552994-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nekare.kjorling.se (nekare.kjorling.se [89.221.249.175]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Wed, 23 Dec 2015 20:32:10 +0100 (CET) Received: from yeono.kjorling.se (h-9-65.a328.priv.bahnhof.se [46.59.9.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "yeono", Issuer "yeono" (not verified)) by nekare.kjorling.se (Postfix) with ESMTPS id 37CC311411E for ; Wed, 23 Dec 2015 19:32:02 +0000 (UTC) Received: from yeono.kjorling.se (localhost [127.0.0.1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by yeono (Postfix) with ESMTPS id 00DE11675 for ; Wed, 23 Dec 2015 20:32:01 +0100 (CET) Date: Wed, 23 Dec 2015 19:32:00 +0000 From: Michael =?utf-8?B?S2rDtnJsaW5n?= Message-ID: <20151223193200.GU13282@yeono.kjorling.se> References: <1738110781.2276602.1450897552997.JavaMail.yahoo.ref@mail.yahoo.com> <1738110781.2276602.1450897552997.JavaMail.yahoo@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1738110781.2276602.1450897552997.JavaMail.yahoo@mail.yahoo.com> Subject: Re: [dm-crypt] Can LUKS be used on a tmpfs? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On 23 Dec 2015 19:05 +0000, from hmccurdy@yahoo.com (H McCurdy): > Is it possible to get crypt_init() to use a tmpfs instead of a block > device or a file? Not sure exactly what you are looking to do, but you can't put a tmpfs on any storage-backed device. You could however create a temporary (likely sparse) file, store that file in a tmpfs, and create a LUKS container within that file, with a normal file system inside the container which you can use to store data. Would be quite a lot of overhead, though. And you need to be root to mount a tmpfs in the first place, unless you set it up in fstab with a "user" directive, which would sort of defeat the point. Isn't it easier to just set appropriate permissions on a tmpfs (or even ramfs, which would prevent ever writing the data to disk)? You'd get pretty much the same results, minus virtually all the overhead... -- Michael Kjörling • https://michael.kjorling.se • michael@kjorling.se “People who think they know everything really annoy those of us who know we don’t.” (Bjarne Stroustrup) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mps1.wohnheimg.uni-frankfurt.de (mps1.wohnheimg.uni-frankfurt.de [141.2.118.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Wed, 23 Dec 2015 20:36:49 +0100 (CET) Received: from p4fe8581a.dip0.t-ipconnect.de ([79.232.88.26] helo=[192.168.0.11]) (Authed sender Sven 'DarKRaveR' Eschenberg) by mps1.wohnheimg.uni-frankfurt.de via ESMTPSA (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim) (envelope-from ) id 1aBpDM-0008Ib-L9 for dm-crypt@saout.de; Wed, 23 Dec 2015 20:36:49 +0100 References: <1738110781.2276602.1450897552997.JavaMail.yahoo.ref@mail.yahoo.com> <1738110781.2276602.1450897552997.JavaMail.yahoo@mail.yahoo.com> From: Sven Eschenberg Message-ID: <567AF7D3.5020704@whgl.uni-frankfurt.de> Date: Wed, 23 Dec 2015 20:36:51 +0100 MIME-Version: 1.0 In-Reply-To: <1738110781.2276602.1450897552997.JavaMail.yahoo@mail.yahoo.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] Can LUKS be used on a tmpfs? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Simply short: No. tmpfs is, as the name suggests, a filesystem, which lives in the VFS domain, whereas dmcrypt lives in the block layer. So yes, ramdisks in the form of blockdevices will work. It might even possibly work on a file within the tmpfs. (Give is a try [there's still loopback devices..], afterall it's all volatile memory and fiddling around does not need any extra work) Regards -Sven Am 23.12.2015 um 20:05 schrieb H McCurdy: > Hi, > > Is it possible to get crypt_init() to use a tmpfs instead of a block > device or a file? > > I realize there are sanity issues related to such an inquiry because the > key is in RAM and so is the "disk." Regardless, I have the question. > > BTW, an older ramdisk (/dev/ram0) does appear to work. > > Hugh > > > _______________________________________________ > dm-crypt mailing list > dm-crypt@saout.de > http://www.saout.de/mailman/listinfo/dm-crypt > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Wed, 23 Dec 2015 20:39:29 +0100 (CET) Received: by mail-wm0-x234.google.com with SMTP id p187so160603699wmp.0 for ; Wed, 23 Dec 2015 11:39:29 -0800 (PST) References: <1738110781.2276602.1450897552997.JavaMail.yahoo.ref@mail.yahoo.com> <1738110781.2276602.1450897552997.JavaMail.yahoo@mail.yahoo.com> From: Milan Broz Message-ID: <567AF86D.7040509@gmail.com> Date: Wed, 23 Dec 2015 20:39:25 +0100 MIME-Version: 1.0 In-Reply-To: <1738110781.2276602.1450897552997.JavaMail.yahoo@mail.yahoo.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] Can LUKS be used on a tmpfs? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: H McCurdy , "dm-crypt@saout.de" On 12/23/2015 08:05 PM, H McCurdy wrote: > Hi, > > Is it possible to get crypt_init() to use a tmpfs instead of a block > device or a file? No, dm-crypt works only over block devices (/dev/ram* are block devices as well). You can create a file on tmpfs and use that through loopback though (but this adds another layer there). Milan