Re: [PATCH v2 26/29] y2038: use time32 syscall names on 32-bit

2019-01-21 Thread Geert Uytterhoeven
On Fri, Jan 18, 2019 at 5:21 PM Arnd Bergmann  wrote:
> This is the big flip, where all 32-bit architectures set COMPAT_32BIT_TIME
> abd use the _time32 system calls from the former compat layer instead
> of the system calls that take __kernel_timespec and similar arguments.
>
> The temporary redirects for __kernel_timespec, __kernel_itimerspec
> and __kernel_timex can get removed with this.
>
> It would be easy to split this commit by architecture, but with the new
> generated system call tables, it's easy enough to do it all at once,
> which makes it a little easier to check that the changes are the same
> in each table.
>
> Signed-off-by: Arnd Bergmann 

>  arch/m68k/kernel/syscalls/syscall.tbl   | 42 +--

For m68k:
Acked-by: Geert Uytterhoeven 


Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [PATCH v2 26/29] y2038: use time32 syscall names on 32-bit

2019-01-21 Thread Geert Uytterhoeven
Hi Arnd,

On Fri, Jan 18, 2019 at 5:21 PM Arnd Bergmann  wrote:
> This is the big flip, where all 32-bit architectures set COMPAT_32BIT_TIME
> abd use the _time32 system calls from the former compat layer instead

and

> of the system calls that take __kernel_timespec and similar arguments.

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


[PATCH v2 26/29] y2038: use time32 syscall names on 32-bit

2019-01-18 Thread Arnd Bergmann
This is the big flip, where all 32-bit architectures set COMPAT_32BIT_TIME
abd use the _time32 system calls from the former compat layer instead
of the system calls that take __kernel_timespec and similar arguments.

The temporary redirects for __kernel_timespec, __kernel_itimerspec
and __kernel_timex can get removed with this.

It would be easy to split this commit by architecture, but with the new
generated system call tables, it's easy enough to do it all at once,
which makes it a little easier to check that the changes are the same
in each table.

Signed-off-by: Arnd Bergmann 
---
 arch/Kconfig|  2 +-
 arch/arm/kernel/sys_oabi-compat.c   |  8 +-
 arch/arm/tools/syscall.tbl  | 46 ++--
 arch/m68k/kernel/syscalls/syscall.tbl   | 42 +--
 arch/microblaze/kernel/syscalls/syscall.tbl | 46 ++--
 arch/mips/kernel/syscalls/syscall_o32.tbl   | 44 +--
 arch/parisc/kernel/syscalls/syscall.tbl | 69 +++--
 arch/powerpc/kernel/syscalls/syscall.tbl| 82 +++--
 arch/sh/kernel/syscalls/syscall.tbl | 42 +--
 arch/sparc/kernel/syscalls/syscall.tbl  | 64 ++--
 arch/x86/entry/syscalls/syscall_32.tbl  | 44 +--
 arch/xtensa/kernel/syscalls/syscall.tbl | 44 +--
 include/uapi/asm-generic/unistd.h   | 56 +++---
 13 files changed, 335 insertions(+), 254 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 4cfb6de48f79..46db715a7f42 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -759,7 +759,7 @@ config 64BIT_TIME
  handling.
 
 config COMPAT_32BIT_TIME
-   def_bool (!64BIT && 64BIT_TIME) || COMPAT
+   def_bool !64BIT || COMPAT
help
  This enables 32 bit time_t support in addition to 64 bit time_t 
support.
  This is relevant on all 32-bit architectures, and 64-bit architectures
diff --git a/arch/arm/kernel/sys_oabi-compat.c 
b/arch/arm/kernel/sys_oabi-compat.c
index 92ab36f38795..acd054a42ba2 100644
--- a/arch/arm/kernel/sys_oabi-compat.c
+++ b/arch/arm/kernel/sys_oabi-compat.c
@@ -317,10 +317,10 @@ struct oabi_sembuf {
 asmlinkage long sys_oabi_semtimedop(int semid,
struct oabi_sembuf __user *tsops,
unsigned nsops,
-   const struct timespec __user *timeout)
+   const struct old_timespec32 __user *timeout)
 {
struct sembuf *sops;
-   struct timespec local_timeout;
+   struct old_timespec32 local_timeout;
long err;
int i;
 
@@ -350,7 +350,7 @@ asmlinkage long sys_oabi_semtimedop(int semid,
} else {
mm_segment_t fs = get_fs();
set_fs(KERNEL_DS);
-   err = sys_semtimedop(semid, sops, nsops, timeout);
+   err = sys_semtimedop_time32(semid, sops, nsops, timeout);
set_fs(fs);
}
kfree(sops);
@@ -375,7 +375,7 @@ asmlinkage int sys_oabi_ipc(uint call, int first, int 
second, int third,
return  sys_oabi_semtimedop(first,
(struct oabi_sembuf __user *)ptr,
second,
-   (const struct timespec __user 
*)fifth);
+   (const struct old_timespec32 __user 
*)fifth);
default:
return sys_ipc(call, first, second, third, ptr, fifth);
}
diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl
index b54b7f2bc24a..200f4b878a46 100644
--- a/arch/arm/tools/syscall.tbl
+++ b/arch/arm/tools/syscall.tbl
@@ -137,7 +137,7 @@
 121common  setdomainname   sys_setdomainname
 122common  uname   sys_newuname
 # 123 was sys_modify_ldt
-124common  adjtimexsys_adjtimex
+124common  adjtimexsys_adjtimex_time32
 125common  mprotectsys_mprotect
 126common  sigprocmask sys_sigprocmask
 # 127 was sys_create_module
@@ -174,8 +174,8 @@
 158common  sched_yield sys_sched_yield
 159common  sched_get_priority_max  sys_sched_get_priority_max
 160common  sched_get_priority_min  sys_sched_get_priority_min
-161common  sched_rr_get_interval   sys_sched_rr_get_interval
-162common  nanosleep   sys_nanosleep
+161common  sched_rr_get_interval   sys_sched_rr_get_interval_time32
+162common  nanosleep   sys_nanosleep_time32
 163common  mremap  sys_mremap
 164common  setresuid   sys_setresuid16
 165common  getresuid   sys_getresuid16
@@ -190,7 +190,7 @@
 174common  rt_sigactionsys_rt_sigaction
 175common  rt_sigprocmask  sys_rt_sigprocmask
 176common  rt_sigpending   sys_rt_sigpending
-177common