public inbox for ecryptfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Tyler Hicks <code@tyhicks.com>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Arnd Bergmann <arnd@arndb.de>,
	ecryptfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: ecryptfs is unmaintained and untested
Date: Mon, 28 Oct 2024 15:02:12 +0000	[thread overview]
Message-ID: <Zx-ndBo7wpYSHWPK@casper.infradead.org> (raw)
In-Reply-To: <20241028141955.639633-1-arnd@kernel.org>

On Mon, Oct 28, 2024 at 02:18:45PM +0000, Arnd Bergmann wrote:
> The ecryptfs file system uses functions from fs/buffer.c that
> are only available when CONFIG_BUFFER_HEAD is enabled:
> 
> ld.lld-20: error: undefined symbol: block_dirty_folio
> >>>               vmlinux.o:(ecryptfs_aops)
> ld.lld-20: error: undefined symbol: block_invalidate_folio
> >>>               vmlinux.o:(ecryptfs_aops)
> 
> When CONFIG_BLOCK is turned off completely, this is not needed,
> so add a conditional 'select BUFFER_HEAD'.

The comment says it doesn't work without CONFIG_BLOCK:

        /*
         * XXX: This is pretty broken for multiple reasons: ecryptfs does not
         * actually use buffer_heads, and ecryptfs will crash without
         * CONFIG_BLOCK.  But it matches the behavior before the default for
         * address_space_operations without the ->dirty_folio method was
         * cleaned up, so this is the best we can do without maintainer
         * feedback.

This comment has been there since June 2021, so I think we can just
delete ecryptfs now?

If we can't delete it for some reason, I think we can use
filemap_dirty_folio() and remove the setting of invalidate_folio()
as block_invalidate_folio() is a no-op if there are no folio_buffers.
ie this in lieu of your patch:

+++ b/fs/ecryptfs/mmap.c
@@ -514,17 +514,9 @@ static sector_t ecryptfs_bmap(struct address_space *mapping, sector_t block)
 
 const struct address_space_operations ecryptfs_aops = {
        /*
-        * XXX: This is pretty broken for multiple reasons: ecryptfs does not
-        * actually use buffer_heads, and ecryptfs will crash without
-        * CONFIG_BLOCK.  But it matches the behavior before the default for
-        * address_space_operations without the ->dirty_folio method was
-        * cleaned up, so this is the best we can do without maintainer
-        * feedback.
+        * XXX: This entire filesystem is unmaintained and untested.
         */
-#ifdef CONFIG_BLOCK
-       .dirty_folio    = block_dirty_folio,
-       .invalidate_folio = block_invalidate_folio,
-#endif
+       .dirty_folio = filemap_dirty_folio,
        .writepages = ecryptfs_writepages,
        .read_folio = ecryptfs_read_folio,
        .write_begin = ecryptfs_write_begin,


  reply	other threads:[~2024-10-28 15:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 14:18 [PATCH] eccryptfs: select CONFIG_BUFFER_HEAD Arnd Bergmann
2024-10-28 15:02 ` Matthew Wilcox [this message]
2024-10-28 21:50   ` ecryptfs is unmaintained and untested Arnd Bergmann
2024-10-29  4:33     ` Theodore Ts'o
2024-10-30 21:06       ` Tyler Hicks
2026-02-16 11:53         ` René Herman
2025-10-14  6:07       ` John Stultz
2025-10-14 14:39         ` Theodore Ts'o
2025-10-14 16:38           ` John Stultz
2025-10-14 16:54             ` Martin Steigerwald
2025-10-14 17:52             ` Theodore Ts'o
2025-10-14 16:52           ` Martin Steigerwald
2025-10-14 20:35           ` Eric Biggers
2025-10-15  1:31             ` Theodore Ts'o
2025-10-15  2:23               ` Eric Biggers

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=Zx-ndBo7wpYSHWPK@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=code@tyhicks.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=ecryptfs@vger.kernel.org \
    --cc=linux-kernel@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