linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] fs: ntfs: Disable NTFS_RW for PPC
@ 2021-11-22 23:06 Guenter Roeck
  2021-11-23  1:15 ` Joel Stanley
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2021-11-22 23:06 UTC (permalink / raw)
  To: Anton Altaparmakov
  Cc: linux-ntfs-dev, linux-kernel, Guenter Roeck, Michael Ellerman,
	Stephen Rothwell, Linus Torvalds

NTFS_RW code allocates page size dependent arrays on the stack. This
results in build failures if the page size is 64k, which is now the
default for PPC.

fs/ntfs/aops.c: In function 'ntfs_write_mst_block':
fs/ntfs/aops.c:1311:1: error:
	the frame size of 2240 bytes is larger than 2048 bytes

Increasing the maximum frame size for PPC just to silence this error does
not really help. It would have to be set to a really large value for 256k
pages. Such a large frame size could potentially result in stack overruns
in this code and elsewhere and is therefore not desirable. Disable NTFS_RW
for PPC instead.

Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v2: Introduce new configuration flag DISABLE_NTFS_RW and use it to disable NTFS_RW
    for PPC

 fs/ntfs/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/ntfs/Kconfig b/fs/ntfs/Kconfig
index 1667a7e590d8..324224febb6a 100644
--- a/fs/ntfs/Kconfig
+++ b/fs/ntfs/Kconfig
@@ -49,8 +49,13 @@ config NTFS_DEBUG
 	  When reporting bugs, please try to have available a full dump of
 	  debugging messages while the misbehaviour was occurring.
 
+config DISABLE_NTFS_RW
+	bool
+	default y if PPC
+
 config NTFS_RW
 	bool "NTFS write support"
+	depends on !DISABLE_NTFS_RW
 	depends on NTFS_FS
 	help
 	  This enables the partial, but safe, write support in the NTFS driver.
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-23 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 23:06 [PATCH v2] fs: ntfs: Disable NTFS_RW for PPC Guenter Roeck
2021-11-23  1:15 ` Joel Stanley
2021-11-23  2:09   ` Guenter Roeck
2021-11-23 11:43     ` Michael Ellerman
2021-11-23 16:11       ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).