From: Eric Biggers <ebiggers@google.com>
To: Davis Roman <davis.roman84@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Attempts to use ext4 encryption on kernel 4.1.15 keep resulting in kernel crash
Date: Fri, 16 Feb 2018 10:30:55 -0800 [thread overview]
Message-ID: <20180216183055.GA245245@google.com> (raw)
In-Reply-To: <CACfi_Z1Lf+VODomcoS3ekHexTjMueEDjdANmq2CvqTuJd=i-tQ@mail.gmail.com>
Hi Davis,
On Fri, Feb 16, 2018 at 11:04:32AM -0500, Davis Roman wrote:
> Hello,
>
> I would also like to enable ext4 encryption on our product. We're
> using a 4.1.15 kernel.
>
> Our kernel has CONFIG_KEYS and CONFIG_EXT4_ENCRYPTION enabled and I
> made sure to have an up to date version of e2fsprogs. We're using
> 1.43.8.
>
> Unfortunately, I get a kernel panic whenever I try the above steps show below.
>
> Any ideas on what I could do next would be extremely appreciated.
>
Is this reproducible on the latest 4.1-stable? 4.1.15 is over two years old so
you are missing thousands of bug fixes all over the kernel.
Also I don't in general recommend using ext4 encryption on 4.1 kernels at all,
as that was the first kernel version ever to have ext4 encryption and it is
missing a lot of bug fixes that haven't been backported. I've been backporting
fixes to 4.4, but 4.1 has just been too broken to bother most of the time.
> [<8001f9e8>] (v7_dma_clean_range) from [<8001b8b0>]
> (__dma_page_cpu_to_dev+0x28/0x94)
> [<8001b8b0>] (__dma_page_cpu_to_dev) from [<8001b9d0>]
> (arm_dma_map_page+0x70/0x74)
> [<8001b9d0>] (arm_dma_map_page) from [<8058f33c>]
> (ablkcipher_edesc_alloc.constprop.1+0x180/0x568)
> [<8058f33c>] (ablkcipher_edesc_alloc.constprop.1) from [<8058f740>]
> (ablkcipher_encrypt+0x1c/0x90)
> [<8058f740>] (ablkcipher_encrypt) from [<801b4f50>]
> (ext4_derive_key_aes+0x104/0x15c)
> [<801b4f50>] (ext4_derive_key_aes) from [<801b5114>]
> (ext4_generate_encryption_key+0x16c/0x1bc)
But in this case it actually crashed in some hardware crypto driver (maybe CAAM?
you didn't say) so the bug is probably there, not in ext4. Maybe the crypto
driver you are using doesn't handle ECB mode correctly. Have you checked
whether there have been any bug fixes to it within the last 2 years...?
Eric
prev parent reply other threads:[~2018-02-16 18:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-16 16:04 Attempts to use ext4 encryption on kernel 4.1.15 keep resulting in kernel crash Davis Roman
2018-02-16 18:30 ` Eric Biggers [this message]
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=20180216183055.GA245245@google.com \
--to=ebiggers@google.com \
--cc=davis.roman84@gmail.com \
--cc=linux-ext4@vger.kernel.org \
/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).