* [PATCH] xfs: add CONFIG_MMU dependency
@ 2024-09-09 11:19 Arnd Bergmann
2024-09-09 13:42 ` Jan Kara
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2024-09-09 11:19 UTC (permalink / raw)
To: Chandan Babu R
Cc: Arnd Bergmann, Darrick J. Wong, Andrew Morton, Anthony Iliopoulos,
Lukas Bulwahn, Kees Cook, Kent Overstreet, Nathan Chancellor,
Suren Baghdasaryan, Josef Bacik, Jan Kara, Amir Goldstein,
linux-xfs, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
XFS no longer builds on kernels with MMU disabled:
arm-linux-gnueabi-ld: fs/xfs/xfs_file.o: in function `xfs_write_fault.constprop.0':
xfs_file.c:(.text.xfs_write_fault.constprop.0+0xc): undefined reference to `filemap_fsnotify_fault'
It's rather unlikely that anyone is using this combination,
so just add a Kconfig dependency.
Fixes: 436df5326f57 ("xfs: add pre-content fsnotify hook for write faults")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
fs/xfs/Kconfig | 1 +
lib/Kconfig.debug | 1 +
2 files changed, 2 insertions(+)
diff --git a/fs/xfs/Kconfig b/fs/xfs/Kconfig
index fffd6fffdce0..1834932a512d 100644
--- a/fs/xfs/Kconfig
+++ b/fs/xfs/Kconfig
@@ -2,6 +2,7 @@
config XFS_FS
tristate "XFS filesystem support"
depends on BLOCK
+ depends on MMU
select EXPORTFS
select LIBCRC32C
select FS_IOMAP
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 7c0546480078..8906e2cd1ed5 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2862,6 +2862,7 @@ config TEST_KMOD
depends on NETDEVICES && NET_CORE && INET # for TUN
depends on BLOCK
depends on PAGE_SIZE_LESS_THAN_256KB # for BTRFS
+ depends on MMU # for XFS_FS
select TEST_LKM
select XFS_FS
select TUN
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: add CONFIG_MMU dependency
2024-09-09 11:19 [PATCH] xfs: add CONFIG_MMU dependency Arnd Bergmann
@ 2024-09-09 13:42 ` Jan Kara
2024-09-10 8:08 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kara @ 2024-09-09 13:42 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Chandan Babu R, Arnd Bergmann, Darrick J. Wong, Andrew Morton,
Anthony Iliopoulos, Lukas Bulwahn, Kees Cook, Kent Overstreet,
Nathan Chancellor, Suren Baghdasaryan, Josef Bacik, Jan Kara,
Amir Goldstein, linux-xfs, linux-kernel
On Mon 09-09-24 11:19:00, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> XFS no longer builds on kernels with MMU disabled:
>
> arm-linux-gnueabi-ld: fs/xfs/xfs_file.o: in function `xfs_write_fault.constprop.0':
> xfs_file.c:(.text.xfs_write_fault.constprop.0+0xc): undefined reference to `filemap_fsnotify_fault'
>
> It's rather unlikely that anyone is using this combination,
> so just add a Kconfig dependency.
>
> Fixes: 436df5326f57 ("xfs: add pre-content fsnotify hook for write faults")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks! I've noticed the error from 0-day over the weekend as well. At this
point I'd rather handle this in a similar way as e.g. filemap_fault() is
handled in NOMMU case. I agree users of XFS (or bcachefs for that matter)
with !CONFIG_MMU are unlikely but fsnotify_filemap_fault() can grow more
users over time and providing the stub is easy enough. I'll push out fixed
version of the patch.
Honza
> ---
> fs/xfs/Kconfig | 1 +
> lib/Kconfig.debug | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/fs/xfs/Kconfig b/fs/xfs/Kconfig
> index fffd6fffdce0..1834932a512d 100644
> --- a/fs/xfs/Kconfig
> +++ b/fs/xfs/Kconfig
> @@ -2,6 +2,7 @@
> config XFS_FS
> tristate "XFS filesystem support"
> depends on BLOCK
> + depends on MMU
> select EXPORTFS
> select LIBCRC32C
> select FS_IOMAP
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 7c0546480078..8906e2cd1ed5 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -2862,6 +2862,7 @@ config TEST_KMOD
> depends on NETDEVICES && NET_CORE && INET # for TUN
> depends on BLOCK
> depends on PAGE_SIZE_LESS_THAN_256KB # for BTRFS
> + depends on MMU # for XFS_FS
> select TEST_LKM
> select XFS_FS
> select TUN
> --
> 2.39.2
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: add CONFIG_MMU dependency
2024-09-09 13:42 ` Jan Kara
@ 2024-09-10 8:08 ` Christoph Hellwig
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2024-09-10 8:08 UTC (permalink / raw)
To: Jan Kara
Cc: Arnd Bergmann, Chandan Babu R, Arnd Bergmann, Darrick J. Wong,
Andrew Morton, Anthony Iliopoulos, Lukas Bulwahn, Kees Cook,
Kent Overstreet, Nathan Chancellor, Suren Baghdasaryan,
Josef Bacik, Amir Goldstein, linux-xfs, linux-kernel
On Mon, Sep 09, 2024 at 03:42:19PM +0200, Jan Kara wrote:
> Thanks! I've noticed the error from 0-day over the weekend as well. At this
> point I'd rather handle this in a similar way as e.g. filemap_fault() is
> handled in NOMMU case. I agree users of XFS (or bcachefs for that matter)
> with !CONFIG_MMU are unlikely but fsnotify_filemap_fault() can grow more
> users over time and providing the stub is easy enough. I'll push out fixed
> version of the patch.
Yes, the stub is the right fix for this.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-10 8:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-09 11:19 [PATCH] xfs: add CONFIG_MMU dependency Arnd Bergmann
2024-09-09 13:42 ` Jan Kara
2024-09-10 8:08 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox