From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: [PATCH 1/2] ipc: fix semtimedop for generic 32-bit architectures Date: Thu, 5 Sep 2019 17:21:24 +0200 Message-ID: <20190905152155.1392871-1-arnd@arndb.de> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: Sender: stable-owner@vger.kernel.org To: linux-kernel@vger.kernel.org, Andrew Morton Cc: linux-arch@vger.kernel.org, y2038@lists.linaro.org, Manfred Spraul , Davidlohr Bueso , Dominik Brodowski , "Eric W . Biederman" , Arnd Bergmann , Vincent Chen , stable@vger.kernel.org, Greentime Hu , Yoshinori Sato , Guan Xuetao , Stafford Horne , Jonas Bonn , Stefan Kristiansson , Ley Foon Tan , Richard Kuo , Mark Salter , Aurelien Jacquiot , Guo Ren Christian Brauner List-Id: linux-arch.vger.kernel.org As Vincent noticed, the y2038 conversion of semtimedop in linux-5.1 broke when commit 00bf25d693e7 ("y2038: use time32 syscall names on 32-bit") changed all system calls on all architectures that take a 32-bit time_t to point to the _time32 implementation, but left out semtimedop in the asm-generic header. This affects all 32-bit architectures using asm-generic/unistd.h: h8300, unicore32, openrisc, nios2, hexagon, c6x, arc, nds32 and csky. The notable exception is riscv32, which has dropped support for the time32 system calls entirely. Reported-by: Vincent Chen Cc: stable@vger.kernel.org Cc: Vincent Chen Cc: Greentime Hu Cc: Yoshinori Sato Cc: Guan Xuetao Cc: Stafford Horne Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: Ley Foon Tan Cc: Richard Kuo Cc: Mark Salter Cc: Aurelien Jacquiot Cc: Guo Ren Fixes: 00bf25d693e7 ("y2038: use time32 syscall names on 32-bit") Signed-off-by: Arnd Bergmann --- Hi Vincent, Sorry for the delay since your report. Does this address your problem? Anyone else, please note that this patch is required since 5.1 to make sysvipc work on the listed architectures. --- include/uapi/asm-generic/unistd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 1be0e798e362..1fc8faa6e973 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -569,7 +569,7 @@ __SYSCALL(__NR_semget, sys_semget) __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) +__SC_3264(__NR_semtimedop, sys_semtimedop_time32, sys_semtimedop) #endif #define __NR_semop 193 __SYSCALL(__NR_semop, sys_semop) -- 2.20.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de ([212.227.126.187]:44019 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731609AbfIEPXo (ORCPT ); Thu, 5 Sep 2019 11:23:44 -0400 From: Arnd Bergmann Subject: [PATCH 1/2] ipc: fix semtimedop for generic 32-bit architectures Date: Thu, 5 Sep 2019 17:21:24 +0200 Message-ID: <20190905152155.1392871-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-kernel@vger.kernel.org, Andrew Morton Cc: linux-arch@vger.kernel.org, y2038@lists.linaro.org, Manfred Spraul , Davidlohr Bueso , Dominik Brodowski , "Eric W . Biederman" , Arnd Bergmann , Vincent Chen , stable@vger.kernel.org, Greentime Hu , Yoshinori Sato , Guan Xuetao , Stafford Horne , Jonas Bonn , Stefan Kristiansson , Ley Foon Tan , Richard Kuo , Mark Salter , Aurelien Jacquiot , Guo Ren , Christian Brauner Message-ID: <20190905152124.DfG1V2oEcM4pVDY1Ppf3xFnglUW86_nd6mlF8u1hiKc@z> As Vincent noticed, the y2038 conversion of semtimedop in linux-5.1 broke when commit 00bf25d693e7 ("y2038: use time32 syscall names on 32-bit") changed all system calls on all architectures that take a 32-bit time_t to point to the _time32 implementation, but left out semtimedop in the asm-generic header. This affects all 32-bit architectures using asm-generic/unistd.h: h8300, unicore32, openrisc, nios2, hexagon, c6x, arc, nds32 and csky. The notable exception is riscv32, which has dropped support for the time32 system calls entirely. Reported-by: Vincent Chen Cc: stable@vger.kernel.org Cc: Vincent Chen Cc: Greentime Hu Cc: Yoshinori Sato Cc: Guan Xuetao Cc: Stafford Horne Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: Ley Foon Tan Cc: Richard Kuo Cc: Mark Salter Cc: Aurelien Jacquiot Cc: Guo Ren Fixes: 00bf25d693e7 ("y2038: use time32 syscall names on 32-bit") Signed-off-by: Arnd Bergmann --- Hi Vincent, Sorry for the delay since your report. Does this address your problem? Anyone else, please note that this patch is required since 5.1 to make sysvipc work on the listed architectures. --- include/uapi/asm-generic/unistd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 1be0e798e362..1fc8faa6e973 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -569,7 +569,7 @@ __SYSCALL(__NR_semget, sys_semget) __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) +__SC_3264(__NR_semtimedop, sys_semtimedop_time32, sys_semtimedop) #endif #define __NR_semop 193 __SYSCALL(__NR_semop, sys_semop) -- 2.20.0