From patchwork Wed Aug 17 11:46:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9285673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9D14460459 for ; Wed, 17 Aug 2016 11:50:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90F1F27FB7 for ; Wed, 17 Aug 2016 11:50:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 83FB0280B0; Wed, 17 Aug 2016 11:50:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8DCEF27FB7 for ; Wed, 17 Aug 2016 11:50:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZzJu-0000LI-7R; Wed, 17 Aug 2016 11:47:42 +0000 Received: from mail-bl2nam02on0075.outbound.protection.outlook.com ([104.47.38.75] helo=NAM02-BL2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZzJg-0000He-U9 for linux-arm-kernel@lists.infradead.org; Wed, 17 Aug 2016 11:47:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AHV4nk2kHgVqeJZCPWd1rW9LnSCsR9g3hJnkV7+/Mgs=; b=qca1cmJknerDeDwRImrZciDLLrwveXy+sVL8YhZLez4SsW6UKl4i2OSSkeCW9xERWA+wy5QarXIfdAp0JdFfkvKUK3srslqv4gkFR3Z2Mg1Z1C3GInsGNI7bibW2FDRosJu3jlJo42/GIASfF1UsQX5JhIrYRzdP+wo7Q1xBEVg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by CY1PR07MB2245.namprd07.prod.outlook.com (10.164.112.147) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.549.15; Wed, 17 Aug 2016 11:47:04 +0000 From: Yury Norov To: , , , , , , Subject: [PATCH 01/18] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option Date: Wed, 17 Aug 2016 14:46:26 +0300 Message-ID: <1471434403-25291-2-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471434403-25291-1-git-send-email-ynorov@caviumnetworks.com> References: <1471434403-25291-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: AM4PR02CA0040.eurprd02.prod.outlook.com (10.165.239.178) To CY1PR07MB2245.namprd07.prod.outlook.com (10.164.112.147) X-MS-Office365-Filtering-Correlation-Id: eacc74df-b00f-4e65-6b53-08d3c69435a0 X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2245; 2:ZkRs8dIWnifiFO92VpwTF6+csPwg2EcwEHSGgW6c39g53dYVH81kd+nnkOAFKJJPf56GnmL2p0ypibNB3TMe8v/v3AtH7C+Zty+URHMcOBsAdpJV6vp9VjVzYMZngc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Yq7ExJYFMDrhU/yiCGoDuLLaCg/lJERwo7rMy2zD178HsydqzgoNvqFRxbxAf3qgydp41JkBgZ5OjVnHzZRIJxPqoTo8+9U5q0iT62vaWLdM2yZ+/GunLbiWJKu7f0aygKpDBLj79GeDStjQA4lK81VMt4g5yHF23o5HB4+4tw2NbQw0ept8DaMISgQOI/AZj1mbWia2VHV56K7yS8wfOfqLt9gkkDpP9Rl4q7tDJM+oDkmEMjJ3BPuM44CXCBKq+8bSGy/kaz/Td6FA2Dn2afz6nrcV23cxC1C3duD+nu9NGgwsu/NvUr5Y24GeRkMiRf9QZ/1lpeE6xdTFbhOoJlkRkBO1ANsXbClouWOeMKy3YaH7dwlEqjplHRjyAvXrudZG2A2jmuqP4GjoVTdbYlHoJtwWVAKBcIDk18K61/Bk0F8svOhKqkSrDKQJ4AH1lBCWxmPBMzWaP8V6DHqI7P8hHHCMHpQQYfP7YYOpf6NPPWYe7hmHfm2XoQo/BY= 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)(10201501046)(3002001); SRVR:CY1PR07MB2245; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2245; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2245; 4:t8Ev0P2hFnhd3N5T82BDcqGlmgx0OCJMiWfmHjkDQrmlKmHDtDyanJW/N8IR7etmIUJaDTRcU1g5r1P2j1GSTSJ+FUfQd7/7hf98arD/CLKdLtsBy4hmVMcUhuVJVrN7CDb2pp3CFZkuPzUznVhjXTp1TWGbQKRRNR0QRynmtLi8JxHBpRbypujPE4/jEAq76oSsUEB8qSTDUQB4suoA04ZwP8sY9PFPPiVJFNQrO1wPm6PYLFYESEl5sbx+OSnD31Djd2b0FN0j+vDx6PBPlo0TLoxrBfLcYp0/gozTjyihxF0Wctugg/zmnHjT5fLn9ZM63XyKFu1qNZK4iZyJoLGWdtgn+1R2OXHyRLV5Ltpe18w11S86qjdOQmNVcxnmFJXZVLS2HO5mjj1F8UQuSK9w71qCuo7E9LotJMNFWIOfEY6oxCSWp0QlMTRpeVJ0 X-Forefront-PRVS: 0037FD6480 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(76176999)(33646002)(92566002)(97736004)(76506005)(7846002)(5001770100001)(2950100001)(7736002)(50986999)(50226002)(8676002)(19580405001)(68736007)(229853001)(305945005)(19580395003)(586003)(77096005)(4326007)(101416001)(7416002)(50466002)(66066001)(47776003)(48376002)(81166006)(36756003)(106356001)(5003940100001)(2201001)(105586002)(42186005)(2906002)(3846002)(6116002)(189998001)(81156014)(15760500001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2245; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2245; 23:9046GfkXAZpA5lnp5/Ypj0kghqlM3H2IIWEuDszE+?= =?us-ascii?Q?hMDfupK5Qd4BhswJt26AN9J+2ZtAK3s3iJjtOhV/S3Wcs/5X53v/0wJfyKqi?= =?us-ascii?Q?NArbxQi1UYJo+arHpeknYNuJqaANGh630mP3fqy9uJVTT1l650HoXC2wmgPU?= =?us-ascii?Q?s8A60opcG/b8njfsePSKJN3cp91pOKGU3S0MR1m+UWsftn9fuH4cbIEGII8B?= =?us-ascii?Q?4q7zpZhSWz58fPJ3s+ENEC5TdFlLTBfXTg1zhOn+LrXi0QL3WnzRIbvXiiGE?= =?us-ascii?Q?dhtkwGguPEkg396sOXWG20QqUu6/Mq6368AN4Lw4EOcIr1WGsBTrpUFgo3si?= =?us-ascii?Q?enIfwdB4CWhQHBXVZ5QDSOJ8q+LOJ8sezYYFLbkKN+b9RWnR0KHl1gWcMREB?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iITFebye02U7CXOI1NH9utv1j/m+ki93BycDRTZ7fehIGytjNyR0tRHPmZU8lZTsmnsJDWX9nu7SEK1ukb+cfSOrWZnMDXJzWQCv5q+AAfzgpLahTRhRD/m7/cHhmte9ZPZWe2jqqiuJDIBrW6AKk91lnSMuuSyqWGmDHfDHa6caitdNU+eJgaZq8ZPIKiDMgSbQxFP2SQa6dU/FhuBgCJZOHk0LHIA0=; 5:jHL+4nlOp2ZhzJB+ux2wOkQNMGtRHKd0bhdOHhc8TNFP5pjzuRCTjckX/hjoTZyJPRhOGkyysSfoGbxB/DSog/e54k/TOXYscOc+a00eyb9e1OL4wf8wp1FjlZu0yVJZaaFG9qGwHc6nNwi0TWYH8w==; 24:b/MF877W7k8lQ2tgoXwngD5viHKhPq7mHGXLNH64udcJQfjZvoQHRcQnXWy5QPUw9Fkpjft7UyUDx5JqiRHrQSH30BoyrKyv8wq1ZVBcbMQ=; 7:9cyCPCp2zISNc1lIoiT6NxLXnTgZB/oR8gkam4LZelXkwrmCwxrKqBD4k7KNrR60AuwlzRjD+K2IdjCWJRUNNDTXncf2JuCvXbLw4Mk54IWDWD+dE/+6GtxdnTzDd8dpElVxYiT+d6ItSKRRzOiG/4/VjkTi0MGlovx6bQn0zGJqHGcmu2VUuaXzJvDKOa5fV0y+0uMjvGsIkv6fO/ZJS6igRDcvNvQWXWZSqWyHOGsJRDn/9nCGtXfYeSYLJNSn SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2016 11:47:04.2233 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2245 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160817_044729_341296_D9A450F0 X-CRM114-Status: UNSURE ( 9.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: szabolcs.nagy@arm.com, heiko.carstens@de.ibm.com, cmetcalf@ezchip.com, ynorov@caviumnetworks.com, philipp.tomsich@theobroma-systems.com, joseph@codesourcery.com, zhouchengming1@huawei.com, Prasun.Kapoor@caviumnetworks.com, agraf@suse.de, geert@linux-m68k.org, kilobyte@angband.pl, manuel.montezelo@gmail.com, pinskia@gmail.com, linyongting@huawei.com, klimov.linux@gmail.com, broonie@kernel.org, bamvor.zhangjian@huawei.com, maxim.kuvyrkov@linaro.org, Nathan_Lynch@mentor.com, schwidefsky@de.ibm.com, davem@davemloft.net, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 64-bit and new 32-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. For syscalls sys_openat() and sys_open_by_handle_at() force_o_largefile() is called, to set O_LARGEFILE flag, and this is the only difference comparing to compat versions. So for now we can drop compat version of that syscalls in standard unistd, as ARCH_32BIT_OFF_T controls the behaviour explicitly. 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 --- 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 +- include/uapi/asm-generic/unistd.h | 5 ++--- 28 files changed, 32 insertions(+), 4 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index e9c9334..eaf657c 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 0d3e59f..d5ca749 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 a9c4e48..888b067 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_HAS_ATOMIC64_DEC_IF_POSITIVE select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_ELF_RANDOMIZE diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 28c63fe..097e7a5 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 deba266..b1376a9 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 498b567..e9897e4 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 2638856..4552f76 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..c44c699 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig @@ -1,6 +1,7 @@ config MN10300 def_bool y select HAVE_EXIT_THREAD + select ARCH_32BIT_OFF_T select HAVE_OPROFILE select HAVE_UID16 select GENERIC_IRQ_SHOW 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 cd87781..8630385 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_HAS_DEBUG_STRICT_USER_COPY_CHECKS select ARCH_MIGHT_HAVE_PC_PARPORT select HAVE_IDE diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 927d2ab..c28fece 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -85,6 +85,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 59b0960..e1a1ad3 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -47,6 +47,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 4820a02..79434be 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig @@ -4,6 +4,7 @@ config TILE def_bool y select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE + select ARCH_32BIT_OFF_T if !64BIT select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAVE_NMI_SAFE_CMPXCHG diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index 0769066..cc642f9 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -1,6 +1,7 @@ config UNICORE32 def_bool y select ARCH_HAS_DEVMEM_IS_ALLOWED + select ARCH_32BIT_OFF_T select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO select HAVE_MEMBLOCK diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index c580d8c..5789877 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 64336f6..1eeca06 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 diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index a26415b..4dcc38d 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -178,7 +178,7 @@ __SYSCALL(__NR_fchownat, sys_fchownat) #define __NR_fchown 55 __SYSCALL(__NR_fchown, sys_fchown) #define __NR_openat 56 -__SC_COMP(__NR_openat, sys_openat, compat_sys_openat) +__SYSCALL(__NR_openat, sys_openat) #define __NR_close 57 __SYSCALL(__NR_close, sys_close) #define __NR_vhangup 58 @@ -676,8 +676,7 @@ __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) #define __NR_name_to_handle_at 264 __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) #define __NR_open_by_handle_at 265 -__SC_COMP(__NR_open_by_handle_at, sys_open_by_handle_at, \ - compat_sys_open_by_handle_at) +__SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) #define __NR_clock_adjtime 266 __SC_COMP(__NR_clock_adjtime, sys_clock_adjtime, compat_sys_clock_adjtime) #define __NR_syncfs 267