From: Eric Biggers <ebiggers@kernel.org>
To: Yuvaraj Ranganathan <yrangana@qti.qualcomm.com>
Cc: "linux-fscrypt@vger.kernel.org" <linux-fscrypt@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Software encryption at fscrypt causing the filesystem access unresponsive
Date: Thu, 25 Jul 2024 00:51:53 -0700 [thread overview]
Message-ID: <20240725075153.GA160096@sol.localdomain> (raw)
In-Reply-To: <PH0PR02MB731916ECDB6C613665863B6CFFAA2@PH0PR02MB7319.namprd02.prod.outlook.com>
On Wed, Jul 24, 2024 at 02:21:26PM +0000, Yuvaraj Ranganathan wrote:
> [ 1694.987674] INFO: task kworker/u16:3:2154 blocked for more than 120 seconds.
> [ 1694.995628] Tainted: G W O 6.6.33-debug #1
> [ 1695.002335] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> [ 1695.011094] task:kworker/u16:3 state:D stack:0 pid:2154 ppid:2 flags:0x00000208
> [ 1695.011097] Workqueue: writeback wb_workfn (flush-8:0)
> [ 1695.011101] Call trace:
> [ 1695.011102] __switch_to+0xf0/0x16c
> [ 1695.011104] __schedule+0x334/0x980
> [ 1695.011105] schedule+0x5c/0xf8
> [ 1695.011107] schedule_timeout+0x19c/0x1c0
> [ 1695.011110] wait_for_completion+0x78/0x188
> [ 1695.011111] fscrypt_crypt_block+0x218/0x25c
> [ 1695.011114] fscrypt_encrypt_pagecache_blocks+0x104/0x1b4
> [ 1695.011117] ext4_bio_write_folio+0x534/0x7a8
> [ 1695.011119] mpage_submit_folio+0x70/0x98
> [ 1695.011120] mpage_map_and_submit_buffers+0x158/0x2c8
> [ 1695.011122] ext4_do_writepages+0x788/0xbfc
> [ 1695.011124] ext4_writepages+0x7c/0xfc
I think this is the important part. It's showing that the call into the crypto
API to actually encrypt the data is hanging.
What I suspect is that you are *not* actually using software encryption, but
rather a buggy driver for an off-CPU crypto accelerator. This would happen if
your driver registers itself with the crypto API with a higher priority than the
software algorithm you intended to use.
To check what driver is being used, you can either check for a kernel log
message that looks like 'fscrypt: AES-256-XTS using implementation
"xts-aes-ce"', or check /proc/crypto for which xts(aes) algorithm has the
highest priority.
Which driver are you using, and is it upstream?
- Eric
prev parent reply other threads:[~2024-07-25 7:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 14:21 Software encryption at fscrypt causing the filesystem access unresponsive Yuvaraj Ranganathan
2024-07-24 16:21 ` Theodore Ts'o
2024-07-25 7:21 ` Yuvaraj Ranganathan (QUIC)
2024-07-25 7:51 ` 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=20240725075153.GA160096@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yrangana@qti.qualcomm.com \
/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