linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Limit NTFS_RW to page sizes smaller than 64k
@ 2021-11-27 15:44 Guenter Roeck
  2021-11-27 15:44 ` [PATCH v3 1/3] arch: Add generic Kconfig option indicating page size " Guenter Roeck
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Guenter Roeck @ 2021-11-27 15:44 UTC (permalink / raw)
  To: Anton Altaparmakov
  Cc: linux-ntfs-dev, linux-kernel, David S . Miller, netdev,
	Joel Stanley, Michael Ellerman, Stephen Rothwell, Linus Torvalds,
	Arnd Bergmann, Guenter Roeck

This is the third attempt to fix the following build error.

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

The problem is that NTFS_RW code allocates page size dependent arrays on
the stack. This results in build failures if the page size is 64k or
larger.

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.

Previous attempts to fix the problem were local to the ntfs subsystem.
This attempt introduces the architecture independent configuration flag
PAGE_SIZE_LESS_THAN_64KB and uses it to restrict NTFS_RW. The last patch
of the series replaces a similar restriction for VMXNET3 with the new
flag. This patch is not necessary to fix the NTFS_RW problem and is
provided only for completeness.

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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-27 15:44 [PATCH v3 0/3] Limit NTFS_RW to page sizes smaller than 64k Guenter Roeck
2021-11-27 15:44 ` [PATCH v3 1/3] arch: Add generic Kconfig option indicating page size " Guenter Roeck
2021-11-27 15:44 ` [PATCH v3 2/3] fs: ntfs: Limit NTFS_RW to page sizes " Guenter Roeck
2021-11-27 15:44 ` [PATCH v3 3/3] vmxnet3: Use generic Kconfig option for page size limit Guenter Roeck
2021-11-27 17:49 ` [PATCH v3 0/3] Limit NTFS_RW to page sizes smaller than 64k Linus Torvalds
2021-11-27 22:26   ` Guenter Roeck
2021-11-27 22:31     ` Linus Torvalds
2021-11-27 22:44       ` Anton Altaparmakov

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