From: Al Viro <viro@zeniv.linux.org.uk>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Christian Brauner <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-efi@vger.kernel.org,
Ard Biesheuvel <ardb@kernel.org>, Jeremy Kerr <jk@ozlabs.org>
Subject: Re: [PATCH 6/6] efivarfs: fix error on write to new variable leaving remnants
Date: Mon, 23 Dec 2024 23:12:18 +0000 [thread overview]
Message-ID: <20241223231218.GQ1977892@ZenIV> (raw)
In-Reply-To: <72a3f304b895084a1da0a8a326690a57fce541b7.camel@HansenPartnership.com>
On Mon, Dec 23, 2024 at 05:56:04PM -0500, James Bottomley wrote:
> > Let me look into that area...
>
> I thought about this some more. I could see a twisted container use
> case where something like this might happen (expose some but not all
> efi variables to the container).
>
> So, help me understand the subtleties here. If it's the target of a
> bind mount, that's all OK, because you are allowed to delete the
> target. If something is bind mounted on to an efivarfs object, the
> is_local_mountpoint() check in vfs_unlink would usually trip and
> prevent deletion (so the subtree doesn't become unreachable). If I
> were to duplicate that, I think the best way would be simply to do a
> d_put() in the file->release function and implement drop_nlink() in
> d_prune (since last put will always call __dentry_kill)?
Refcounting is not an issue. At all.
Inability to find and evict the mount, OTOH, very much is. And after your
blind d_delete() that's precisely what will happen.
You are steadily moving towards more and more convoluted crap, in places
where it really does not belong.
If anything, simple_recursive_removal() should be used for that, instead
of trying to open-code bizarre subsets of its functionality...
next prev parent reply other threads:[~2024-12-23 23:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 17:02 [PATCH 0/6] convert efivarfs to manage object data correctly James Bottomley
2024-12-10 17:02 ` [PATCH 1/6] efivarfs: remove unused efi_varaible.Attributes and .kobj James Bottomley
2024-12-10 17:02 ` [PATCH 2/6] efivarfs: add helper to convert from UC16 name and GUID to utf8 name James Bottomley
2024-12-10 17:02 ` [PATCH 3/6] efivarfs: make variable_is_present use dcache lookup James Bottomley
2024-12-10 17:14 ` Dionna Amalie Glaze
2024-12-10 17:27 ` James Bottomley
2024-12-23 20:20 ` Al Viro
2024-12-23 21:44 ` James Bottomley
2024-12-10 17:02 ` [PATCH 4/6] efivarfs: move freeing of variable entry into evict_inode James Bottomley
2024-12-11 11:19 ` Christian Brauner
2024-12-10 17:02 ` [PATCH 5/6] efivarfs: remove unused efivarfs_list James Bottomley
2024-12-10 17:02 ` [PATCH 6/6] efivarfs: fix error on write to new variable leaving remnants James Bottomley
2024-12-11 11:16 ` Christian Brauner
2024-12-11 12:39 ` James Bottomley
2024-12-23 19:52 ` James Bottomley
2024-12-23 20:05 ` Al Viro
2024-12-23 21:39 ` James Bottomley
2024-12-23 22:56 ` James Bottomley
2024-12-23 23:12 ` Al Viro [this message]
2024-12-24 4:04 ` James Bottomley
2024-12-24 4:44 ` Al Viro
2024-12-24 13:07 ` James Bottomley
2024-12-24 15:09 ` James Bottomley
2024-12-27 14:52 ` James Bottomley
2024-12-19 17:14 ` James Bottomley
2024-12-22 10:12 ` Christian Brauner
2024-12-23 19:44 ` James Bottomley
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=20241223231218.GQ1977892@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=James.Bottomley@hansenpartnership.com \
--cc=ardb@kernel.org \
--cc=brauner@kernel.org \
--cc=jk@ozlabs.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-fsdevel@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