Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753818AbdFSPux (ORCPT ); Mon, 19 Jun 2017 11:50:53 -0400 Received: from mail-by2nam03on0061.outbound.protection.outlook.com ([104.47.42.61]:35872 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752662AbdFSPuq (ORCPT ); Mon, 19 Jun 2017 11:50:46 -0400 Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=caviumnetworks.com; From: Yury Norov To: Catalin Marinas , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Yury Norov , Adam Borowski , Andreas Schwab , Andrew Pinski , Bamvor Zhangjian , Chris Metcalf , Chris Metcalf , Florian Weimer , Heiko Carstens , James Hogan , James Morse , Joseph Myers , Maxim Kuvyrkov , Nathan_Lynch@mentor.com, Prasun.Kapoor@caviumnetworks.com, Ramana Radhakrishnan , Steve Ellcey , Alexander Graf , Mark Brown , christoph.muellner@theobroma-systems.com, davem@davemloft.net, Geert Uytterhoeven , Alexey Klimov , linyongting@huawei.com, manuel.montezelo@gmail.com, philipp.tomsich@theobroma-systems.com, schwidefsky@de.ibm.com, szabolcs.nagy@arm.com, zhouchengming1@huawei.com Subject: [PATCH 02/20] 32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option Date: Mon, 19 Jun 2017 18:49:45 +0300 Message-Id: <20170619155003.13218-3-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170619155003.13218-1-ynorov@caviumnetworks.com> References: <20170619155003.13218-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [85.253.137.34] X-ClientProxiedBy: AM5PR0402CA0007.eurprd04.prod.outlook.com (10.175.37.17) To BLUPR0701MB1858.namprd07.prod.outlook.com (10.162.88.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dafc1f75-ac10-4b1d-be8e-08d4b72af0dc X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:BLUPR0701MB1858; X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1858;3:E4mRSUjmVar1I2iUiqAzeWoDJEiLZ/mDmj7ei06N9zYOGU1UcUwzxDJAXJQLJ9FRsSRd92dRU/MCk1PVTOutrEkumGecvlr7nwSoxkny3vDDGfDQA/comz/kCTNCyuxs3ppppqVsbOCV5wAc0awlUgHHy9AXz2xSR8Te9yY/sjaAl5IhLcG356wRmzrj4gWbgAFnHhBnSybOiZYKzRlqpYuVPIHsLYLDL+SCKA8Jy6KIrOvluZKH9lDUTNVPrqxGOrzkLHfCg0EqO0ksBaP1yzCP+2LmUwxmZiUwmeT9aVJL+GyPq1kk2NiZJtvzyfLTmCamxtqmc7wjvXac6W/ZQA==;25:bMtOUsVwohj8XgPznRXUXtBcIKJ2D1S7mLrVNtB+y1hHFLp1arKKk0fd9DculgOBzy4+Dv2p5A2rPtoQZnSRzhyMblSlfjnI4ymUT2eviMHYe3lcHJqoD3vro0tbspJAWiWlkipYm8CYQSLQlOoanlONDbVC7RpvfOPb0kxDx2QVlVnUdz6AQ2qqY3fJ3WWWgwBnat1DW8NRyDFpmu8xnI72o8X/tkBym2ningGEDD58iHwGlqEL9hm46bZ3USkli8Mcg/lktYoU71BZvXsajHE6lfbLyhmr/jhQMMsQkLC98iIW3Vvudff7u/veC2bwfFlw52+fG9UY4Pmrpv99F/vYqRUjwuoWhz++6JSnpGZ37TLIgt1YeXppn4Ag/G5GiBi4yQ57yyIi9ZXQAID9GGlcwFcOVrO/ys2WufkG28lrK9mbL65mwK5Wct27TE1cni39DWLlNT6IYkdmj7Z3KNuPfoEW+Stsw2yCxf/o1/Q= X-MS-TrafficTypeDiagnostic: BLUPR0701MB1858: X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1858;31:JsCnUxwwJQkuVLGPdO1g09Opc+hyhRNIUpstsctCQE6eZOORIpONGnCPAQXcxs7UE9DOjm5V98eAVMsTXPjVURP/kC9oyENO0umucgVtJe5FM97HZPHurqKfVpuhUxvvgT1VgJerbZFu5oje7as+n34qYMarpDrxT+TGcoEeq3vaFhptE3ELWXK4ELlIMrVJry4PrMIiej5XovoK/cSlgw2mrI4BzKK0PAkXB5VIpU8=;20:JZAbhpKXB9zKPrXGtpGGzjrhyKyTAFfbFWlgyVItrQgUM+O9+5wXYBJZCNeawOQXsIFMBzbm4YwBrte9M9xjexUfAfTjtgd7omMa3jGcIFlPBeUzwW89LGobHVBZaBExHtCraFjmbMJ/2IAo5B7y9rYU84A5zS7r71Vaqmq2NrhHfiRQZc0+JQp7+FvNCbZh6XAp670TZSy3jzaqQ1OhyNcLVmk+nPjWfqKo9gxsCdF0ACXbfzCtLNvF2LXMzkRtDpk7PEjrOkjYWoOojaHYThDC8RGagTPesUyxwOf6Ry2uPo2+2yw1/oevbdNJexkNOH4/sRMXkcHAU4dSVj4SOiP0dxUVkQaxsMLGonuP0wgZfVqr4Y/IMtQEtdkvlWZDgiUToWuVQO60GL7XmuBihXTUovu9R3PR3pYuwgavc0rytSeQZiqipdj7RPG1tTksNJ6aa7/mF4gviHE16ritwOiz4LdA1sfQxQPcHEtyj+Ccdq89G6KAyH6Qunnj2RAfbr/Mzuy8mk8QMRUXoAcqY3GsrFxW/5bGeAOHKojNLAAHyU3+wZaptxauQRWTsHpTgcUGgq+U1ix1cCZgQfEPLo/EdFiovPk1PPwSoeWrRx4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(5213294742642); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BLUPR0701MB1858;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BLUPR0701MB1858; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR0701MB1858;4:2c5FZKozm5VslybgGu++V5JhvN/+TmQWP33E4NVy?= =?us-ascii?Q?qGUPnBMrQqqPFPQEY1Tmtnow15bCkddngRnJwDt6YXefD9MiYO4b5iFbFlds?= =?us-ascii?Q?M38/Taz4+XlAkr7I+V+lkv2wuQdq+aQvbSPpep6zoVsdAekwbalzF/ggnqkm?= =?us-ascii?Q?e6y5yk3geEAqA/YAc9X0rFw3JjvtW5YdsyzB+FMDQusBKgNTuhcXdSIxDPrg?= =?us-ascii?Q?ybLKMiTLJ2aekHRPfEjPqHD9dkkIgr3Sj8eX2uN8KO28cfjqztYd+bmxo3FT?= =?us-ascii?Q?2Yt2W7o9wmwIWWZzB0FLU/YeKSfXrErdl272UPozl24XDdv34fa7sWD8aC4k?= =?us-ascii?Q?bMO6WkUumi3+ac7Q8L41Gvmui6APb9q8yCbbVFplAWfwVZnXF7KSiLQOmXYA?= =?us-ascii?Q?3jIZZNFRrQX7jbKZMRGbY7qxUiQq4Pyb+HlA66y8NhjHBZcwjhR5nS2FiU6y?= =?us-ascii?Q?FfvH022QqjNGK6QtC0C5yHRjJ9IPMpzDHXKsKX0Fv/Hm1ju10vUrTiIZhxj8?= =?us-ascii?Q?Fe5jyTfsvjLxts8Z9piK6QMRusT7uhcBgYXD44i4IwhRO2V4sb+amcibAXp3?= =?us-ascii?Q?4mlwDuox94PZfkpx8u8JpuQ8NU3k+bkTPgxClamV3ypo79IO+HYRkRby7I1j?= =?us-ascii?Q?3Jz/GD5PiK0imbbHm1ht7T+F9NeJ0cMWO/jH3Pv3PNYDvsemQVbVmnvsjxGn?= =?us-ascii?Q?LNZDpazao3wJYmp/jqonyffGGQTP6qgYmkBO4l9g4Bzucr3YCEi8Gi4YjUC3?= =?us-ascii?Q?w4jtwT7UXVVXBJNR7r0CEdcH1tauvp2NXaGnkzOVNWRFSJd6SOzHrPhLA+R6?= =?us-ascii?Q?UGLQ3kfJms5XPxoU6tyk+Sz2n7vtRoUuRpOHlogwkiN+RCbbub1iHRVbCm1J?= =?us-ascii?Q?GPT7tIxRGIfYeVitHCP4iGxevU2lhrXOp2ZMKJW2UPNPijFnttoBX7LFzht4?= =?us-ascii?Q?Hy6hziW7j+1ufW28BvO84Q6VXjZQjtcIKcW72ERyPuf5dUuNg9aeJHv1dJhk?= =?us-ascii?Q?6Rhf0gOJKHUzf3awHD37XrFkR9hiRJKOl/WB+8Ndx0x8kcTThgAkDmvjSKR8?= =?us-ascii?Q?FnBwV3capdfX5jrYma8gAysnNyyOBgGWXHqJ/HfzKXjkjwSJ02f4wBrFECkz?= =?us-ascii?Q?5ykKrggg6QhVeQu3ma2vCj7KcHZrTnwO6BEcWESQRGEb/QEAo8CPAg=3D=3D?= X-Forefront-PRVS: 0343AC1D30 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6069001)(39450400003)(39850400002)(39400400002)(39410400002)(39840400002)(72206003)(2950100002)(33646002)(478600001)(25786009)(66066001)(53936002)(42882006)(47776003)(50226002)(5003940100001)(81166006)(7736002)(8676002)(1076002)(5660300001)(7416002)(7406005)(6116002)(575784001)(3846002)(50466002)(48376002)(36756003)(305945005)(6486002)(50986999)(76176999)(54906002)(189998001)(38730400002)(2906002)(42186005)(76506005)(6496005)(15760500002);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR0701MB1858;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR0701MB1858;23:Wr1G32WkBrGRID931F/DYXmvR/PDAIeBKCxIjd7?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aNxqPwEpgQg/IFyVp8XJORnBZA/IXKYi18egzJjl/YyBbBRO2+tsL0/Tj6eLzD6ls3qAZl77qb/SZW2hXa8umtAg04sqsUZUUxTVcPTTE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1858;7:GwFV4AOrD9dkL5SDcruKzOL67CGPQzJziBfU/cmuSpU+pZfcVUmGn0iuIVKEwr9wRIEmFAAbcwsWap8y9r3Aqjfc3CL5WBwIZ3a1kB42PUjj+ZsSeF+SIDAk3FrlkeEDhTmUjDpbf296BBKyh7N92lzwBIwf2D6dFDn4/a3uxY2eIRkPsoOzQrwPlFh3zmTehHefl/aBtWjqTqi5BojYdB3OA+Plhn1/nxoQvJ6SyAy+PT7QpfdA3eNpVv4Lw4urDN55iWnSl3vd6Alzib5/0Mhuy5DkdelkEBhk6p3IcjMHbDPlxZk8G44j4Dt1tRmRpa+2iE8dSt6GpfA21ahqRkYIJJcRlwrW3x170uZBp9S7fN0clQwrGT2+PjFodaeck7gqZR0REPPY4QkWUDoC2qGwMT7XXIzoD82QSBg6BrC1jQPPuDZj9nDfQx75CmYGLKcmd3cl1W3Z4GrhY2mg/clUmSCPvlXx4nbDSwsC1iMtc1v7onbQaG3e1cWql+Kt36kcaH3ZOjC+8OqIhUr0v4fu0mBWguftOPNSIdY8cI5PATtZgEdkF7Ga6dOVse8qzj5Rqisn9EPbH2wUnYrWfRX8nOMseOl+WY/a45sNOKNtiEvsmvIJnxE1VFGfBOm1eT0JwJxfww0NINcMeyo5ezVvmK9YYqHknN4GYxcExXJlEESN0/O7M6xnqJ6Bh9YxfpaawgDZzq1dfk183XNELN84syciPzk/j8cJrfnUzzJZb40Uvy6Hv/0OAwfnZn3uIEGryxqpgUZQjwQMCfAs+ZZlCjuDWpn55EZWBq3lFz4= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 15:50:42.0621 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1858 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 11239 Lines: 381 All new 32-bit architectures should have 64-bit userspace off_t type, but existing architectures has 32-bit ones. To handle it, new config option is added to arch/Kconfig that defaults ARCH_32BIT_OFF_T to be disabled for non-64 bit architectures. All existing 32-bit architectures enable it explicitly here. New option affects force_o_largefile() behaviour. Namely, if userspace off_t is 64-bits long, we have no reason to reject user to open big files. Note that even if architectures has only 64-bit off_t in the kernel (arc, c6x, h8300, hexagon, metag, nios2, openrisc, tile32 and unicore32), a libc may use 32-bit off_t, and therefore want to limit the file size to 4GB unless specified differently in the open flags. Signed-off-by: Yury Norov Acked-by: Arnd Bergmann --- arch/Kconfig | 15 +++++++++++++++ arch/arc/Kconfig | 1 + arch/arm/Kconfig | 1 + arch/blackfin/Kconfig | 1 + arch/cris/Kconfig | 1 + arch/frv/Kconfig | 1 + arch/h8300/Kconfig | 1 + arch/hexagon/Kconfig | 1 + arch/m32r/Kconfig | 1 + arch/m68k/Kconfig | 1 + arch/metag/Kconfig | 1 + arch/microblaze/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/mn10300/Kconfig | 1 + arch/nios2/Kconfig | 1 + arch/openrisc/Kconfig | 1 + arch/parisc/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/score/Kconfig | 1 + arch/sh/Kconfig | 1 + arch/sparc/Kconfig | 1 + arch/tile/Kconfig | 1 + arch/unicore32/Kconfig | 1 + arch/x86/Kconfig | 1 + arch/x86/um/Kconfig | 1 + arch/xtensa/Kconfig | 1 + include/linux/fcntl.h | 2 +- 27 files changed, 41 insertions(+), 1 deletion(-) diff --git a/arch/Kconfig b/arch/Kconfig index 3eac97a4c7b3..350822854148 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -246,6 +246,21 @@ config ARCH_THREAD_STACK_ALLOCATOR config ARCH_WANTS_DYNAMIC_TASK_STRUCT bool +config ARCH_32BIT_OFF_T + bool + depends on !64BIT + help + All new 32-bit architectures should have 64-bit off_t type on + userspace side which corresponds to the loff_t kernel type. This + is the requirement for modern ABIs. Some existing architectures + already have 32-bit off_t. This option is enabled for all such + architectures explicitly. Namely: arc, arm, blackfin, cris, frv, + h8300, hexagon, m32r, m68k, metag, microblaze, mips32, mn10300, + nios2, openrisc, parisc32, powerpc32, score, sh, sparc, tile32, + unicore32, x86_32 and xtensa. This is the complete list. Any + new 32-bit architecture should declare 64-bit off_t type on user + side and so should not enable this option. + config HAVE_REGS_AND_STACK_ACCESS_API bool help diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index a5459698f0ee..cab9c53e0354 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -11,6 +11,7 @@ config ARC select ARC_TIMERS select ARCH_HAS_SG_CHAIN select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC + select ARCH_32BIT_OFF_T select BUILDTIME_EXTABLE_SORT select CLONE_BACKWARDS select COMMON_CLK diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 43f45d3b40e8..dfa038164209 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1,6 +1,7 @@ config ARM bool default y + select ARCH_32BIT_OFF_T select ARCH_CLOCKSOURCE_DATA select ARCH_HAS_DEBUG_VIRTUAL select ARCH_HAS_DEVMEM_IS_ALLOWED diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 3c1bd640042a..26418e78f06b 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -12,6 +12,7 @@ config RWSEM_XCHGADD_ALGORITHM config BLACKFIN def_bool y + select ARCH_32BIT_OFF_T select HAVE_ARCH_KGDB select HAVE_ARCH_TRACEHOOK select HAVE_DYNAMIC_FTRACE diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 71b758dc3a96..8c059f07ddb6 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig @@ -50,6 +50,7 @@ config LOCKDEP_SUPPORT config CRIS bool default y + select ARCH_32BIT_OFF_T select HAVE_IDE select GENERIC_ATOMIC64 select HAVE_UID16 diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index eefd9a4ed156..2f1490448fd4 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig @@ -1,6 +1,7 @@ config FRV bool default y + select ARCH_32BIT_OFF_T select HAVE_IDE select HAVE_ARCH_TRACEHOOK select HAVE_PERF_EVENTS diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 6e3d36f37a02..0086abbd8440 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig @@ -1,5 +1,6 @@ config H8300 def_bool y + select ARCH_32BIT_OFF_T select GENERIC_ATOMIC64 select HAVE_UID16 select VIRT_TO_BUS diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index 1941e4baaee6..bbcea8c33e44 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig @@ -3,6 +3,7 @@ comment "Linux Kernel Configuration for Hexagon" config HEXAGON def_bool y + select ARCH_32BIT_OFF_T select HAVE_OPROFILE # Other pending projects/to-do items. # select HAVE_REGS_AND_STACK_ACCESS_API diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 95474460b367..d6d19f6ba39d 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -1,6 +1,7 @@ config M32R bool default y + select ARCH_32BIT_OFF_T select HAVE_IDE select HAVE_OPROFILE select INIT_ALL_POSSIBLE diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index d140206d5d29..ed6f90ca2d31 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -1,6 +1,7 @@ config M68K bool default y + select ARCH_32BIT_OFF_T select ARCH_MIGHT_HAVE_PC_PARPORT if ISA select HAVE_IDE select HAVE_AOUT if MMU diff --git a/arch/metag/Kconfig b/arch/metag/Kconfig index 5b7a45d99cfb..c337192e3c3b 100644 --- a/arch/metag/Kconfig +++ b/arch/metag/Kconfig @@ -1,5 +1,6 @@ config METAG def_bool y + select ARCH_32BIT_OFF_T select EMBEDDED select GENERIC_ATOMIC64 select GENERIC_CLOCKEVENTS diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 8e47121b8b8b..0a0128d8494b 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig @@ -1,5 +1,6 @@ config MICROBLAZE def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_GCOV_PROFILE_ALL select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_WANT_IPC_PARSE_VERSION diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index e2fad9a71517..2fc68ab9dd2e 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -1,6 +1,7 @@ config MIPS bool default y + select ARCH_32BIT_OFF_T if !64BIT select ARCH_BINFMT_ELF_STATE select ARCH_CLOCKSOURCE_DATA select ARCH_DISCARD_MEMBLOCK diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index 38e3494bfb63..75f226e6e819 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig @@ -1,5 +1,6 @@ config MN10300 def_bool y + select ARCH_32BIT_OFF_T select HAVE_EXIT_THREAD select HAVE_OPROFILE select HAVE_UID16 diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig index c587764b9c5a..aafa81ea6e0b 100644 --- a/arch/nios2/Kconfig +++ b/arch/nios2/Kconfig @@ -1,5 +1,6 @@ config NIOS2 def_bool y + select ARCH_32BIT_OFF_T select TIMER_OF select GENERIC_ATOMIC64 select GENERIC_CLOCKEVENTS diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index 1e95920b0737..5539d0842724 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig @@ -5,6 +5,7 @@ config OPENRISC def_bool y + select ARCH_32BIT_OFF_T select OF select OF_EARLY_FLATTREE select IRQ_DOMAIN diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 531da9eb8f43..a9f430b86103 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -1,5 +1,6 @@ config PARISC def_bool y + select ARCH_32BIT_OFF_T if !64BIT select ARCH_MIGHT_HAVE_PC_PARPORT select HAVE_IDE select HAVE_OPROFILE diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 5b69b487d281..0d0afa2f74db 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -122,6 +122,7 @@ config PPC # # Please keep this list sorted alphabetically. # + select ARCH_32BIT_OFF_T if PPC32 select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_DMA_SET_COHERENT_MASK select ARCH_HAS_ELF_RANDOMIZE diff --git a/arch/score/Kconfig b/arch/score/Kconfig index 507d63181389..0a9484bbddf5 100644 --- a/arch/score/Kconfig +++ b/arch/score/Kconfig @@ -2,6 +2,7 @@ menu "Machine selection" config SCORE def_bool y + select ARCH_32BIT_OFF_T select GENERIC_IRQ_SHOW select GENERIC_IOMAP select GENERIC_ATOMIC64 diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index ee086958b2b2..1f99eb3212d2 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -56,6 +56,7 @@ config SUPERH config SUPERH32 def_bool ARCH = "sh" + select ARCH_32BIT_OFF_T select HAVE_KPROBES select HAVE_KRETPROBES select HAVE_IOREMAP_PROT if MMU && !X2TLB diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index a4a626199c47..9d4148f05e3e 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -48,6 +48,7 @@ config SPARC config SPARC32 def_bool !64BIT + select ARCH_32BIT_OFF_T select GENERIC_ATOMIC64 select CLZ_TAB select HAVE_UID16 diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 4583c0320059..845dcbd8235e 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig @@ -3,6 +3,7 @@ config TILE def_bool y + select ARCH_32BIT_OFF_T if !64BIT select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAVE_NMI_SAFE_CMPXCHG select ARCH_WANT_FRAME_POINTERS diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index 0a3bfd1fefcd..9629fd827d6b 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -1,5 +1,6 @@ config UNICORE32 def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index c88ae36eca8f..6c4196f3c380 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -43,6 +43,7 @@ config X86 select ACPI_LEGACY_TABLES_LOOKUP if ACPI select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI select ANON_INODES + select ARCH_32BIT_OFF_T if X86_32 select ARCH_CLOCKSOURCE_DATA select ARCH_DISCARD_MEMBLOCK select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig index ed56a1c4ae73..8436bcd9beba 100644 --- a/arch/x86/um/Kconfig +++ b/arch/x86/um/Kconfig @@ -21,6 +21,7 @@ config 64BIT config X86_32 def_bool !64BIT select HAVE_AOUT + select ARCH_32BIT_OFF_T select ARCH_WANT_IPC_PARSE_VERSION select MODULES_USE_ELF_REL select CLONE_BACKWARDS diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index f4126cf997a4..683f24e0b6a7 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -3,6 +3,7 @@ config ZONE_DMA config XTENSA def_bool y + select ARCH_32BIT_OFF_T select ARCH_WANT_FRAME_POINTERS select ARCH_WANT_IPC_PARSE_VERSION select BUILDTIME_EXTABLE_SORT diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h index 1b48d9c9a561..297993c92490 100644 --- a/include/linux/fcntl.h +++ b/include/linux/fcntl.h @@ -11,7 +11,7 @@ O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE) #ifndef force_o_largefile -#define force_o_largefile() (BITS_PER_LONG != 32) +#define force_o_largefile() (!IS_ENABLED(CONFIG_ARCH_32BIT_OFF_T)) #endif #if BITS_PER_LONG == 32 -- 2.11.0