diff options
author | Yury Norov <ynorov@caviumnetworks.com> | 2018-05-16 04:18:49 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-02-19 04:10:05 -0500 |
commit | 942fa985e9f161ac018ce2230d3e6f7668cca6ac (patch) | |
tree | c4f0d0fead0b4a0af0a1f6ecf87d8f79295b9485 /arch/Kconfig | |
parent | 0d0216c03a7a14e121abb2e3eb38e491767c36e8 (diff) |
32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option
All new 32-bit architectures should have 64-bit userspace off_t type, but
existing architectures has 32-bit ones.
To enforce the rule, new config option is added to arch/Kconfig that defaults
ARCH_32BIT_OFF_T to be disabled for new 32-bit architectures. All existing
32-bit architectures enable it explicitly.
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, nios2, openrisc, 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 <ynorov@caviumnetworks.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Yury Norov <ynorov@marvell.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/Kconfig')
-rw-r--r-- | arch/Kconfig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 46db715a7f42..cd5f443865ec 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -276,6 +276,16 @@ config ARCH_THREAD_STACK_ALLOCATOR | |||
276 | config ARCH_WANTS_DYNAMIC_TASK_STRUCT | 276 | config ARCH_WANTS_DYNAMIC_TASK_STRUCT |
277 | bool | 277 | bool |
278 | 278 | ||
279 | config ARCH_32BIT_OFF_T | ||
280 | bool | ||
281 | depends on !64BIT | ||
282 | help | ||
283 | All new 32-bit architectures should have 64-bit off_t type on | ||
284 | userspace side which corresponds to the loff_t kernel type. This | ||
285 | is the requirement for modern ABIs. Some existing architectures | ||
286 | still support 32-bit off_t. This option is enabled for all such | ||
287 | architectures explicitly. | ||
288 | |||
279 | config HAVE_REGS_AND_STACK_ACCESS_API | 289 | config HAVE_REGS_AND_STACK_ACCESS_API |
280 | bool | 290 | bool |
281 | help | 291 | help |