From patchwork Fri Oct 21 20:33:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9390073 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 0499960231 for ; Fri, 21 Oct 2016 20:35:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99B2C28555 for ; Fri, 21 Oct 2016 20:35:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8968D29E65; Fri, 21 Oct 2016 20:35:42 +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 92B7528555 for ; Fri, 21 Oct 2016 20:35:41 +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 1bxgW8-0002FE-0y; Fri, 21 Oct 2016 20:34:16 +0000 Received: from mail-bn3nam01on0049.outbound.protection.outlook.com ([104.47.33.49] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxgVu-0002Ar-M5 for linux-arm-kernel@lists.infradead.org; Fri, 21 Oct 2016 20:34:06 +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=3tlHS9aReeIbXD5dYXUTmpfaHlll8ZWWRaM3JPeVfUw=; b=OvSXbqYYruDhJUwgr0j+PFz0OKVymdhpLJRzA5MB2/yizgsSvgMiDQ8d6z+zErxnRoKbkgqyHl5Qd/tza9Y2O1sxNmpZwDvG3J438LDqZKyqE5GqCn+xsihHvoXwI7YLRqQXooFNy0GalezcGd6XWwaWYcwfpN2tKKZs8Cvoswg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by SN1PR07MB2253.namprd07.prod.outlook.com (10.164.47.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.16; Fri, 21 Oct 2016 20:33:38 +0000 From: Yury Norov To: , , , , , Subject: [PATCH 01/18] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option Date: Fri, 21 Oct 2016 23:33:00 +0300 Message-ID: <1477081997-4770-2-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477081997-4770-1-git-send-email-ynorov@caviumnetworks.com> References: <1477081997-4770-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: AM3PR03CA049.eurprd03.prod.outlook.com (10.141.191.177) To SN1PR07MB2253.namprd07.prod.outlook.com (10.164.47.147) X-MS-Office365-Filtering-Correlation-Id: 851674af-53b9-4985-6e3a-08d3f9f189e6 X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2253; 2:lrksv/PLt8/P+Iz7x0b8jk+u3fTIKjCMucMpVxUkp5rng5zOgpIVkiCUcwvwGEHFXUOji2uowdN7S072d25L5bjNhYQ23jauZHj8GidQH6QuE9hzakCOPrKXkYOdZFTRyfb6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SP9JoOD8ZlW3qpUzD+3CRmuWQ8irZXrOe0ieQQ26LYQp6yHcll6mngYRqOWYdsM9e1XG6Kk3PrfFPVGWHNppxjH+OMVakjJoG3uEQvGhapkyCGJq/XnjdYo0Dxr+9cHWiC1JWNAYFeYfAoR0iFUMu5ySR8Ai1hNzjPuNJVvJF1PaVbx25rR8E6kRESu4C4zugsQ9wE+QxPQgvAk4NbcFZLHyePyXP/cxIshXo8DjpKlXu12pAMX/P3kfEfkTalcRqVcu8tHp7+s+xpBN3D1f1dI48VOGx9Bh2MzRwEW5QUEYLMuelpS70cMeJdGFywg7eZQzRAOe4zR7x0gEhmIfwbpeYYpFTE9f2vfpWVYdvjsfggQeVz4R4iuBX9JzAykGCFckimlyg5PT7qK5CfRPVZZ+QWXjjCZ/sDhavSy3BXLFtRXQfr5NqcF2gLUsCRx1t96vDPpGWfilf6dZ4d/dcbEddhrI4aMkwLlGiEo3WEiutrzMn59L8LnrBS2urxp8qgH5uvFTBLopEvlaBQlGWQSjW64QMgjYlwXzHz/hDv3LuxyvGBMvT+w3Xd3iscWGNpJFVX2647jy/ZU7xugt+aT46YuZrZwIy5qrvSTc= 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:SN1PR07MB2253; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2253; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2253; 4:6W53TP84kL3yj3jDRUXu6kcEd8tOwucvjPBPgD/Kb2udmoivCoq1bdD6oXigGWUXsFwm/Wxb55Iqy55gNupS/IjKdFZ49ZkuM5H8/zdSnTR5cZLXJV/kTKEENBv0iNdJ2BPsqP5Tz/REploMnlBkDr+kbxC5q97UK8SfNsyVcxA39pxevHyJRT94kbQDxq1Z7YqOeLWMxR74Yfp45zWSAVwmYkUfYfgkFckAiZ6zdZSBl1451hF3wCPQsfSLsll96QJls79PWc4RNproAXRANYEJa2tvx0cvImINfheqFexvwwgyKhbZXZcUVQxgJePZ32zlBE3zKDNnulApyNWu/u5hmR5uE0Z79VGZdT8aCjpsDosuv5PrHqrcYTUjZV3yql9kDT8L0Vq4pLumOrEJ1XH4MHlZ4bN528AklVP7MY/XICBp48zUk6KXLbjSEeV5 X-Forefront-PRVS: 01026E1310 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(199003)(189002)(50466002)(105586002)(6116002)(5660300001)(33646002)(586003)(3846002)(47776003)(81166006)(92566002)(81156014)(97736004)(2950100002)(7736002)(5001770100001)(305945005)(6666003)(2906002)(4326007)(8676002)(36756003)(19580395003)(77096005)(7846002)(5003940100001)(7416002)(66066001)(229853001)(50986999)(189998001)(42186005)(101416001)(19580405001)(2201001)(68736007)(48376002)(76506005)(106356001)(76176999)(50226002)(15760500001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2253; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; SN1PR07MB2253; 23:0LOyjB4I08T5hi+03ExbtfPqOshnR6p5LnEgJu+Yl?= =?us-ascii?Q?Nf9KkoychK7jrOG1JpAHOkYFBbaPOwUPYohsWp9tYKW/b4LdoW1x0yWdvREU?= =?us-ascii?Q?ku7LBixTXdGJ27H3lNPPDt/wuYDRkOoC9db/cbOYJ1JhKQPjlETc+YS9jRpW?= =?us-ascii?Q?YMxYOTOKu8/t4DlN+SE6xTV5CUQwYAopt1uss8ZhwQFxcnq/hDY5EhDNuA0f?= =?us-ascii?Q?ke8dLiimWvk48OGT5wUKj74DZwe6ZdWSXKlAiIxBt/+cATJqwWfYgn43Mjqs?= =?us-ascii?Q?TmezkEIpllT0jYKvgM8ZzNVQ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M X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2016 20:33:38.1763 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2253 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161021_133403_069900_5FF53213 X-CRM114-Status: GOOD ( 11.23 ) 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 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. 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. All compat ABIs are already turned to use 64-bit off_t, except tile. So, compat versions for this syscalls are not needed anymore. Tile is handled 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/tile/kernel/compat.c | 3 +++ 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 ++--- 29 files changed, 35 insertions(+), 4 deletions(-) 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 ecd1237..3e8dfd6 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..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 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/tile/kernel/compat.c b/arch/tile/kernel/compat.c index bdaf71d..b38a898 100644 --- a/arch/tile/kernel/compat.c +++ b/arch/tile/kernel/compat.c @@ -103,6 +103,9 @@ COMPAT_SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned int, offset_high, #define compat_sys_readahead sys32_readahead #define sys_llseek compat_sys_llseek +#define sys_openat compat_sys_openat +#define sys_open_by_handle_at compat_sys_open_by_handle_at + /* Call the assembly trampolines where necessary. */ #define compat_sys_rt_sigreturn _compat_sys_rt_sigreturn #define sys_clone _sys_clone 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 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 diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 9b1462e..a6062be 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