linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Anton Altaparmakov <anton@tuxera.com>,
	linux-ntfs-dev@lists.sourceforge.net,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH v2] fs: ntfs: Disable NTFS_RW for PPC
Date: Tue, 23 Nov 2021 01:15:11 +0000	[thread overview]
Message-ID: <CACPK8XfM1e7b6m_QBhJFgXCXhqOajMKGUkWqRGxa5sCKyLxRQg@mail.gmail.com> (raw)
In-Reply-To: <20211122230653.1779162-1-linux@roeck-us.net>

On Mon, 22 Nov 2021 at 23:58, Guenter Roeck <linux@roeck-us.net> wrote:
>
> 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.

It became the default for PPC_BOOK3S_64, which doesn't include all of
PPC, in f22969a66041 ("powerpc/64s: Default to 64K pages for 64 bit
book3s").

You might want to add a mention of this commit in your commit message.

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

PPC_64K_PAGES would be more accurate.

I think arm64 was seeing a similar build error, so you could include
ARM64_64K_PAGES as well?

> +
>  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
>

  reply	other threads:[~2021-11-23  1:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 23:06 [PATCH v2] fs: ntfs: Disable NTFS_RW for PPC Guenter Roeck
2021-11-23  1:15 ` Joel Stanley [this message]
2021-11-23  2:09   ` Guenter Roeck
2021-11-23 11:43     ` Michael Ellerman
2021-11-23 16:11       ` Guenter Roeck

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=CACPK8XfM1e7b6m_QBhJFgXCXhqOajMKGUkWqRGxa5sCKyLxRQg@mail.gmail.com \
    --to=joel@jms.id.au \
    --cc=anton@tuxera.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntfs-dev@lists.sourceforge.net \
    --cc=linux@roeck-us.net \
    --cc=mpe@ellerman.id.au \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).