From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DC29C433F5 for ; Tue, 30 Nov 2021 15:04:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243109AbhK3PIE (ORCPT ); Tue, 30 Nov 2021 10:08:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244773AbhK3PCl (ORCPT ); Tue, 30 Nov 2021 10:02:41 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1703EC08EA7B; Tue, 30 Nov 2021 06:54:03 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B3FACB81A52; Tue, 30 Nov 2021 14:54:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C78C1C53FD1; Tue, 30 Nov 2021 14:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638284041; bh=sv6SHN8BiLPKNf1x5CfhepLuwQcvghPgfP6OXk2juBA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FXAfrKLogSUAQGVD/j+etukD7UoKbKr/SNt83ehkdtdeagTfb7Um8939EAQwYYPNh oqWRzvGjGjFp1k6+W2wYVpWJaoNfpWHI2NGnSah/DkWWoGmrhhuiVv5lheaQQGi+HB 09YtKNdDvx1F95CxgvPc4dSfdv0Zz4F150bU44j5djijNYTFt7u3KVEKvjHxOwNP7n 0C1RTte8Zk0CF8pnA+XkvZeSn0sK3V6Vq3t4hKtYg8Rh+CiiDF9+wlpbs0ffMBlQCY wMp4YVZ2HY5GMw6Wgzx6URWSAh99pTKVr/FYcH3D2H8p8g7La3o2HTTN1KWqdHntwf TpAgGvbJy4ZyA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Guenter Roeck , Anton Altaparmakov , Linus Torvalds , Sasha Levin , linux-ntfs-dev@lists.sourceforge.net Subject: [PATCH AUTOSEL 4.9 12/12] fs: ntfs: Limit NTFS_RW to page sizes smaller than 64k Date: Tue, 30 Nov 2021 09:53:40 -0500 Message-Id: <20211130145341.946891-12-sashal@kernel.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211130145341.946891-1-sashal@kernel.org> References: <20211130145341.946891-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guenter Roeck [ 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 Cc: Anton Altaparmakov Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- 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