From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Guenter Roeck <linux@roeck-us.net>,
Anton Altaparmakov <anton@tuxera.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Sasha Levin <sashal@kernel.org>,
linux-ntfs-dev@lists.sourceforge.net
Subject: [PATCH AUTOSEL 4.4 9/9] fs: ntfs: Limit NTFS_RW to page sizes smaller than 64k
Date: Tue, 30 Nov 2021 09:54:02 -0500 [thread overview]
Message-ID: <20211130145402.947049-9-sashal@kernel.org> (raw)
In-Reply-To: <20211130145402.947049-1-sashal@kernel.org>
From: Guenter Roeck <linux@roeck-us.net>
[ Upstream commit 4eec7faf6775263d9e450ae7ee5bc4101d4a0bc9 ]
NTFS_RW code allocates page size dependent arrays on the stack. This
results in build failures if the page size is 64k or larger.
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
Since commit f22969a66041 ("powerpc/64s: Default to 64K pages for 64 bit
book3s") this affects ppc:allmodconfig builds, but other architectures
supporting page sizes of 64k or larger are also affected.
Increasing the maximum frame size for affected architectures just to
silence this error does not really help. The frame size would have to
be set to a really large value for 256k pages. Also, a large frame size
could potentially result in stack overruns in this code and elsewhere
and is therefore not desirable. Make NTFS_RW dependent on page sizes
smaller than 64k instead.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: Anton Altaparmakov <anton@tuxera.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ntfs/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ntfs/Kconfig b/fs/ntfs/Kconfig
index f5a868cc9152e..5b384ec44793f 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 NTFS_FS
+ depends on PAGE_SIZE_LESS_THAN_64KB
help
This enables the partial, but safe, write support in the NTFS driver.
--
2.33.0
next prev parent reply other threads:[~2021-11-30 15:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 14:53 [PATCH AUTOSEL 4.4 1/9] xen/privcmd: make option visible in Kconfig Sasha Levin
2021-11-30 14:53 ` [PATCH AUTOSEL 4.4 2/9] NFSv4.1: handle NFS4ERR_NOSPC by CREATE_SESSION Sasha Levin
2021-11-30 14:53 ` [PATCH AUTOSEL 4.4 3/9] HID: multitouch: Fix Iiyama ProLite T1931SAW (0eef:0001 again!) Sasha Levin
2021-11-30 14:53 ` [PATCH AUTOSEL 4.4 4/9] parisc: Provide an extru_safe() macro to extract unsigned bits Sasha Levin
2021-12-04 12:15 ` Pavel Machek
2021-12-04 14:57 ` Helge Deller
2021-11-30 14:53 ` [PATCH AUTOSEL 4.4 5/9] mmc: spi: Add device-tree SPI IDs Sasha Levin
2021-11-30 14:53 ` [PATCH AUTOSEL 4.4 6/9] smb2: clarify rc initialization in smb2_reconnect Sasha Levin
2021-11-30 14:54 ` [PATCH AUTOSEL 4.4 7/9] PM: hibernate: Fix snapshot partial write lengths Sasha Levin
2021-11-30 14:54 ` [PATCH AUTOSEL 4.4 8/9] net: ptp: add a definition for the UDP port for IEEE 1588 general messages Sasha Levin
2021-12-04 12:18 ` Pavel Machek
2021-11-30 14:54 ` Sasha Levin [this message]
2021-12-04 12:23 ` [PATCH AUTOSEL 4.4 9/9] fs: ntfs: Limit NTFS_RW to page sizes smaller than 64k Pavel Machek
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=20211130145402.947049-9-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=anton@tuxera.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntfs-dev@lists.sourceforge.net \
--cc=linux@roeck-us.net \
--cc=stable@vger.kernel.org \
--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).