LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] fs: ntfs: Mark NTFS_RW as BROKEN for PPC
@ 2021-11-22 20:13 Guenter Roeck
  2021-11-22 20:23 ` Linus Torvalds
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2021-11-22 20:13 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. Mark NTFS_RW
as broken 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>
---
The Kconfig language does not support "depends on XXX if YYY",
so this is the next best choice.

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

diff --git a/fs/ntfs/Kconfig b/fs/ntfs/Kconfig
index 1667a7e590d8..094ddef6010a 100644
--- a/fs/ntfs/Kconfig
+++ b/fs/ntfs/Kconfig
@@ -51,6 +51,7 @@ config NTFS_DEBUG
 
 config NTFS_RW
 	bool "NTFS write support"
+	depends on BROKEN || !PPC
 	depends on NTFS_FS
 	help
 	  This enables the partial, but safe, write support in the NTFS driver.
-- 
2.33.0


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

* Re: [PATCH] fs: ntfs: Mark NTFS_RW as BROKEN for PPC
  2021-11-22 20:13 [PATCH] fs: ntfs: Mark NTFS_RW as BROKEN for PPC Guenter Roeck
@ 2021-11-22 20:23 ` Linus Torvalds
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 2021-11-22 20:23 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Anton Altaparmakov, linux-ntfs-dev, Linux Kernel Mailing List,
	Michael Ellerman, Stephen Rothwell

On Mon, Nov 22, 2021 at 12:13 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> The Kconfig language does not support "depends on XXX if YYY",
> so this is the next best choice.

Ugh. This is hard to read, and it will get much worse if we then end
up making the conditional more complicated if we actually want to
introduce some page size logic..

>  config NTFS_RW
>         bool "NTFS write support"
> +       depends on BROKEN || !PPC
>         depends on NTFS_FS
>         help
>           This enables the partial, but safe, write support in the NTFS driver.

How about we do a

  config DISABLE_NTFS_RW
        bool
        default y if PPC

and then in NTFS_RW we just do

        depends on !DISABLE_NTFS_RW

which at least makes each case easy, and makes it much clearer if we
extend that DISABLE_NTFS_RW condition later.

                 Linus

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

end of thread, other threads:[~2021-11-22 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 20:13 [PATCH] fs: ntfs: Mark NTFS_RW as BROKEN for PPC Guenter Roeck
2021-11-22 20:23 ` Linus Torvalds

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).