From: Christoph Hellwig <hch@lst.de>
To: Jan Kara <jack@suse.cz>
Cc: Christian Brauner <brauner@kernel.org>,
Christoph Hellwig <hch@lst.de>,
Shakeel Butt <shakeel.butt@linux.dev>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Jens Axboe <axboe@kernel.dk>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
io-uring@vger.kernel.org, linux-block@vger.kernel.org,
linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org,
target-devel@vger.kernel.org, linux-unionfs@vger.kernel.org,
bpf@vger.kernel.org, linux-nfs@vger.kernel.org,
stable@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Boqun Feng <boqun@kernel.org>, Waiman Long <longman@redhat.com>
Subject: Re: [PATCH 07/12] zloop: take freeze protection when recording write pointers
Date: Fri, 20 Nov 2026 16:44:09 +0100 [thread overview]
Message-ID: <20261120154409.GD28611@lst.de> (raw)
In-Reply-To: <t73376p7ip4bvetjbqijzugvglhi2rdxsqt62l3uuqtmt3tqgk@2rlkkdy33hwk>
On Mon, Nov 16, 2026 at 12:57:09PM +0100, Jan Kara wrote:
> On Mon 16-11-26 10:41:49, Christian Brauner wrote:
> > Fwiw, the check can't go into __vfs_setxattr(), __vfs_setxattr_noperm()
> > or __vfs_removexattr(). cap_inode_killpriv(), IMA and EVM call those
> > from ->write_iter() via file_remove_privs() and kiocb_start_write()
> > hides the freeze protection from lockdep for aio and io_uring. I have
> > not bothered to figure out why. Maybe you already know? In any case,
> > until that's fixed we can't place it there which means this doesn't
> > catch IMA/EVM at which point this patch becomes pointless.
>
> It's because of AIO and io_uring - if you don't hide the protection from
> lockdep, it will complain about it when returning to userspace while IO is
> still in flight (and thus protection is held). Sadly lockdep does not
> support releasing resources by anybody else than the process which acquired
> it so we fool it in this way...
Can we try to escalate this to the lockdep folks instead of piling hacks
deeper and deeper?
>
> Honza
> --
> Jan Kara <jack@suse.com>
> SUSE Labs, CR
---end quoted text---
next prev parent reply other threads:[~2026-11-20 15:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 10:47 [PATCH 00/12] fs: take freeze protection for writes to backing files Christian Brauner
2026-11-14 10:47 ` [PATCH 01/12] fs: add kiocb_start_write_trylock() Christian Brauner
2026-11-16 11:57 ` Jan Kara
2026-11-14 10:47 ` [PATCH 02/12] zloop: take freeze protection for writes Christian Brauner
2026-11-16 6:46 ` Christoph Hellwig
2026-11-14 10:47 ` [PATCH 03/12] nvmet: take freeze protection for writes to files Christian Brauner
2026-11-14 10:47 ` [PATCH 04/12] target: fileio: don't free the aio command under the filesystem Christian Brauner
2026-11-14 11:25 ` sashiko-bot
2026-11-15 9:30 ` Christian Brauner
2026-11-14 10:47 ` [PATCH 05/12] target: fileio: take freeze protection for aio writes Christian Brauner
2026-11-14 10:47 ` [PATCH 06/12] loop: take freeze protection for discard and write zeroes Christian Brauner
2026-11-16 11:59 ` Jan Kara
2026-11-14 10:47 ` [PATCH 07/12] zloop: take freeze protection when recording write pointers Christian Brauner
2026-11-16 6:48 ` Christoph Hellwig
2026-11-16 9:41 ` Christian Brauner
2026-11-16 11:57 ` Jan Kara
2026-11-20 15:44 ` Christoph Hellwig [this message]
2026-11-14 10:47 ` [PATCH 08/12] target: fileio: take freeze protection for unmap Christian Brauner
2026-11-14 10:47 ` [PATCH 09/12] coredump: take freeze protection for the truncate Christian Brauner
2026-11-14 10:47 ` [PATCH 10/12] ovl: take freeze protection when storing the uuid Christian Brauner
2026-11-14 12:19 ` Amir Goldstein
2026-11-14 10:47 ` [PATCH 11/12] bpf: fs/xattr: take freeze protection in the xattr kfuncs Christian Brauner
2026-11-14 11:11 ` sashiko-bot
2026-11-14 11:37 ` Christian Brauner
2026-11-14 10:47 ` [PATCH 12/12] nfsd: take freeze protection for the truncate on open Christian Brauner
2026-11-14 12:31 ` [PATCH 00/12] fs: take freeze protection for writes to backing files Amir Goldstein
2026-11-14 13:04 ` Christian Brauner
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=20261120154409.GD28611@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=boqun@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=io-uring@vger.kernel.org \
--cc=jack@suse.cz \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=shakeel.butt@linux.dev \
--cc=stable@vger.kernel.org \
--cc=target-devel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.