Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1678905 > unrolled thread

fscrypt request_module() deadlock

Started byRichard Weinberger <richard@nod.at>
First post2017-06-30 17:30 +0200
Last post2017-06-30 17:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  fscrypt request_module() deadlock Richard Weinberger <richard@nod.at> - 2017-06-30 17:30 +0200

#1678905 — fscrypt request_module() deadlock

FromRichard Weinberger <richard@nod.at>
Date2017-06-30 17:30 +0200
Subjectfscrypt request_module() deadlock
Message-ID<tY61P-7aE-5@gated-at.bofh.it>
Hi!

David and I faced a deadlock with switch_root when fscrypt was in use.
When /sbin/modprobe is encrypted using fscrypt and no other kernel component
requested an AES cipher before, first access to an encrypted file will trigger the
module_request() function, which will execute usermode helper /sbin/modprobe.
Is /sbin/modprobe also encrypted the kernel will deadlock because executing
it will again enter the module_request() path...

As workaround we currently do something like "ls /new_root > /dev/null" in our
initramfs to make request_module() happen before we change the root directory
to /new_root.

While this workaround is legit we think that this could be handled better.
Is there a way to request these ciphers before first usage? Herbert?
e.g. such that the filesystem can request them upon mount time.

Btw: This happens even when AES modules are builtins.

Thanks,
//richard

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web