Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753673AbcKHKhq (ORCPT ); Tue, 8 Nov 2016 05:37:46 -0500 Received: from mail-sn1nam02on0056.outbound.protection.outlook.com ([104.47.36.56]:63143 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753513AbcKHKhj (ORCPT ); Tue, 8 Nov 2016 05:37:39 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , , CC: , , Yury Norov Subject: [PATCH 2/2] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option Date: Tue, 8 Nov 2016 16:03:00 +0530 Message-ID: <1478601180-20932-3-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1478601180-20932-1-git-send-email-ynorov@caviumnetworks.com> References: <1478601180-20932-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [223.196.240.56] X-ClientProxiedBy: AM5PR0101CA0020.eurprd01.prod.exchangelabs.com (10.169.240.30) To SN1PR07MB2253.namprd07.prod.outlook.com (10.164.47.147) X-MS-Office365-Filtering-Correlation-Id: 13324e8c-1cf2-4908-50d2-08d407c3330f X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2253;2:npoQqPumYrgTSA+UYOBYDIGugCcZjgfNNlMab73q4HLhURNtBeHVD4/csLdhyOWN57h3KveTWHQZnwYEy0GuHVDNbrFo8k3ZvYKKAAsxVm2OtrmgdFptg8kPuw23Z2/g9QpCDkVEvlitcGVgLkaJms6Ut65dRmqmGVb6a+nDFWnJnTrcc6K0bLWD7VuUByEySRRwqx5Nxars5jFEUc88sg==;3:LYdZOTEngrxyezTd3f+cr3GLEp2qCXPOYntvdlOw7AxwWoKGR2ooypT2RUIiPDJ2H1oR4A5PF27Qt02vqctMLAkXRk9NkrbgFVgi4+2w84JzYvk2cI7HtLU5W4GHtBg0gvOPc1YQ/oKbdFOrOkMcIg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR07MB2253; X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2253;25:5qoBlIiYX+B2646e6ENzG8BEedAgAADI0JlEyYRA4ApCX/9dcEfnqzUw2qsJ+btA/6rdpXEQpWgfjs7ifS55KOCjGa/DHCjZGoNCG7NySAr//fRetk+7sLacw5v6siLoYxoOgJ0rvHLgoircdeAYx7IMO1GZGqQhT7cjc5/taQCelrWsXc/ZvsHQt8+UYfGk9cSmsofoMFeMxjWLvnf3BBzaIhjZLPL/tiqdF6dip212VmVWV8Gwm9pP3Y72PIPNVjGjCidjLadDzeh22De/5JLe9TyTmABsj99VnuK1zTm7eujJcCByWAJ7+Bp96CQeOeHhQ+zO6EbsZ12d2uvDYminKLk3mikPEnapGpe7DLaGvr37FJvqI+iBJ2ar2cRDGblvZoavnXbTS1xH1uVfXHeQPyBnrFhaXZ0fPR9UM0fDqGfWZEgf+H4J8xHcnsu/3XYzR+FCxvh1yUKsLs1a5OWVy7BR+QMx5mFfDgJnlhcV1umBsLYglU8gbcvYnJt8V90DtkUPkRiMOe2QXVVkJUlbyKdByxSpk2HbiNChEx+B4QG7WzvMG80xa+U/iiPYmjXGvaFgLlhfqti45YAATV0kqd9s/zuAvfgGSnm/Y+ch676aoRa3SHerkKguI3goyQm/K4h8uH/8DtQ058C+wmAdLhF/4qXnIifdq+v3as+DQxESuBtSgsZncPYrK0NoyVK96WDtOohM0AQy5VhD82VB73ZP8lM4J42vMkXHyjIKzBEixj29Pt5TWMoSkr0z X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2253;31:+h5afcXO5l3Qh8pYvwKGE8wXHjGPPhZMFEl7IWkqJP07mPW5yU6RlRRgV14/gBd6EdTHPkYtLvSrDq6YydPzIkfxF3OeLjU01E/gGKQTLS/q/rA2/xwYv6uW42sjRDd5Cx7sjv84uD/XFs1cdMmvhwzyz/KxGxW7yUOJQg/Yxm10guJhE6gN8uFHdOB15VW7PAcMSmM+vGZUHHms28gg1m66gibNsnvgVEUsPb7bAr1TtMMEoCGd6A7sv3OiZtjc;20:7DbEnK8BFeN0O3jERYZb5sJZ2GE4G0LrrVQvN37h0Mc9+niG9xjAlLbUQLKoUU1rWKHuP9BrX8w9/OEr5raJb+E73OFuhyMZFAxcTn0Ln0puzo4nDQgHsXCOAqJE7pQ7J/vJ9oWyz5DMHFifkXbgwd4Dv5Evk4z5uxCcVFCak1byVqdvPWU9l2aEoQWlqxRq739v44DLrccjQMgda8cdUA5JQuVhuEJsKgk5f+jxDVK7vuPEsodVu7QccUCHlcw5nvInSoebTgLRxJNBfP73Ck5zfFYdu6gvaw1B9Tp+bwgaunQtfBNXW0cZPe83TL7lasKk2l10e5VVoEHOn+4OVAUC0FLGQu5bTh4mKV/MSbhnAYE/vijMgkoIcdQM3e+nKYS6wO4NtgFMKsPU9Y5pvdxB4xcBO8I5P/JKWJYDD4llbZ2F6uUphCs+RMSsQ8Oh9eQ2RWsXVXe/WZv/CwU2mraBw2mIABHeh636SYaij8ghKtpi/1rsAxpXN8m9qH0yJJQkCpfFHKrZDS05zHF/LGiCjDwX+iKZeEnmFBSjSmc/896+CLax8etgTBMMPaU1P1D9zpJmSzj0nxojN/sCoDHl92Ul0dX1EB1+UAOLlUg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(5213294742642); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:SN1PR07MB2253;BCL:0;PCL:0;RULEID:;SRVR:SN1PR07MB2253; X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2253;4:qaSxrZotGJiEV95y8pFW4pmnUeU7TFXYxhD4wn9Ht8SlyHzbdWQWRD0f62Lv+gkxOteVBjjgaLDB8l3I5n7rrCh+KJ+DOLZpPCsBxmv6fBdqg2HfilzwHamNYXsCwKsKhfYEMZxGF351y0os8RIqNaQavJF8GKs0uREJU2JMKGKIblXMf4VoFEYC9XSmsx2nTmbvTK0IHO/knaTDDXsSQVOP9KqhAKa+6cbozcNkQ4sb2Q8/+Dl2efGi/kfivdDfWsS3heVib1+buwFdPwQDott3Zc8/bobcUYJY12vqds9Ef+mX2kCB1MJ72f2O+eRccLdlW0gH73LMGyW6PcUDskAB1s3if439jjkm9Q/hmKiUj9lSS09GAB0QxJhBxbEf7VP4ijC+xVMFL12zY68XxmCElt0mpyAMJUjcpoRbDJc4ZzqERvmLvwSWAxkx/Z4O X-Forefront-PRVS: 01208B1E18 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(189002)(199003)(66066001)(33646002)(4001430100002)(6116002)(3846002)(101416001)(586003)(92566002)(50226002)(2201001)(68736007)(2906002)(47776003)(189998001)(5001770100001)(97736004)(6666003)(50466002)(81166006)(81156014)(2950100002)(4326007)(7846002)(105586002)(76176999)(107886002)(5003940100001)(42186005)(8676002)(7736002)(106356001)(50986999)(76506005)(229853001)(36756003)(48376002)(305945005)(77096005)(5660300001)(15760500001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR07MB2253;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN1PR07MB2253;23:6yqWr59QEhhgOYcX6KUB7G8vVjUe84B8iVFA8qUni?= =?us-ascii?Q?m7kG78GasfSE2oYRYrspQde4uLqJ8h0K8HhUKT5gmO3vOXKUm3bZFmFSdMKG?= =?us-ascii?Q?b8csIv0Jb2jinoV5PorOtjPVICe5611M8tJNzDWCruA/ho/wPwnKlZOsEHrh?= =?us-ascii?Q?ldzEe36Nub3bq40uuPBZt1CFGpYpBTriiWjN1/lzzDeLxtv+0LUFQHGLaj+t?= =?us-ascii?Q?JtCg0eK0IYTwfiAJpASh4yfa2DArQA3lEV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1nCPbIpe654UDm1GbOZJ8MEiE3hVh3niDCOxn6orZVoEKFmJo= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2016 10:36:41.7706 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2253 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 10217 Lines: 371 All new 32-bit architectures should have 64-bit 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 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 For the x86 part: Acked-by: Thomas Gleixner Acked-by: Arnd Bergmann --- arch/Kconfig | 4 ++++ 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, 30 insertions(+), 1 deletion(-) diff --git a/arch/Kconfig b/arch/Kconfig index 659bdd0..ec06a71 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -234,6 +234,10 @@ config ARCH_THREAD_STACK_ALLOCATOR config ARCH_WANTS_DYNAMIC_TASK_STRUCT bool +config ARCH_32BIT_OFF_T + bool + depends on !64BIT + config HAVE_REGS_AND_STACK_ACCESS_API bool help diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index bd204bf..92b404f 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -9,6 +9,7 @@ config ARC def_bool y select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC + select ARCH_32BIT_OFF_T select BUILDTIME_EXTABLE_SORT select CLKSRC_OF select CLONE_BACKWARDS diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b5d529f..ff8b8b2 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_DEVMEM_IS_ALLOWED select ARCH_HAS_ELF_RANDOMIZE diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 3c1bd64..26418e7 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 71b758d..8c059f0 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 eefd9a4..2f14904 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 3ae8525..29bbcb1 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 1941e4b..bbcea8c 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 3cc8498..efa10d3 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 d140206..ed6f90c 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 5b7a45d..c337192 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 86f6572..3a6146b 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 b3c5bde..a01da24 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_SUPPORTS_UPROBES select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index 38e3494..75f226e 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 51a56c8..f9273c9 100644 --- a/arch/nios2/Kconfig +++ b/arch/nios2/Kconfig @@ -1,5 +1,6 @@ config NIOS2 def_bool y + select ARCH_32BIT_OFF_T select CLKSRC_OF select GENERIC_ATOMIC64 select GENERIC_CLOCKEVENTS diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index 489e7f9..c4c96c9 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 71c4a3a..025ae12 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 65fba4c..22178eb 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -80,6 +80,7 @@ config ARCH_HAS_DMA_SET_COHERENT_MASK config PPC bool default y + select ARCH_32BIT_OFF_T if PPC32 select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO select BINFMT_ELF diff --git a/arch/score/Kconfig b/arch/score/Kconfig index 507d631..0a9484b 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 ee08695..1f99eb3 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 b23c76b..36ef669 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -46,6 +46,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 4583c03..845dcbd 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 0769066..6705ff5 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 bada636..52d19b4 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -20,6 +20,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 ed56a1c..8436bcd 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 f610586..90c062d 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 76ce329..46960a1 100644 --- a/include/linux/fcntl.h +++ b/include/linux/fcntl.h @@ -5,7 +5,7 @@ #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.7.4