From patchwork Mon Feb 18 21:07:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 158641 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2934953jaa; Mon, 18 Feb 2019 13:08:10 -0800 (PST) X-Google-Smtp-Source: AHgI3IbRPMA7HIBaiTbkr7fVpcYxCU6o4CLuTsKHzrf0iGhIMDQ1HGtYBUYP9r1VzMIMsREVdGvP X-Received: by 2002:a62:7602:: with SMTP id r2mr25953701pfc.191.1550524090546; Mon, 18 Feb 2019 13:08:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550524090; cv=none; d=google.com; s=arc-20160816; b=IlyukWI3zoinyns8WxtH/qarnInuLdAYTXMA9Ro7NKlL131FtaUYsFCGf1sZ3DZInD 9Hjf4E5DyPw9MliYs2kLZui1lun22pr8PbfymctcHO8nanAP7DtZGSeQaDFWVuCQ83/m IbcryBU5KeBGnIr3RtB6lTFUijpvT+ECd7RkXkXGAclclYR/+fgRGaQSq3xxluTqAJWu mvyxOeLRL+l1ykLUzSKq+t+100YvVcFGrg7+rjiw1RKC50iJm+bDaJiD/GPbr1aShYhE WIgxxdzcMyYjwfSC9arcZMaNQrB+M29u7DAFQbQeEA/gwuoqMwLXd2Qy0bPeKUspNjQy sWGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Ur1hH93LKE8hTb0XLQgcw5avPlmH9ahM6ZLD44deJUE=; b=jOZ4d0hmsJSSr5ftT2oVAQgJpRCOF0tJIKfK5V7L/WjzP0i4MF9ouJlSDxizu0Ao8G kQuaV3/nnGghYmvVhhr4o+lIEre8oDnHpXZOWNyNqlL9WS8EIF2QvsA9SBkslRerzpEu qVSES7lCt6MMk3x+I9GjytQWEUvb9hK/FElw5h/iW1pwZSV/nXLXN0rLmiXSNizYgHmi V0GhH06+E1bRrx2Xd5Wz5tTmDGiIPVRk160ofHd+KnnFfUWeVgCa9Un4MVrJOxELHC3w w8o+3FGgtNftDX3kemwQXW+qJuulGG6wsKfFZXVFZhO/Bc82qA8D2B6QmonX8uWUOlFB yHkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c139si12394744pfb.281.2019.02.18.13.08.10; Mon, 18 Feb 2019 13:08:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729352AbfBRVII (ORCPT + 32 others); Mon, 18 Feb 2019 16:08:08 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:57907 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728676AbfBRVID (ORCPT ); Mon, 18 Feb 2019 16:08:03 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1M894P-1gzOdr1DG7-005Hqb; Mon, 18 Feb 2019 22:07:24 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: Thomas Gleixner , linux-arch@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, yury.norov@gmail.com, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, Stafford Horne , Vineet Gupta , Palmer Dabbelt , Guo Ren , Greentime Hu , arnd@arndb.de, linux-riscv@lists.infradead.org, Guan Xuetao , Yury Norov , Yury Norov Subject: [PATCH 1/8] compat ABI: use non-compat openat and open_by_handle_at variants Date: Mon, 18 Feb 2019 22:07:05 +0100 Message-Id: <20190218210712.3503891-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190218210712.3503891-1-arnd@arndb.de> References: <20190218210712.3503891-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Orj12xgdgMLKf/0v9QWyyXfYt0be3LlRpxJPHPgrMPDM0BnJ6WV BiLjhwLgc5U1C/Ku6TThTvBytLILEw94wcflD2P4D8aMVj1M6BMTtsRvQzpDcQi5i2KJmXB F+hHXIGVuNx9XyXbHpXSVjE9Lmp6xT8wlf1TVaf6ckTcv5FJ+tMk94wMt83YlYfQSPdcQQA vUP00Bef/iee0lCoDfhSQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:AmDHvMow4jU=:wgjN+bHjmauBTwC5INBuZa kwbgPKcxBciSswCZ8/hJX+dA1uKNGxkSQqFWNgUDq9u0H35s+lBE0HS7/bwFirv911RTPPV64 1QQOCoG/Xv16krmGDJ0c0FzpFwadl4hNLJI+Of0fiQby0i/vJelQdmZf0mt/pgQAazojAZe/e FWGpoxzc87oMSDeCUkmRkMA8mZlSuVFPeffCZ7ItzTPBD1xRE4ZLjuMLdzFP14X2czSBqH/UY Qt98uvuQb7EUmsBv6mfPxSoUAJ+xKyi4AGkXToXFKc9WOxk4oVhtemBgsFNLGANMqI804JiBv 700hovB3xfegQzjPemFFwbqE+VpkKpGnOBo+j5MxJvZa03KP3teLkNLAJJmpJu9X7/P/V5fLC kNo31gUG4OUYLmep7kwSXhwP46H8zabPtxvXjLdzCWuNQIagzzPoMHMK53ARD8D1gfuZ3Lq+E V0DRm9L/csRhGFpfi1EAIYC60T1NxI1BuKAMPqmji5oCBs9q34kiY4mwkWt2J8XVqod77IJ8u Yf2GWsxQRDzHfuxfF4pbfj/LBpeaNJUQD8894H24It3r7y4vmCe5Tq0DkkONzy/RhHtKS3ckF NRb9duTX2JUd+mqkIgwf8c+sC1K4i+njwigthjhjFPzpp1qDiHQ7BKuyPaDeU5NeFTyPLBjSW AQ75D7twBBuOAdhOdZbLdPptocCntHHJS0RbZTTRKKS3NOJpQiiCwk/+18PZkGe7zRx+jzjAs Y3NEYyjIAXAUv4vZQ0frh0vqCvbkPt9qcs+E0Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yury Norov The only difference between native and compat openat and open_by_handle_at is that non-compat version forces O_LARGEFILE, and it should be the default behaviour for all architectures, as we are going to drop the support of 32-bit userspace off_t. Signed-off-by: Yury Norov Signed-off-by: Yury Norov Signed-off-by: Arnd Bergmann --- include/uapi/asm-generic/unistd.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.20.0 diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index acf9a07ab2ff..b928eff3bf92 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -179,7 +179,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 @@ -678,8 +678,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_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime) #define __NR_syncfs 267 From patchwork Mon Feb 18 21:07:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 158646 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2935476jaa; Mon, 18 Feb 2019 13:08:45 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia19rPisNf9/ZF9fWBMPRK7UemZ53x1z9PuDieN4pxWsAWwtQF/sljTFKrlGQpN0eeNHw8/ X-Received: by 2002:a17:902:f64:: with SMTP id 91mr27269639ply.132.1550524125412; Mon, 18 Feb 2019 13:08:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550524125; cv=none; d=google.com; s=arc-20160816; b=y/Fhb2w+1KjvCHRd9wD/PpCz7+PLkr8PdtuYCUlH0ENecknzHNAB5134cVsC+3t6HZ vTS2yJuZ2bjMK8jXaNnKb7TL2VJJLbFwxZufEOKuz01f9bbNT3M1HBxQ57t4uu6UoG/O nuqjjaFcOr60E4zDGvM0ES5BdXcukZ4uV/KcStlon1I6l/bk3YYEpgSK3vQul1Xf2I2I gs49HVyLlkcj6ytw3vdaHdRr4I1inGKnhozR6e4y9kvrAC5h2um6YSjtlWjMikRLA0XD 4dyTyhmLUKVkHRMHbMdPqMAD5jj5JvuA47eDzNk8zBJ7SIFc9wvlD/QkiMydYRfFg+Xw 1CEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=aAamalPIZB7Hgkkeu6R9mqg8IMwOJz/BtXxbYOZTbC4=; b=o/KL2ZeU9kRaoviuq4A1rDJRptSXR6qnq7eVfloulPsuKo9NTjlvZXZUgINTrnzzTw Oz6uPLtAuNWsTmcx1gdla2m3mS9vKJATIt0AVLPp61EQJGAcdI+E+2wNKRqY83Ll4hr4 zHBNqKI84lJhX9C3DSAyiKjrnd0ncy7Y4LDk2p7o6mxITKmnqCjdWVblPdoHmsJlO/HJ d/752QHKK8v5LrbzKDBVPlacrprAzb1QaR9SteSqn9saLIhJz02jbFahkDTWecXZdRoH 5KK8nK88ysq3aqEb0LUoocJIDbOkUN1ZmlfffvfixbZ4sazHmS+SM6d076ew8DxDic3T RIZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si14295361pfe.159.2019.02.18.13.08.44; Mon, 18 Feb 2019 13:08:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730137AbfBRVIm (ORCPT + 32 others); Mon, 18 Feb 2019 16:08:42 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:50651 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728107AbfBRVIB (ORCPT ); Mon, 18 Feb 2019 16:08:01 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1Mna0x-1hNEPB43e9-00jWQB; Mon, 18 Feb 2019 22:07:25 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: Thomas Gleixner , linux-arch@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, yury.norov@gmail.com, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, Stafford Horne , Vineet Gupta , Palmer Dabbelt , Guo Ren , Greentime Hu , arnd@arndb.de, linux-riscv@lists.infradead.org, Guan Xuetao , Yury Norov , Yury Norov Subject: [PATCH 2/8] 32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option Date: Mon, 18 Feb 2019 22:07:06 +0100 Message-Id: <20190218210712.3503891-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190218210712.3503891-1-arnd@arndb.de> References: <20190218210712.3503891-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:63NPbzA6d/O5+QCRnWWyskF7l+TMw62sD+M/rq21tRTBUX+7Oql 0bmuLcxIAOzoKAPpI/WXQ2KszumzS+joEl/jnpIC9cpoMMIQR4Emb3kZp/RqqPb0WWfflQc av8LGKqvJt6JtLy2DhGE1hbLS3xVfZbeMsmuRGhF5ZJ/iCgcofyzuOJdOlqUH7W2WxwOIdy ay4zMFEkMeqxs7SWZGPNQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:QLVFiTv766c=:W6j07WuUQjDTKkcnckdPeB LRDcm3WxenVj4eKXtarGm3J+ef58JQa5pu2V2FrF9Jw9i0/iz43GYnS/xarIxr956AnpjgusM xeeYfosTRUYMfY2vKi7EFgVSqaisdEkgwkVsmmU+mq4zA51P7T0JYBXi3VfYv7Xo3BNuLZ3eI kkOwMwAWhINjYcXDJ/+/61WsiDmu14F9bWNuqp+msqbtVh/rWkryS9zeBJoQ06ReEkTiD+6Wc MoXVKId8HNHQQTPXGrvGNN05U4P4jXSibQ9LSNh/sMRHMpFFifEWP/725y3jmKJOR3QDni1PU BwJO5K8o68wmE858KrGwZwrZxA7EPGKS40XCnUleBWXONBIxSWnSqhkqzxRqSe2PUNI9DEpjP sC34RrUSS3SNcq9hKAdEO9Cd9IjoILJ1d5loD9og+g7MJ6eBxE3qQG3j0NdIpRHgj8/TKBl8a DtPSQOT4KEeLp9idlX1zRb4ZfIeR5j30CrYwVQM9194sXR6QTpjoSRSE44SsAzYlqcmNzgrLG iIEu1BKqVTzLrXwHFMC85r9r5WwwpZzcdn1sn14mLNg36VYwdJpPplNZRgdigtw2qqZ6qwnfu G0t5KCAABjRv0I4L3UmT+fsaBB+1ldmWzlvWTEfKe8h4hgUx9RK5hmbxrL0ZLPrZrDW7vki3u z7mk6VZdoQtpyUgOEMTmPQsbiJ3eIwxtc9Wpddy2qIA4LAhHuQ5t5JDnsmLEF5MmGhzMNCsar nOyAMBCkJmy15nRM/g10nUgujgk1/CrDjCyUWw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yury Norov 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 Acked-by: Arnd Bergmann Signed-off-by: Yury Norov Signed-off-by: Arnd Bergmann --- arch/Kconfig | 15 +++++++++++++++ arch/arc/Kconfig | 1 + arch/arm/Kconfig | 1 + arch/c6x/Kconfig | 1 + arch/csky/Kconfig | 1 + arch/h8300/Kconfig | 1 + arch/hexagon/Kconfig | 1 + arch/m68k/Kconfig | 1 + arch/microblaze/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/nds32/Kconfig | 1 + arch/nios2/Kconfig | 1 + arch/openrisc/Kconfig | 1 + arch/parisc/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/riscv/Kconfig | 1 + arch/sh/Kconfig | 1 + arch/sparc/Kconfig | 1 + arch/unicore32/Kconfig | 1 + arch/x86/Kconfig | 1 + arch/x86/um/Kconfig | 1 + arch/xtensa/Kconfig | 1 + include/linux/fcntl.h | 2 +- 23 files changed, 37 insertions(+), 1 deletion(-) -- 2.20.0 Acked-by: Geert Uytterhoeven diff --git a/arch/Kconfig b/arch/Kconfig index 46db715a7f42..89fe3d651349 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -276,6 +276,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 376366a7db81..1cfe4197146f 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -14,6 +14,7 @@ config ARC select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE 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 664e918e2624..8933f7337e56 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -2,6 +2,7 @@ config ARM bool default y + select ARCH_32BIT_OFF_T select ARCH_CLOCKSOURCE_DATA select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID && !KEXEC select ARCH_HAS_DEBUG_VIRTUAL if MMU diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig index 456e154674d1..e5cd3c5f8399 100644 --- a/arch/c6x/Kconfig +++ b/arch/c6x/Kconfig @@ -6,6 +6,7 @@ config C6X def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select CLKDEV_LOOKUP diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig index 398113c845f5..6959e0b1e956 100644 --- a/arch/csky/Kconfig +++ b/arch/csky/Kconfig @@ -1,5 +1,6 @@ config CSKY def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_USE_BUILTIN_BSWAP diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 6472a0685470..c071da34e081 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 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 fb2fbfcfc532..ac441680dcc0 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig @@ -4,6 +4,7 @@ comment "Linux Kernel Configuration for Hexagon" config HEXAGON def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_NO_PREEMPT select HAVE_OPROFILE diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index e173ea2ff395..b54206408f91 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -2,6 +2,7 @@ config M68K bool default y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_DEVICE if HAS_DMA select ARCH_MIGHT_HAVE_PC_PARPORT if ISA select ARCH_NO_COHERENT_DMA_MMAP if !MMU diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 58aff2653d86..a51b965b3b82 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_NO_SWAP select ARCH_HAS_DMA_COHERENT_TO_PFN if MMU select ARCH_HAS_GCOV_PROFILE_ALL diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 787290781b8c..d80ccabd3c06 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -2,6 +2,7 @@ config MIPS bool default y + select ARCH_32BIT_OFF_T if !64BIT select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT select ARCH_CLOCKSOURCE_DATA select ARCH_DISCARD_MEMBLOCK diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig index dda1906bba11..addb7f5f5264 100644 --- a/arch/nds32/Kconfig +++ b/arch/nds32/Kconfig @@ -5,6 +5,7 @@ config NDS32 def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_WANT_FRAME_POINTERS if FTRACE diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig index 532343eebf89..c3e913ef4f0c 100644 --- a/arch/nios2/Kconfig +++ b/arch/nios2/Kconfig @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 config NIOS2 def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_NO_SWAP diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index 09ab59e942ae..a5e361fbb75a 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig @@ -6,6 +6,7 @@ config OPENRISC def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_DEVICE select OF select OF_EARLY_FLATTREE diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 7ca2c3ebad64..c8e621296092 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 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 2890d36eb531..375d0dc0dc7d 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -128,6 +128,7 @@ config PPC # # Please keep this list sorted alphabetically. # + select ARCH_32BIT_OFF_T if PPC32 select ARCH_HAS_DEBUG_VIRTUAL select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_DMA_SET_COHERENT_MASK diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index feeeaa60697c..09fa3a87bf30 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -11,6 +11,7 @@ config 32BIT config RISCV def_bool y + select ARCH_32BIT_OFF_T if !64BIT # even on 32-bit, physical (and DMA) addresses are > 32-bits select PHYS_ADDR_T_64BIT select OF diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index a9c36f95744a..d9a9144dec35 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -62,6 +62,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 d5dd652fb8cc..40f8f4f73fe8 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -49,6 +49,7 @@ config SPARC config SPARC32 def_bool !64BIT + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select GENERIC_ATOMIC64 select CLZ_TAB diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index c3a41bfe161b..a7f1ae58d211 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 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 15af091611e2..7aac274c2849 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -47,6 +47,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_CLOCKSOURCE_INIT select ARCH_DISCARD_MEMBLOCK diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig index f518b4744ff8..ab14e6f73ca4 100644 --- a/arch/x86/um/Kconfig +++ b/arch/x86/um/Kconfig @@ -17,6 +17,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 20a0756f27ef..2033b4485cc4 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 config XTENSA def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_NO_COHERENT_DMA_MMAP if !MMU diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h index 27dc7a60693e..d019df946cb2 100644 --- a/include/linux/fcntl.h +++ b/include/linux/fcntl.h @@ -12,7 +12,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 From patchwork Mon Feb 18 21:07:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 158645 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2935322jaa; Mon, 18 Feb 2019 13:08:37 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibit/fcjGCHzNj8Hh/fkus+7rqOZ71rnGVr3e6Q1YTz26ZCNIC6U+YoIA15Mce94FolzRQs X-Received: by 2002:a63:5f0f:: with SMTP id t15mr20570043pgb.272.1550524116994; Mon, 18 Feb 2019 13:08:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550524116; cv=none; d=google.com; s=arc-20160816; b=mr7fD/oN/x49YCtxcuilAfkUsrYvsUe7zrQwEm82D5Pi/UzOSiSLKdDT5t5TrasnUu mHFfpEX0DcYe1eeb3jWfVWAwmlaGU9C7BCs9wDyqVVN9VvR50LyQbBIi8TgXXTpGMh2N mE+eCni2jAXtxkmLspN+HgMPT3BOxeXRc89b8nToG2XeQziCl467zQ/T+g7/egMs6J1w iLPvGRKBBeX9oZz9iJk2fK8mbFY7WFC/zv9s3poz9nf8V0+E3KyckiqfxM72NSVoDndZ hvlLhAqtOfDTD1qMbZwf2cyOrMlNhpCuc0c1ZA39q78HqZPUngj12JLzGAG7+jT7bVsL Y8kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=lRcCFoA733wrFR5Uj6hOAlyzvWdkpEzQdtJTrvHP530=; b=I2QPnRJXgtjmN8/7mth0WFEMoIxV5aHmHNSR6Uo+9k4cM6sjFDTlebyYqV+/iN+/Y3 s3UX/qeeYDNh5Sn1QscC/Ky3QqbLJV3BbCzBdN3stHFfJV6smuwQUJYxjyBqTNuR4vJF dU49Fa2IGGrLTTvcCk6vML+XmLIk/cbkd/kzzXnjAjz9hVGE1bVMSrL56JEhco/MSAJX oRsGMxitAmqWC23GJJ/CZtbZJwtX3f6f7X8kqyLecqfJxGA0FYFUQD5w2b6N0Q3RrBW5 fCPdjtAPIrewxOgYGI9W6+H5I7j3d0qBeO+ICOkyFL9w+5YWVd94XJleEEyz32h6a2P2 U+YQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g63si6236239pgc.382.2019.02.18.13.08.36; Mon, 18 Feb 2019 13:08:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730086AbfBRVIf (ORCPT + 32 others); Mon, 18 Feb 2019 16:08:35 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:41395 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729084AbfBRVIb (ORCPT ); Mon, 18 Feb 2019 16:08:31 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1Mn1mb-1hMgAq0I9n-00k4eT; Mon, 18 Feb 2019 22:07:27 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: Thomas Gleixner , linux-arch@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, yury.norov@gmail.com, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, Stafford Horne , Vineet Gupta , Palmer Dabbelt , Guo Ren , Greentime Hu , arnd@arndb.de, linux-riscv@lists.infradead.org, Guan Xuetao , Yury Norov , Mark Salter , James Hogan , Ley Foon Tan , Will Deacon , Yury Norov Subject: [PATCH 3/8] asm-generic: Drop getrlimit and setrlimit syscalls from default list Date: Mon, 18 Feb 2019 22:07:07 +0100 Message-Id: <20190218210712.3503891-4-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190218210712.3503891-1-arnd@arndb.de> References: <20190218210712.3503891-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:lT1OI/VwUk1+FUWmyIpKG7wXuRB7DmxUPsLwzNLktjPbj2Hh83E 96T3ALCFUrg4xNIagimy8FxBL4ytfUziaZaop1mls1d+9UFwmmpupObeIYE+NDEMAFuMXji kGuejQ4kER67FzspXmDjBfKuA6qVhpcKauK+R8xo4d20CFRWy5yiQBwikdBQ3UHO4pOsJ7o 0Pzvm/tGPQ94ZVQdEyvDg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:Uqfg5Jc4WoY=:Goljy+lYdWhAiy8Sxw3qQ4 vIQeUZZDQi5bRNWfp++lBHnnyG80QMpeXiXdXS/MZGYHEtYnZnDXelOibu4djnQqK3ovlVNnf DbHxa/sYuftU3065EyjcrcL9B1tLJkmJffPdSxKYBR2+OggdNSeUeEtiDCE+ssAKcY+I/oU16 mLzQ9xAUoywKlq/c2uXCsh6rRLGAq21Jw8AZOO4QgTFmdJGPHom93Te0BVKxMQ+nsKh482fTr zeMqbGganEaYhItVgpJC1u5s3gTeH5Du52yxRy0dz5Csym3WvuLMayVGKpDQ3r6AKs/lhH7fO y7OFef2q5p/YitbmcVE34/E0U69WK166cJSOh7Tvy/E8cjOBfIww00DuTyXHT0HFLpjPUQDAJ uxNdo9/A6gP/0PhcvwkAawHFIwMReId/wGMPPEviW/bXBaodSg96xEWCj8phs4eL4SV6ns8JK GTQgjEYlJDHAygyspjnfcNCCVpoBoxHNnNOhmtjphcTB6a1RGcMCFkEsTz2HToqeso3ujwgdj ahJ5ic1T0MNf+u9Z1WrmvFWLs9N/dPfDurl50sflM4UTWC0LGmjXI7nZhGegRlH3P+aeyGBN9 xh2ExAUy0e14JpA8Srv7ztOEs8IG+f2E9/KtSlUZA+v6ZlIBCdNyfpTJKh0nu2oSMvLakzkAp NBU9OR1htnoYZvg/OX7hqdJr1ZehZIUAi6lxgOekE7PuTwLjC47diCXThN/4WzDPdMClmXjKr wmCC+QyrjmTpVu1GBW7tdjy8u5qM1bNMP2zjNQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yury Norov The newer prlimit64 syscall provides all the functionality of getrlimit and setrlimit syscalls and adds the pid of target process, so future architectures won't need to include getrlimit and setrlimit. Therefore drop getrlimit and setrlimit syscalls from the generic syscall list unless __ARCH_WANT_SET_GET_RLIMIT is defined by the architecture's unistd.h prior to including asm-generic/unistd.h, and adjust all architectures using the generic syscall list to define it so that no in-tree architectures are affected. Cc: Arnd Bergmann Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-hexagon@vger.kernel.org Cc: uclinux-h8-devel@lists.sourceforge.jp Signed-off-by: Yury Norov Acked-by: Arnd Bergmann Acked-by: Mark Salter [c6x] Acked-by: James Hogan [metag] Acked-by: Ley Foon Tan [nios2] Acked-by: Stafford Horne [openrisc] Acked-by: Will Deacon [arm64] Acked-by: Vineet Gupta #arch/arc bits Signed-off-by: Yury Norov Signed-off-by: Arnd Bergmann --- arch/arc/include/uapi/asm/unistd.h | 1 + arch/arm64/include/uapi/asm/unistd.h | 1 + arch/c6x/include/uapi/asm/unistd.h | 1 + arch/csky/include/uapi/asm/unistd.h | 1 + arch/h8300/include/uapi/asm/unistd.h | 1 + arch/hexagon/include/uapi/asm/unistd.h | 1 + arch/nds32/include/uapi/asm/unistd.h | 1 + arch/nios2/include/uapi/asm/unistd.h | 1 + arch/openrisc/include/uapi/asm/unistd.h | 1 + arch/riscv/include/uapi/asm/unistd.h | 1 + arch/unicore32/include/uapi/asm/unistd.h | 1 + include/uapi/asm-generic/unistd.h | 5 +++++ scripts/checksyscalls.sh | 5 +++++ 13 files changed, 21 insertions(+) -- 2.20.0 diff --git a/arch/arc/include/uapi/asm/unistd.h b/arch/arc/include/uapi/asm/unistd.h index 3b3543fd151c..6a1a62a979dd 100644 --- a/arch/arc/include/uapi/asm/unistd.h +++ b/arch/arc/include/uapi/asm/unistd.h @@ -18,6 +18,7 @@ #define __ARCH_WANT_RENAMEAT #define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SET_GET_RLIMIT #define __ARCH_WANT_SYS_EXECVE #define __ARCH_WANT_SYS_CLONE #define __ARCH_WANT_SYS_VFORK diff --git a/arch/arm64/include/uapi/asm/unistd.h b/arch/arm64/include/uapi/asm/unistd.h index dae1584cf017..79937de2a0cc 100644 --- a/arch/arm64/include/uapi/asm/unistd.h +++ b/arch/arm64/include/uapi/asm/unistd.h @@ -17,5 +17,6 @@ #define __ARCH_WANT_RENAMEAT #define __ARCH_WANT_NEW_STAT +#define __ARCH_WANT_SET_GET_RLIMIT #include diff --git a/arch/c6x/include/uapi/asm/unistd.h b/arch/c6x/include/uapi/asm/unistd.h index 6b2fe792de9d..e3721b2cfd6a 100644 --- a/arch/c6x/include/uapi/asm/unistd.h +++ b/arch/c6x/include/uapi/asm/unistd.h @@ -17,6 +17,7 @@ #define __ARCH_WANT_RENAMEAT #define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SET_GET_RLIMIT #define __ARCH_WANT_SYS_CLONE /* Use the standard ABI for syscalls. */ diff --git a/arch/csky/include/uapi/asm/unistd.h b/arch/csky/include/uapi/asm/unistd.h index 224c9a9ab45b..f5c83492136f 100644 --- a/arch/csky/include/uapi/asm/unistd.h +++ b/arch/csky/include/uapi/asm/unistd.h @@ -2,6 +2,7 @@ // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. #define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_SET_GET_RLIMIT #include #define __NR_set_thread_area (__NR_arch_specific_syscall + 0) diff --git a/arch/h8300/include/uapi/asm/unistd.h b/arch/h8300/include/uapi/asm/unistd.h index 628195823816..b9e9352f2328 100644 --- a/arch/h8300/include/uapi/asm/unistd.h +++ b/arch/h8300/include/uapi/asm/unistd.h @@ -2,5 +2,6 @@ #define __ARCH_WANT_RENAMEAT #define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SET_GET_RLIMIT #include diff --git a/arch/hexagon/include/uapi/asm/unistd.h b/arch/hexagon/include/uapi/asm/unistd.h index c91ca7d02461..6bb392a33c35 100644 --- a/arch/hexagon/include/uapi/asm/unistd.h +++ b/arch/hexagon/include/uapi/asm/unistd.h @@ -30,6 +30,7 @@ #define sys_mmap2 sys_mmap_pgoff #define __ARCH_WANT_RENAMEAT #define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SET_GET_RLIMIT #define __ARCH_WANT_SYS_EXECVE #define __ARCH_WANT_SYS_CLONE #define __ARCH_WANT_SYS_VFORK diff --git a/arch/nds32/include/uapi/asm/unistd.h b/arch/nds32/include/uapi/asm/unistd.h index c2c3a3e34083..eb98d24d3190 100644 --- a/arch/nds32/include/uapi/asm/unistd.h +++ b/arch/nds32/include/uapi/asm/unistd.h @@ -3,6 +3,7 @@ #define __ARCH_WANT_STAT64 #define __ARCH_WANT_SYNC_FILE_RANGE2 +#define __ARCH_WANT_SET_GET_RLIMIT /* Use the standard ABI for syscalls */ #include diff --git a/arch/nios2/include/uapi/asm/unistd.h b/arch/nios2/include/uapi/asm/unistd.h index d9948d88790b..fa68e68bc26d 100644 --- a/arch/nios2/include/uapi/asm/unistd.h +++ b/arch/nios2/include/uapi/asm/unistd.h @@ -20,6 +20,7 @@ #define __ARCH_WANT_RENAMEAT #define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SET_GET_RLIMIT /* Use the standard ABI for syscalls */ #include diff --git a/arch/openrisc/include/uapi/asm/unistd.h b/arch/openrisc/include/uapi/asm/unistd.h index ec37df18d8ed..2e0bc0ff9f31 100644 --- a/arch/openrisc/include/uapi/asm/unistd.h +++ b/arch/openrisc/include/uapi/asm/unistd.h @@ -21,6 +21,7 @@ #define __ARCH_WANT_RENAMEAT #define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SET_GET_RLIMIT #define __ARCH_WANT_SYS_FORK #define __ARCH_WANT_SYS_CLONE diff --git a/arch/riscv/include/uapi/asm/unistd.h b/arch/riscv/include/uapi/asm/unistd.h index 1f3bd3ebbb0d..d9340c52e7ad 100644 --- a/arch/riscv/include/uapi/asm/unistd.h +++ b/arch/riscv/include/uapi/asm/unistd.h @@ -18,6 +18,7 @@ #ifdef __LP64__ #define __ARCH_WANT_NEW_STAT #endif /* __LP64__ */ +#define __ARCH_WANT_SET_GET_RLIMIT #include diff --git a/arch/unicore32/include/uapi/asm/unistd.h b/arch/unicore32/include/uapi/asm/unistd.h index 1e8fe5941b8a..2b575c0cf177 100644 --- a/arch/unicore32/include/uapi/asm/unistd.h +++ b/arch/unicore32/include/uapi/asm/unistd.h @@ -12,6 +12,7 @@ */ #define __ARCH_WANT_RENAMEAT +#define __ARCH_WANT_SET_GET_RLIMIT /* Use the standard ABI for syscalls. */ #include diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index b928eff3bf92..2cdf600b05fa 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -467,10 +467,15 @@ __SYSCALL(__NR_uname, sys_newuname) __SYSCALL(__NR_sethostname, sys_sethostname) #define __NR_setdomainname 162 __SYSCALL(__NR_setdomainname, sys_setdomainname) + +#ifdef __ARCH_WANT_SET_GET_RLIMIT +/* getrlimit and setrlimit are superseded with prlimit64 */ #define __NR_getrlimit 163 __SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit) #define __NR_setrlimit 164 __SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit) +#endif + #define __NR_getrusage 165 __SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage) #define __NR_umask 166 diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh index cc70a64fa81f..53c5677d7e82 100755 --- a/scripts/checksyscalls.sh +++ b/scripts/checksyscalls.sh @@ -38,6 +38,11 @@ cat << EOF #define __IGNORE_lstat64 /* fstatat64 */ #endif +#ifndef __ARCH_WANT_SET_GET_RLIMIT +#define __IGNORE_getrlimit /* getrlimit */ +#define __IGNORE_setrlimit /* setrlimit */ +#endif + /* Missing flags argument */ #define __IGNORE_renameat /* renameat2 */ From patchwork Mon Feb 18 21:07:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 158642 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2935027jaa; Mon, 18 Feb 2019 13:08:16 -0800 (PST) X-Google-Smtp-Source: AHgI3IakhlgbuAsE4TK41xINS6SGlDbwOvo2iiWmzHkgYBqp+6eryTKpVwttMjuaKqQ5QvWm5vJO X-Received: by 2002:a17:902:6b49:: with SMTP id g9mr27649214plt.291.1550524096537; Mon, 18 Feb 2019 13:08:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550524096; cv=none; d=google.com; s=arc-20160816; b=QmuoI6ZNGk0yMj7Ksk+kXWn9zrJiDUI8WF6lcTp3EbLVzyw9ORR2rX8VB1iISYkpyH 4MZbFGyaM9Wg5peLQImwJNF9mHSqZXSWTlQTqrqOkfv2B1keBd9AtzXgnpltLqNylQf3 BguuPk15XvpD6BXUMIYfet0HZMC8+1qnES4uQbNXEEm0Ita5ifnBq2LOWOw8RAr+a5vT XgBVENUhPjXGMH8v4aNfDRQe2Ep+zcKvjjOcA11M4fqhBqyZwFxTjsbhbI/2QxdCJEU0 RqTgLl46nAL2ajwz8acZJFvRzZd7bDY1KBn/X/rnn5lAc0/UNj76SgikR+iKas458eLu JWeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Y9dqE9mM3XwWJrc9hSETuFByDlh2VstxzeJdIDKp67Q=; b=U+bDDoSau687CWvFUaX4+xPJYlmXiwHbdbd84TRgRWo2M4IHu/725hVwPk3Gvca98T YTuvyxgVnHDPSE5bIRv8cXlxWcnvohz8od17Rhu+4k4145Sbs6m7BDqn7q1V1wTqe83i mQMPF4hHb6BU1qhLl+TT8KdTU2Fb2QnQZBUgriXQNxUGY39k9/QwivYlQQkKluOsAdog 1xwoAwWIh1JOQOcaJT9YkCAbLQgQj6Fyx7N5q2Gw6Ta1iRow+HKMb195oJ2vr/n43uC7 bBQx92g2g1aiDY2UOfAuFBxsM958Hz0/YTLgNEDL17AhE6SNoun5b/d+zZV73Ap/ERP4 TxdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o26si1920754pfk.166.2019.02.18.13.08.16; Mon, 18 Feb 2019 13:08:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729630AbfBRVIO (ORCPT + 32 others); Mon, 18 Feb 2019 16:08:14 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:57689 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729084AbfBRVII (ORCPT ); Mon, 18 Feb 2019 16:08:08 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1MLQl3-1gdU4K2vcx-00IXN3; Mon, 18 Feb 2019 22:07:27 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: Thomas Gleixner , linux-arch@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, yury.norov@gmail.com, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, Stafford Horne , Vineet Gupta , Palmer Dabbelt , Guo Ren , Greentime Hu , arnd@arndb.de, linux-riscv@lists.infradead.org, Guan Xuetao Subject: [PATCH 4/8] asm-generic: Make time32 syscall numbers optional Date: Mon, 18 Feb 2019 22:07:08 +0100 Message-Id: <20190218210712.3503891-5-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190218210712.3503891-1-arnd@arndb.de> References: <20190218210712.3503891-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ZM1Q1nM21WPEbhvyNhcHiGjl4sPKCdT6gS0sFfLTc/N27OBaRVj XyXleEwKq+tZKPSIscJJzFpoy6/Ggu/2zqbgvvBx7d2P5JOnibB+ynK5IwPWMizRrwq+pc3 +bRy0QTuf0t5TbBNE88xTFmDxdIaoh6F+CWhoQd9O4UU0oxv2dGOOFxKiBNetYvvXjvIKB8 IGHslNCJ1z5JNr5n1MysQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:g9VK9amJEjw=:MPn1M99LKrmkpooKNzpmhL 79FmbhJjIg9libxoWmWyjIM+CKyftqQXKovahwHPvI9DoCXkysmKRbNGlO7W6VCQC9geKrZDI WnHLZcPasGAzKNp8pWj3K305MNHaSuAVl2Eko8dYZOVKYhXP5BbAn8nHSDcEzi2JyqZeDIAwo OKrqShi0wPzjtmd/WWhnmXY8d6fwgMETnoYJNgyOXWm1eKoDua6Zair4ivuMjxI6K2HK8yZDn U+2xW7i59cElNC8tUg9R60NTPg8AZZydQpu5eAYNi3QizQBBBI5QMtU5CQO004AP/YbsWbwMp jgKIoQFTCmQvtNt1sgLWmBrX6hLEAZp6lilkF4D3eJMKK2phUvDUG0bbFeY3cs8Uq7RudJhvp Gr7YJbpnINil3YSpW7jEfwc/KbPqOHDvX5UTgc3D276ayKfoVP0/o9mpyRqiINMm6VrLxTRtk HelMuWvqNczcev75LEnwnHWKrwPl2Wte7yBGgAnX8iPNUpzyATy1MYmWbVCL75BYgAhfI5I5J O1Uq+MeZJp2fOvtDZ+TfbdUtn/HN8Si/zZ54rLHr8KW9HR3XPp7yDzJPz7HLN+zhNT/TCalvh 0F6VTJvPr0KQgPdwLQYl37FkCmcDQcocKvuFgaEJvM763hN45OB1pRgT7XynYnkpGGEjM7P/N 35CCGGgrZIal4ISu91xwoI0YpXBuFVlgFvBzsaa61dyJYahOA1dfLyod8KxSd3kjcLxWy9v+y uqowgaDE53AGHPHjU63HQQ3mrPwpNP5N39sexA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We don't want new architectures to even provide the old 32-bit time_t based system calls any more, or define the syscall number macros. Add a new __ARCH_WANT_TIME32_SYSCALLS macro that gets enabled for all existing 32-bit architectures so we don't change any current behavior. Since this symbol is evaluated in user space as well, we cannot use a Kconfig CONFIG_* macro but have to define it in uapi/asm/unistd.h. On 64-bit architectures, the same system call numbers mostly refer to the system calls we want to keep, as they already pass 64-bit time_t. As new architectures no longer provide these, we need new exceptions in checksyscalls.sh. Signed-off-by: Arnd Bergmann --- arch/arc/include/uapi/asm/unistd.h | 1 + arch/arm64/include/uapi/asm/unistd.h | 1 + arch/c6x/include/uapi/asm/unistd.h | 1 + arch/csky/include/uapi/asm/unistd.h | 1 + arch/h8300/include/uapi/asm/unistd.h | 1 + arch/hexagon/include/uapi/asm/unistd.h | 1 + arch/nds32/include/uapi/asm/unistd.h | 1 + arch/nios2/include/uapi/asm/unistd.h | 1 + arch/openrisc/include/uapi/asm/unistd.h | 1 + arch/riscv/include/uapi/asm/unistd.h | 3 ++ arch/unicore32/include/uapi/asm/unistd.h | 1 + include/uapi/asm-generic/unistd.h | 36 ++++++++++++++++++++++++ scripts/checksyscalls.sh | 7 +++++ 13 files changed, 56 insertions(+) -- 2.20.0 diff --git a/arch/arc/include/uapi/asm/unistd.h b/arch/arc/include/uapi/asm/unistd.h index 6a1a62a979dd..5eafa1115162 100644 --- a/arch/arc/include/uapi/asm/unistd.h +++ b/arch/arc/include/uapi/asm/unistd.h @@ -23,6 +23,7 @@ #define __ARCH_WANT_SYS_CLONE #define __ARCH_WANT_SYS_VFORK #define __ARCH_WANT_SYS_FORK +#define __ARCH_WANT_TIME32_SYSCALLS #define sys_mmap2 sys_mmap_pgoff diff --git a/arch/arm64/include/uapi/asm/unistd.h b/arch/arm64/include/uapi/asm/unistd.h index 79937de2a0cc..4703d218663a 100644 --- a/arch/arm64/include/uapi/asm/unistd.h +++ b/arch/arm64/include/uapi/asm/unistd.h @@ -18,5 +18,6 @@ #define __ARCH_WANT_RENAMEAT #define __ARCH_WANT_NEW_STAT #define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS #include diff --git a/arch/c6x/include/uapi/asm/unistd.h b/arch/c6x/include/uapi/asm/unistd.h index e3721b2cfd6a..79b724c39d9b 100644 --- a/arch/c6x/include/uapi/asm/unistd.h +++ b/arch/c6x/include/uapi/asm/unistd.h @@ -19,6 +19,7 @@ #define __ARCH_WANT_STAT64 #define __ARCH_WANT_SET_GET_RLIMIT #define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_TIME32_SYSCALLS /* Use the standard ABI for syscalls. */ #include diff --git a/arch/csky/include/uapi/asm/unistd.h b/arch/csky/include/uapi/asm/unistd.h index f5c83492136f..ec60e49cea66 100644 --- a/arch/csky/include/uapi/asm/unistd.h +++ b/arch/csky/include/uapi/asm/unistd.h @@ -3,6 +3,7 @@ #define __ARCH_WANT_SYS_CLONE #define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS #include #define __NR_set_thread_area (__NR_arch_specific_syscall + 0) diff --git a/arch/h8300/include/uapi/asm/unistd.h b/arch/h8300/include/uapi/asm/unistd.h index b9e9352f2328..eb7bc0012af5 100644 --- a/arch/h8300/include/uapi/asm/unistd.h +++ b/arch/h8300/include/uapi/asm/unistd.h @@ -3,5 +3,6 @@ #define __ARCH_WANT_RENAMEAT #define __ARCH_WANT_STAT64 #define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS #include diff --git a/arch/hexagon/include/uapi/asm/unistd.h b/arch/hexagon/include/uapi/asm/unistd.h index 6bb392a33c35..432c4db1b623 100644 --- a/arch/hexagon/include/uapi/asm/unistd.h +++ b/arch/hexagon/include/uapi/asm/unistd.h @@ -35,5 +35,6 @@ #define __ARCH_WANT_SYS_CLONE #define __ARCH_WANT_SYS_VFORK #define __ARCH_WANT_SYS_FORK +#define __ARCH_WANT_TIME32_SYSCALLS #include diff --git a/arch/nds32/include/uapi/asm/unistd.h b/arch/nds32/include/uapi/asm/unistd.h index eb98d24d3190..4ec8f543103f 100644 --- a/arch/nds32/include/uapi/asm/unistd.h +++ b/arch/nds32/include/uapi/asm/unistd.h @@ -4,6 +4,7 @@ #define __ARCH_WANT_STAT64 #define __ARCH_WANT_SYNC_FILE_RANGE2 #define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS /* Use the standard ABI for syscalls */ #include diff --git a/arch/nios2/include/uapi/asm/unistd.h b/arch/nios2/include/uapi/asm/unistd.h index fa68e68bc26d..0b4bb1d41b28 100644 --- a/arch/nios2/include/uapi/asm/unistd.h +++ b/arch/nios2/include/uapi/asm/unistd.h @@ -21,6 +21,7 @@ #define __ARCH_WANT_RENAMEAT #define __ARCH_WANT_STAT64 #define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS /* Use the standard ABI for syscalls */ #include diff --git a/arch/openrisc/include/uapi/asm/unistd.h b/arch/openrisc/include/uapi/asm/unistd.h index 2e0bc0ff9f31..566f8c4f8047 100644 --- a/arch/openrisc/include/uapi/asm/unistd.h +++ b/arch/openrisc/include/uapi/asm/unistd.h @@ -24,6 +24,7 @@ #define __ARCH_WANT_SET_GET_RLIMIT #define __ARCH_WANT_SYS_FORK #define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_TIME32_SYSCALLS #include diff --git a/arch/riscv/include/uapi/asm/unistd.h b/arch/riscv/include/uapi/asm/unistd.h index d9340c52e7ad..486a288b454c 100644 --- a/arch/riscv/include/uapi/asm/unistd.h +++ b/arch/riscv/include/uapi/asm/unistd.h @@ -19,6 +19,9 @@ #define __ARCH_WANT_NEW_STAT #endif /* __LP64__ */ #define __ARCH_WANT_SET_GET_RLIMIT +#ifndef __LP64__ +#define __ARCH_WANT_TIME32_SYSCALLS +#endif #include diff --git a/arch/unicore32/include/uapi/asm/unistd.h b/arch/unicore32/include/uapi/asm/unistd.h index 2b575c0cf177..4e5e624f5d7e 100644 --- a/arch/unicore32/include/uapi/asm/unistd.h +++ b/arch/unicore32/include/uapi/asm/unistd.h @@ -13,6 +13,7 @@ #define __ARCH_WANT_RENAMEAT #define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS /* Use the standard ABI for syscalls. */ #include diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 2cdf600b05fa..12cdf611d217 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -38,8 +38,10 @@ __SYSCALL(__NR_io_destroy, sys_io_destroy) __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit) #define __NR_io_cancel 3 __SYSCALL(__NR_io_cancel, sys_io_cancel) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_io_getevents 4 __SC_3264(__NR_io_getevents, sys_io_getevents_time32, sys_io_getevents) +#endif /* fs/xattr.c */ #define __NR_setxattr 5 @@ -222,10 +224,12 @@ __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) __SYSCALL(__NR3264_sendfile, sys_sendfile64) /* fs/select.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_pselect6 72 __SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_pselect6_time32) #define __NR_ppoll 73 __SC_COMP_3264(__NR_ppoll, sys_ppoll_time32, sys_ppoll, compat_sys_ppoll_time32) +#endif /* fs/signalfd.c */ #define __NR_signalfd4 74 @@ -269,16 +273,20 @@ __SC_COMP(__NR_sync_file_range, sys_sync_file_range, \ /* fs/timerfd.c */ #define __NR_timerfd_create 85 __SYSCALL(__NR_timerfd_create, sys_timerfd_create) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_timerfd_settime 86 __SC_3264(__NR_timerfd_settime, sys_timerfd_settime32, \ sys_timerfd_settime) #define __NR_timerfd_gettime 87 __SC_3264(__NR_timerfd_gettime, sys_timerfd_gettime32, \ sys_timerfd_gettime) +#endif /* fs/utimes.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_utimensat 88 __SC_3264(__NR_utimensat, sys_utimensat_time32, sys_utimensat) +#endif /* kernel/acct.c */ #define __NR_acct 89 @@ -309,8 +317,10 @@ __SYSCALL(__NR_set_tid_address, sys_set_tid_address) __SYSCALL(__NR_unshare, sys_unshare) /* kernel/futex.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_futex 98 __SC_3264(__NR_futex, sys_futex_time32, sys_futex) +#endif #define __NR_set_robust_list 99 __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ compat_sys_set_robust_list) @@ -319,8 +329,10 @@ __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ compat_sys_get_robust_list) /* kernel/hrtimer.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_nanosleep 101 __SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep) +#endif /* kernel/itimer.c */ #define __NR_getitimer 102 @@ -341,14 +353,19 @@ __SYSCALL(__NR_delete_module, sys_delete_module) /* kernel/posix-timers.c */ #define __NR_timer_create 107 __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_timer_gettime 108 __SC_3264(__NR_timer_gettime, sys_timer_gettime32, sys_timer_gettime) +#endif #define __NR_timer_getoverrun 109 __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_timer_settime 110 __SC_3264(__NR_timer_settime, sys_timer_settime32, sys_timer_settime) +#endif #define __NR_timer_delete 111 __SYSCALL(__NR_timer_delete, sys_timer_delete) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_clock_settime 112 __SC_3264(__NR_clock_settime, sys_clock_settime32, sys_clock_settime) #define __NR_clock_gettime 113 @@ -358,6 +375,7 @@ __SC_3264(__NR_clock_getres, sys_clock_getres_time32, sys_clock_getres) #define __NR_clock_nanosleep 115 __SC_3264(__NR_clock_nanosleep, sys_clock_nanosleep_time32, \ sys_clock_nanosleep) +#endif /* kernel/printk.c */ #define __NR_syslog 116 @@ -388,9 +406,11 @@ __SYSCALL(__NR_sched_yield, sys_sched_yield) __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) #define __NR_sched_get_priority_min 126 __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_sched_rr_get_interval 127 __SC_3264(__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32, \ sys_sched_rr_get_interval) +#endif /* kernel/signal.c */ #define __NR_restart_syscall 128 @@ -411,9 +431,11 @@ __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) __SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask) #define __NR_rt_sigpending 136 __SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_rt_sigtimedwait 137 __SC_COMP_3264(__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32, \ sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32) +#endif #define __NR_rt_sigqueueinfo 138 __SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ compat_sys_rt_sigqueueinfo) @@ -486,12 +508,14 @@ __SYSCALL(__NR_prctl, sys_prctl) __SYSCALL(__NR_getcpu, sys_getcpu) /* kernel/time.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_gettimeofday 169 __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday) #define __NR_settimeofday 170 __SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday) #define __NR_adjtimex 171 __SC_3264(__NR_adjtimex, sys_adjtimex_time32, sys_adjtimex) +#endif /* kernel/timer.c */ #define __NR_getpid 172 @@ -516,11 +540,13 @@ __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open) #define __NR_mq_unlink 181 __SYSCALL(__NR_mq_unlink, sys_mq_unlink) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_mq_timedsend 182 __SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend) #define __NR_mq_timedreceive 183 __SC_3264(__NR_mq_timedreceive, sys_mq_timedreceive_time32, \ sys_mq_timedreceive) +#endif #define __NR_mq_notify 184 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) #define __NR_mq_getsetattr 185 @@ -541,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) __SYSCALL(__NR_semget, sys_semget) #define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_semtimedop 192 __SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32) +#endif #define __NR_semop 193 __SYSCALL(__NR_semop, sys_semop) @@ -663,8 +691,10 @@ __SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \ __SYSCALL(__NR_perf_event_open, sys_perf_event_open) #define __NR_accept4 242 __SYSCALL(__NR_accept4, sys_accept4) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_recvmmsg 243 __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recvmmsg_time32) +#endif /* * Architectures may provide up to 16 syscalls of their own @@ -672,8 +702,10 @@ __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recv */ #define __NR_arch_specific_syscall 244 +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_wait4 260 __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) +#endif #define __NR_prlimit64 261 __SYSCALL(__NR_prlimit64, sys_prlimit64) #define __NR_fanotify_init 262 @@ -684,8 +716,10 @@ __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) #define __NR_open_by_handle_at 265 __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_clock_adjtime 266 __SC_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime) +#endif #define __NR_syncfs 267 __SYSCALL(__NR_syncfs, sys_syncfs) #define __NR_setns 268 @@ -738,8 +772,10 @@ __SYSCALL(__NR_pkey_alloc, sys_pkey_alloc) __SYSCALL(__NR_pkey_free, sys_pkey_free) #define __NR_statx 291 __SYSCALL(__NR_statx, sys_statx) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_io_pgetevents 292 __SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, compat_sys_io_pgetevents) +#endif #define __NR_rseq 293 __SYSCALL(__NR_rseq, sys_rseq) #define __NR_kexec_file_load 294 diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh index 53c5677d7e82..ffd635efbdca 100755 --- a/scripts/checksyscalls.sh +++ b/scripts/checksyscalls.sh @@ -143,6 +143,13 @@ cat << EOF #define __IGNORE_rt_sigtimedwait #define __IGNORE_futex #define __IGNORE_sched_rr_get_interval +#define __IGNORE_gettimeofday +#define __IGNORE_settimeofday +#define __IGNORE_wait4 +#define __IGNORE_adjtimex +#define __IGNORE_nanosleep +#define __IGNORE_io_getevents +#define __IGNORE_recvmmsg #endif /* i386-specific or historical system calls */ From patchwork Mon Feb 18 21:07:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 158644 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2935275jaa; Mon, 18 Feb 2019 13:08:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IbuRbPtH8etRlJxirfT2Rgpvc/mD3ikLrEsWig2ahtaDcbyPr3vloanJ1IFFGzrnN6nJ1nG X-Received: by 2002:a17:902:8344:: with SMTP id z4mr7383329pln.77.1550524113311; Mon, 18 Feb 2019 13:08:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550524113; cv=none; d=google.com; s=arc-20160816; b=pEaFZ6TRhoHep5Uogz3SiUzZn4D2Bv5jnDrdtU2kDTx1Upo2kW2yUkJ+ZyyuAdHnCE opoHO9o1a6jVSLdd94Z0twi2GhCtzugWErOkrPb22vMA9KPMlGT6GqeJpkjSFKS1f/tO hpygyz9AYUfe/ljPWJIpEkGYYaRsYvBLXAKbAfznHUGZCz0lxm7qjdzrwe22MRynDNXE iHA8fGMLzFGY7RqmaoV8guRw2c6t8qERGhoR9BMn4ZfytJXFj/pmC1fqRivdm+1Co6qG MynCOauF6C4RtMAffhUF7GAF9/z+0/PD3wncfVl2MHncPFpEScmP95t3sGFJml6DFeyu PpnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WmhEzoo8YaAFEUkanOwpAE/P6uTAi0VFQIDE6hrr30U=; b=V2mA34tUpdYRh6+zQjVzMI3NmzPXBgwAm/xvvC0IsE7+ifIEJfHWXhzlcvJMoc6dK6 OZWYV2OmHtDXW8qqKhF/xOHcfq1dL51YfeqAeH+YW48qCT1bKvQqx0CUMxDuHMZ0OhxC 80s1jJZcZiecKEFZXtpvMIBDN/pmfMv65wdSf8Uo8ug/R9D6vEMUsR5n8sbv/IziKXLY Od/KveCFu6tCzn0Vuw4ePqbwm4W6l4dcj9wkz8Xi35K0UWymJaHHpOHCFQLj543UcAX5 aq9fshQBv3IhCRWJ+6oTwIfS/A3qm85vkTikV4xZnz1e5EjTyijO0pwm7FokYpy+wiA3 QiHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g63si6236239pgc.382.2019.02.18.13.08.32; Mon, 18 Feb 2019 13:08:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728809AbfBRVID (ORCPT + 32 others); Mon, 18 Feb 2019 16:08:03 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:42149 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727340AbfBRVH6 (ORCPT ); Mon, 18 Feb 2019 16:07:58 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1MwPjf-1hESyz1HV7-00sQM3; Mon, 18 Feb 2019 22:07:28 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: Thomas Gleixner , linux-arch@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, yury.norov@gmail.com, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, Stafford Horne , Vineet Gupta , Palmer Dabbelt , Guo Ren , Greentime Hu , arnd@arndb.de, linux-riscv@lists.infradead.org, Guan Xuetao Subject: [PATCH 5/8] unicore32: Fix __ARCH_WANT_STAT64 definition Date: Mon, 18 Feb 2019 22:07:09 +0100 Message-Id: <20190218210712.3503891-6-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190218210712.3503891-1-arnd@arndb.de> References: <20190218210712.3503891-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:e5iV7jAPMPcGjRPi5MYNZ2dkznZ8Mrfx++9ngOzQfg3eN/TiQ1R 189AXFIfz0cS7YjZUjf7xpRIC+5HGDzQrVDpbwnWeWZYnSH6gDE4OS2+d9PddhFkBcsqNC3 gkSMnhQ/1X5TPh7cDtrVgQk3tG6Ere1m238Mf0fY6tAGIKRw+GnPuguBJ/QmmtfBExPQkwj K2FyVc6iNYGZicULIu0mw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:gI5wfFjSFEE=:LWNxFn7RL5I+WsBjHLIVXM omzfoUukQpkdif1Aifk2CaM+uCLu97sodQrVqAKEmJNvL8vU6Rz9au8I7/6LYLLZ2Xefe1eyV yLVyxmJITR7cFaGJFSJZd1M+8eGYej0R3l54Fv/8S8RG9V6H+NHo+21tr+XgtPZI1lIZyCX0V 7+2ZkslAxXFR1f9dW/f+LURiJgEol+sc9RxYBxrPxZmBSXpOXmIAIHIEUaLPlX3lQmfG7INRy 6t/+5EEqHWX8EiwZ+IzrT7I4TV5KQwHVLcFvL1bUEHe7VJdUTsEuTWu0cnXqpwfffnPGKU2LE fwCgv2n584SKNZjerSO2/h38m3glzmb+jAPCsjG531KFMC3DxlWx/ODxizOg2YBQaaWJAGOrM O5DJRP/rCYfLXHLEXJznQHzpFW0iXSrQUdPx8Fqy6+JmUP87frzv0lqxkUp9DBTYzIcAnL23M PevSFPAOiAyZDx8D76O37xtLpeUKAZ3WqrhLhuR6rScgKhDLYRZhQAn2LU0ZCuh0pKi2EwSP4 P0RK0vT6L/LizZRXGqGbc+xOyK0lTz1D1TR1UDUD7KuKGcgcde5rioT/7YltNq2n4OdsmcFkG YPsdOCZDgRO/gIiVXOoFxrCLvlhT3KuPIu2ZmnZyKHx7c+72B0dzBTBCtMVIQ96cojUzrxUL/ g2+5u37brMmdGBJ2Snq66VsTdJMLw2bBbRfwT1aOBa/kfbVBefs52sMhbLLuIaM1hKxxDc79r lj/4nMMwaxinhvIehCaknN+7V1PQlxYngbqhyw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The __ARCH_WANT_STAT64 macro must be defined before including asm-generic/unistd.h. I got this right for everything except unicore32. Fixes: bf4b6a7d371e ("y2038: Remove stat64 family from default syscall set") Signed-off-by: Arnd Bergmann --- arch/unicore32/include/uapi/asm/unistd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 diff --git a/arch/unicore32/include/uapi/asm/unistd.h b/arch/unicore32/include/uapi/asm/unistd.h index 4e5e624f5d7e..54a7378a70b1 100644 --- a/arch/unicore32/include/uapi/asm/unistd.h +++ b/arch/unicore32/include/uapi/asm/unistd.h @@ -13,9 +13,9 @@ #define __ARCH_WANT_RENAMEAT #define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_STAT64 #define __ARCH_WANT_TIME32_SYSCALLS /* Use the standard ABI for syscalls. */ #include -#define __ARCH_WANT_STAT64 #define __ARCH_WANT_SYS_CLONE From patchwork Mon Feb 18 21:07:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 158647 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2935597jaa; Mon, 18 Feb 2019 13:08:52 -0800 (PST) X-Google-Smtp-Source: AHgI3IZPHmJqVd+3tTswFADaV00HCMPPL3agFoiRwzjsjffA8uQFKbp3nKLNqGQ9j2uu+85f5CXk X-Received: by 2002:a63:1b49:: with SMTP id b9mr20667348pgm.112.1550524132554; Mon, 18 Feb 2019 13:08:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550524132; cv=none; d=google.com; s=arc-20160816; b=VGnqaH3uXTaoQLYRnGPOZSuw0iEX/fDRGLeYhmsG3H1RUm0nM10FNBCn2hWrxtcO14 IifzJmh/zTI4l4bHEtV8lWIVmn9OTq3a+ShA/2o7lNfOXBRegOh1liuB9cMi0rHEdVgz +kedafkJQKdFaH4KF4lkG63rF0pFGf18FLzPT8kWDhmR6DVG/Y+N18A/xlwbyz9s3XyB 1f9z4TZjhbPyCfV7i+otbm6IZMt+bmNsHBJ+4S0ECTzHq0x2X3chsGqin8je6+7NtUb2 Q6BRvBaWhVrjOm1JHKsicQ/XKskijkVW40qr6HKynOQD1iJrrNhxFFjuxTM+U+nZOl36 GSdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xW+9nrIkZQTEkqgq/vptkigJEVkAMfCRmoIi6W5fckA=; b=hphUNmSlTZE0pgISJouwmxcE0PouNkr5uB2D951ffiTNS24WIp9dFDy9RVF81YV/Cc 8sXL5u/r5DiMOpoFh3HYl7kGPDs8VztqZehpDROTo6dfbBiA4baSp5OUIRoQvbIuvVJk zjLmE481KfHCtfM3HGgYQTOVCnDCq6BG9nuxDSRd+PT8YyX58JQ0vn1toyKYjrS2xekV +mf8/wb/kVqgYVk+mkKEv+/dDHOprILm+ulkzcKD/cfTAKaH3xT3QxTYHYL0F6gGOuyD D7sFN82Lo9f8eBt+Z9UoKgbpDFp7Zeiz/BU8yUwSBnTsA7dnsw2/SOvSMe2YK+NykqrY 5zWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6si14114329pgg.2.2019.02.18.13.08.51; Mon, 18 Feb 2019 13:08:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730218AbfBRVIu (ORCPT + 32 others); Mon, 18 Feb 2019 16:08:50 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:40305 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728154AbfBRVIA (ORCPT ); Mon, 18 Feb 2019 16:08:00 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1MlO9r-1hL1UD3zaP-00liHH; Mon, 18 Feb 2019 22:07:29 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: Thomas Gleixner , linux-arch@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, yury.norov@gmail.com, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, Stafford Horne , Vineet Gupta , Palmer Dabbelt , Guo Ren , Greentime Hu , arnd@arndb.de, linux-riscv@lists.infradead.org, Guan Xuetao Subject: [PATCH 6/8] checksyscalls: fix up mq_timedreceive and stat exceptions Date: Mon, 18 Feb 2019 22:07:10 +0100 Message-Id: <20190218210712.3503891-7-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190218210712.3503891-1-arnd@arndb.de> References: <20190218210712.3503891-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:UgT5qLzBRe8uGhCU9AyHn5Jt9cfHoQ+D0/iLF4gMTpdoEuzsO5q poQ3zyyety+N59s3VxhuXLURLB1ufFgiJP7cPrbxRJTMbWMQ7K0uKTGBFu/NpnSZWaFSdog T5gcp2hhQXO/x3YKwmnCZyKSdPjGDBSytrIMMHzUDbw9nXiaOEcLEtNWS47SPtFe0pvedzm Ahdkq9w/U6TCxmxQhHcnQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:FXDoJv4Bfvw=:6GGmsD/rmCT7ei5OeBL7DH t9coJHnvAkWeYWrmUafR5IWBjDhHbw2hVsAkjpwqjvj3M0jVTAtvr7aqtTJp3u2S6u2FYnMqW oespDKsgf17cgnskdeI7Sy/It7HDngnnl74fqB+LbOq6/d7fW09m7xuwmbqLX9HGP30okqkVC l7Rv7RBccaKtbAvSmZmfBLGqy4RvBP2v1u7W8bw0wCcDCNj/9OGlxnPdKoduPuCDMljPNKkFg JTtgWH8cJKfZZ2jO2wbH+O8AtgAx2NPL0R3zDybKPp0Dsvbr4choUvo5Ukzb/LYmpBH/5SqTj 0eUWMq3UHbkVx8A/WLYPvrRLXGGufyIG3fJukEQka4tWA9POcGL7GbFZdx6cX1YBavQM6+ByU zU4K+JW1rJnKBnsQVgKCCms9O+DsmmG7AUmR4yF7tA00HB40Cy1HsgjbxYpo0aWBks6MLe+8E S7M6NSY9pyhl8HXrsGEtNZYBhlLUN0Cgw0vl8vgW3V9gq7fPe+GUbtgAxR7VsfN4YHZACoZ/p IzfbkPLQA2l7yP0ln+KZkpHc+jEUnWcCy6Leah+mx8/eM2RAQSXAVtrOZGtmgJWqm69jQKts1 eeB3ScSFFC+r9IGdyNPr8m6apR0guzuUaE1Vw6q+1wIVfXRrJu6sT7SocYw82+e3UcDNhEurI 7gyiHW/RS/RFQmAfCFQy82U8gb9TOHsW93BtxnO0Uva0vatR8Yfwov25b1QvqBmgsxezJ9Bpq o0d2GWfT3VWHoeSTt3tl9IAc2q/hmZNKR3+1xg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mq_timedreceive was spelled incorrectly, and we need exceptions for new architectures that leave out newstat or stat64, implementing only statx() now. Fixes: 48166e6ea47d ("y2038: add 64-bit time_t syscalls to all 32-bit architectures") Fixes: bf4b6a7d371e ("y2038: Remove stat64 family from default syscall set") Signed-off-by: Arnd Bergmann --- scripts/checksyscalls.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.20.0 diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh index ffd635efbdca..a18b47695f55 100755 --- a/scripts/checksyscalls.sh +++ b/scripts/checksyscalls.sh @@ -30,13 +30,10 @@ cat << EOF #define __IGNORE_readlink /* readlinkat */ #define __IGNORE_symlink /* symlinkat */ #define __IGNORE_utimes /* futimesat */ -#if BITS_PER_LONG == 64 #define __IGNORE_stat /* fstatat */ #define __IGNORE_lstat /* fstatat */ -#else #define __IGNORE_stat64 /* fstatat64 */ #define __IGNORE_lstat64 /* fstatat64 */ -#endif #ifndef __ARCH_WANT_SET_GET_RLIMIT #define __IGNORE_getrlimit /* getrlimit */ @@ -138,7 +135,7 @@ cat << EOF #define __IGNORE_io_pgetevents #define __IGNORE_recvmmsg #define __IGNORE_mq_timedsend -#define __IGNORE_mq_timedreceiv +#define __IGNORE_mq_timedreceive #define __IGNORE_semtimedop #define __IGNORE_rt_sigtimedwait #define __IGNORE_futex From patchwork Mon Feb 18 21:07:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 158640 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2934853jaa; Mon, 18 Feb 2019 13:08:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IZWerruQHAhH6UXapDe+2P1eg3D8afVTRteFquakhawhLHg20QyT078V50jj29LhWOwl8oo X-Received: by 2002:a62:2ad6:: with SMTP id q205mr25926896pfq.243.1550524083166; Mon, 18 Feb 2019 13:08:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550524083; cv=none; d=google.com; s=arc-20160816; b=pSp+nzB1oGMGD3+ovqXXgH1lDROughOTbzYTd9PbSW5S49iz1vQw9sJCvUK4prSvZr EgPvUFGGViUVqDem6m5/YKBem5l6gZ4tt6b/RiaXL1QzMx8OHZTMgq25GURD8actOYae 6kli7q16YvCD7N1Qln77LZOYR6L1dWomzTXDSxnzwQtJwYyzFCYUOdNYoUqxMSWV27P6 Cx1SHr0if0sTmcriMOanxK8ypJZW9CcKw+mH404b2p4JeQEGFnmaV91PVY0IVB2IodHt UJ4KqlunWonWDcg2RPoRlQVNQUdYVixdB07Vcb9GFwOebybFeU1dWga7TdCdqtrVoA6r mSmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=AAZMXf2MbMeUT3XS2ob3BZf/0qmbBxm4FWOjTp7thkU=; b=Ud9d5pi74EDw2I5XjIdtkyS6CaZoCfIFICPOMSSXAgXnyFca1Q5zJR0bJZmp7TgLWI xZAqLpRLEpj68xPWvtyD2R310lLCPTAHrBJTwKy7opqUtD3IGPbTDE6SoUcb+vcyvfVr aa9VvsfDyZB7L+eo4LtaU0e5NKO8kIT4MvveHyZW27cG/Ju/6cSNx2eY3BX6cyYvUY4E vfjhG1bWsHNdu20YtBGtlOuOb+7kpw6RS0IdAYCOx1Jm4PHD8hsnH2DU80ON5+wf/EQJ s+tkB15K4J7cDzU4LVITKkdWQM0pRAepDfBamd358SpquyJelXGNfwEiL2g62DHoI3Wz dpQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15si13833243pgf.321.2019.02.18.13.08.02; Mon, 18 Feb 2019 13:08:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728501AbfBRVIA (ORCPT + 32 others); Mon, 18 Feb 2019 16:08:00 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:50101 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725806AbfBRVH6 (ORCPT ); Mon, 18 Feb 2019 16:07:58 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1MYvHa-1gZvZR2VSy-00UtS6; Mon, 18 Feb 2019 22:07:29 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: Thomas Gleixner , linux-arch@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, yury.norov@gmail.com, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, Stafford Horne , Vineet Gupta , Palmer Dabbelt , Guo Ren , Greentime Hu , arnd@arndb.de, linux-riscv@lists.infradead.org, Guan Xuetao Subject: [PATCH 7/8] csky: Use latest system call ABI Date: Mon, 18 Feb 2019 22:07:11 +0100 Message-Id: <20190218210712.3503891-8-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190218210712.3503891-1-arnd@arndb.de> References: <20190218210712.3503891-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:b9uGlJZjYWR0TeRDyLkO0y46fjRMT6X+cqSqFO9XKVQTCBbYU4k lqAzapNVCiizm6JQu9hlZXLd9zdDa9NpI6N+vWtguD18PgqQWTdIUMiNfWHZyyu1VhmCnZO YuhMkgj/O//KHs+9BWKQAluN3GvcadruPhi2m7LWm2ED2/epAJVhzvFqPEA0jiBJGkYNa1z ef5UNsDCjbuUd1nCxCBzA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:yfd0sA9GaOs=:n7pkNDVjGX9jsrtkpjCKIV MvNdGj/B2VYYToKFb9TuPve71L7+IOm3/m1RCEuBcNbHVzfi8Emh1bkaa7pEB3XdxI2f5Xxah G3P7RlCMPGJOigz8xG+g16DXO5WzQQ20cohHSra7HNSngbL/jBCaI9WidivWeqYD7j3r12zyi bFtTj44bzd4yQwNOgdkzzGMaGYuuoaTCzXqDHYAiFUL+U+dcSFJOYQW18COw8vtgi7+/H4jwA PKmhKUdYYTMIXfsn9UB1Ix8R+2u07rBRyPa1alYMR4rbphJdyYznT/nG8r9NkKjYVufKkeToA tX76RZ/OzwNr2xSpl60cgLFDy0w9YOGKAIz79D2zDSAt+ekxc/+GahpvAUk41+PZsPV/CR9am 5ww8qcFJ7KxnfkAg9SpVSwIxHzGV0kw3SiR46FdF4IvPSMgcbpI3PX1vszcTMaNtrcMP7Ft2y kaiaWtwZHtdM6WnewsRAfHQJsBwF1oia3pggtfzbltLG6MkoBRjc5GAsPW4Aa/WktuMjUqbD9 3f3eu1XmnOAQUL3mq3GJhP85UdM1qoiANVdgpWg1eFVcbc4z8NmNlIoNmIvZz387xvq69rxpQ YfIWJj9/ZKhwjAYQSbD/HD/MBzzwAlnybqjHn1pSWtB5hnIgVJuIDq9Kg63l/eaU4Aks2tgwv pAfKYIFDhID4rHBl2cJFxxCAZDvVSk3zFn2/2SWyPszeYuNF+KMp7tqDwEHKFSnpmrS8rRwlG vY3wB1GLQ7Vv12T2FIyyPgLmxKnAad1RKx+GDg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We don't yet have an upstream glibc port for csky, so there is no user space for the existing ABI, and we can remove the definitions for 32-bit time_t, off_t and struct resource. Signed-off-by: Arnd Bergmann --- arch/csky/Kconfig | 1 - arch/csky/include/uapi/asm/unistd.h | 2 -- 2 files changed, 3 deletions(-) -- 2.20.0 diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig index 6959e0b1e956..398113c845f5 100644 --- a/arch/csky/Kconfig +++ b/arch/csky/Kconfig @@ -1,6 +1,5 @@ config CSKY def_bool y - select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_USE_BUILTIN_BSWAP diff --git a/arch/csky/include/uapi/asm/unistd.h b/arch/csky/include/uapi/asm/unistd.h index ec60e49cea66..224c9a9ab45b 100644 --- a/arch/csky/include/uapi/asm/unistd.h +++ b/arch/csky/include/uapi/asm/unistd.h @@ -2,8 +2,6 @@ // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. #define __ARCH_WANT_SYS_CLONE -#define __ARCH_WANT_SET_GET_RLIMIT -#define __ARCH_WANT_TIME32_SYSCALLS #include #define __NR_set_thread_area (__NR_arch_specific_syscall + 0) From patchwork Mon Feb 18 21:07:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 158648 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2935744jaa; Mon, 18 Feb 2019 13:09:01 -0800 (PST) X-Google-Smtp-Source: AHgI3IaAtDX9uCX3TwKfAiyRmsN0H/TUEslQk3E+P+CMYEfX7CdolZNjuO6s2s3DjON9iuTc3BfE X-Received: by 2002:a63:d157:: with SMTP id c23mr20560175pgj.170.1550524141217; Mon, 18 Feb 2019 13:09:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550524141; cv=none; d=google.com; s=arc-20160816; b=0jYp1bBbMJAO1E/l3e8L1jUjqsbhxFDGngQA+ZAW4RD+oIvAzvZqojEmNFdQgP+2u3 8+L4G/bJ1L4y3NH+Uw4JmINQCUtkGIt2vCWRVR/pnvivu1gF5vTs/oG21PN02WCzihd+ 5FrbdAFzhhJ3uhJa4XxtskPreQF//u7fgmiwEx4X98RIwXKfKBO7yb2ZT+8JvaUUGMCJ wc9W+Cw2iKVJxKKJFz0BWoyRJTO1CwOBO/v/+8lhFkT8FHWY22A6lt1hjlzEqqfUdEKT zjnhK1/tboERHo0GikmZfrnWzl+ZIBve3UXqQdiWaL21oB8E125xid28Xv9OJoSRpB37 ZFMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=RTLOp5RKJYIxgRFjC79GV+utQwquF2imnJNeyIKaPnQ=; b=zDeARPvRC3Ocu/tKJTD/khkiCqOmiDlw/RH0JO0gxhhBU6oY3SB6CIWJDP95e2LowI iTli0VG+2f1eOdFTrtgA3uAJDliPzHUbyg55RFsl+drUTrNdkhOP39hU6v5r9TRa06SL 6BY/9zAgU5YQNhZAcDvQRozTxUVoZkcaZYgiqWy8Jfi3wWz9ckt1H+30CnMiVSC591xJ OdcSSRrxZlYH0OHuHSvTKcvVfovblIM70NOYXXoXgBncw6Llka0ALTx5+Smv/E+KCem7 ZhmcYMBBQMiEM4VykmMWyZ3P9dVj+jrf6BiLXxDx76aeQS9uT/w0smoSnaODgFAi2bts rIuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si14097208pgc.354.2019.02.18.13.09.00; Mon, 18 Feb 2019 13:09:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730261AbfBRVI6 (ORCPT + 32 others); Mon, 18 Feb 2019 16:08:58 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:52359 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728062AbfBRVH7 (ORCPT ); Mon, 18 Feb 2019 16:07:59 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1MekKJ-1hVzpn14AH-00akyl; Mon, 18 Feb 2019 22:07:30 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: Thomas Gleixner , linux-arch@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, yury.norov@gmail.com, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, Stafford Horne , Vineet Gupta , Palmer Dabbelt , Guo Ren , Greentime Hu , arnd@arndb.de, linux-riscv@lists.infradead.org, Guan Xuetao Subject: [PATCH 8/8] riscv: Use latest system call ABI Date: Mon, 18 Feb 2019 22:07:12 +0100 Message-Id: <20190218210712.3503891-9-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190218210712.3503891-1-arnd@arndb.de> References: <20190218210712.3503891-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ScKittBUPbtTQVR0D2l9QJ/Xwbz5RAo/fF1oCAct/9ud6octFcV h3yKXHywP14xKDxJaVLEsUWPE3OmqCjnG82aCB4NUdkfbVY7hwv4QqVPvKB1vAHJ19xcaO5 3xAwwTl6rnM1agEMyLmSR6J//chNkfRHVVpRX4ULBuwjtaigY5FA4YB1h9617BWsOOYJd8J fZOQ9NbBzqv5qvep4QBaw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:o9dJBFc/2PE=:6OUQhfzYWqi4WunWGXaGYB f8vS8yA6t8rxXrEjV2+dgiT8v9CkTOE5ltkLO1zfySqpw9H5yP4F0tmidAyGQKJ18jc2Qyp94 12pypKf9UmKVK0cryzzr6qL/Yd7V+vqidT+8nqsm9QdjbFqAc9oM7DNzuVibjvheQ575PHNon Mkcdar5U2VYCW9MNIVaGPXl7REnT6LfBbW7cKOSXDJ5Ueq6q+FqEBKs8oNtXSfKAtkQ6rlLAN rJhAaxiN2ekwUPA2db0cmGB6ORpu86ikvL7CCJ6phhyUf18Sj6Z+TlT/Jpe2HRzdBFxRSaYvQ DVhHv05ZNrwohLC1oTH7uSavLNKG003rJPSpe1+0gP2g1lBzc3paQSXYX+4pHayuHNOPwyeTt G0OOTppm5+VkOO8Duiax8ns/IvgW45ytBJ3BgpkjOjafbeOfmsyjSMoOzLv7IYCk+25Op6WFS YBBLvab8oC/VSpr/Kn6RGM+0ag37Y9rpso+qx6z4QOS9k+wtjuSC+9bVcCWGUWN0P253djT0F U8R9lm90BTHgXMmBSrCRhNsU8LQ/HJFHjt3A15sYM23jsPlBKWZl8GQeh4KXdeCjaJbGM4kgI gjI6yl7I8ImAunRYolHOLl+VULxe9YqMH94pqQHuIuu+TEguAJfxe5f4F4DYeHuKz1sxnZhts JD8zXIPwT20T6Or/Fu7ywh3ogDuoLSaL0IxeXGWpKnHv2g1KT62daFuvl0mG/exugc4Oc4PUZ HDKrpRF9L+odFkMf/xPku6J4TybLaPqhB2kBrQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We don't yet have an upstream glibc port for riscv, so there is no user space for the existing ABI, and we can remove the definitions for 32-bit time_t, off_t and struct resource and system calls based on them, including the vdso. Signed-off-by: Arnd Bergmann --- arch/riscv/Kconfig | 1 - arch/riscv/include/uapi/asm/unistd.h | 5 +---- arch/riscv/kernel/vdso/Makefile | 2 ++ 3 files changed, 3 insertions(+), 5 deletions(-) -- 2.20.0 diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 09fa3a87bf30..feeeaa60697c 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -11,7 +11,6 @@ config 32BIT config RISCV def_bool y - select ARCH_32BIT_OFF_T if !64BIT # even on 32-bit, physical (and DMA) addresses are > 32-bits select PHYS_ADDR_T_64BIT select OF diff --git a/arch/riscv/include/uapi/asm/unistd.h b/arch/riscv/include/uapi/asm/unistd.h index 486a288b454c..0e2eeeb1fd27 100644 --- a/arch/riscv/include/uapi/asm/unistd.h +++ b/arch/riscv/include/uapi/asm/unistd.h @@ -17,11 +17,8 @@ #ifdef __LP64__ #define __ARCH_WANT_NEW_STAT -#endif /* __LP64__ */ #define __ARCH_WANT_SET_GET_RLIMIT -#ifndef __LP64__ -#define __ARCH_WANT_TIME32_SYSCALLS -#endif +#endif /* __LP64__ */ #include diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile index eed1c137f618..fec62b24df89 100644 --- a/arch/riscv/kernel/vdso/Makefile +++ b/arch/riscv/kernel/vdso/Makefile @@ -2,9 +2,11 @@ # Symbols present in the vdso vdso-syms = rt_sigreturn +ifdef CONFIG_64BIT vdso-syms += gettimeofday vdso-syms += clock_gettime vdso-syms += clock_getres +endif vdso-syms += getcpu vdso-syms += flush_icache