dm-crypt.saout.de archive mirror
 help / color / mirror / Atom feed
From: Andrii Voloshyn <a.voloshyn@d.mobilunity.com>
To: dm-crypt <dm-crypt@saout.de>
Subject: [dm-crypt] Using dm-verity+dm-crypt on rootfs (Embedded Linux)
Date: Fri, 07 Aug 2020 12:15:28 +0300	[thread overview]
Message-ID: <173c83429e8.ccbeba0f94728.5730675362566872944@d.mobilunity.com> (raw)
In-Reply-To: 

[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]

Hi there,



      Spent quite some time looking on the Internet for a reference, and couldn't find anything that would satisfy my requirements.

Let's imagine an Embedded Linux setup, where size of the NOR flash is limited to say 16MB, root filesystem is squashfs, and assume

that the bootloader (U-Boot) is trusted, and it validates kernel+dts. Alright, now I need to check validity of the rootfs, plus it needs to be

encrypted, and failsafe  (in case power is gone while writing to the flash). So I guess, I need to use a combination dm-verity+dm-crypt?

      

      From my experiments, I found out that I couldn't really use LUKS, as the header size would not fit into the flash. So I need to use plain mode, and that's Ok.

      Now, the question is, what information to pass to the kernel, and how (bootargs?, initrd?), so that it could verify and mount encrypted squashfs as rootfs?

      Have seen a lot of articles how to get it done on a partition, USB drive, etc. but not as the rootfs.

Any reference on any project already existing or documentation would be helpful. Or, any thoughts on how it could be done differently?



Thank you for your wisdom



Cheers,

Andrew

[-- Attachment #2: Type: text/html, Size: 1789 bytes --]

             reply	other threads:[~2020-08-07  9:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07  9:15 Andrii Voloshyn [this message]
2020-08-08  9:10 ` [dm-crypt] Using dm-verity+dm-crypt on rootfs (Embedded Linux) Milan Broz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=173c83429e8.ccbeba0f94728.5730675362566872944@d.mobilunity.com \
    --to=a.voloshyn@d.mobilunity.com \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).