Re: [Y2038] [PATCH v3 3/7] riscv: Delete asm/compat.h

2018-07-12 Thread Christoph Hellwig
On Fri, Jul 06, 2018 at 10:42:43PM -0700, Deepa Dinamani wrote: > riscv does not enable CONFIG_COMPAT in default configurations: > defconfig, allmodconfig and allnoconfig. > Remove the asm/compat.h as it does not seem to add any value to > the architecture without CONFIG_COMPAT. Looks good, Revie

Re: [Y2038] [PATCH v3 1/7] arm64: Make basic compat_* types always available

2018-07-12 Thread Christoph Hellwig
On Fri, Jul 06, 2018 at 10:42:41PM -0700, Deepa Dinamani wrote: > As we repurpose more compat syscalls to be used in non CONFIG_COMPAT > usecases as part of solving y2038, we need to make these basic types > available unconditionally. NAK. Compat code is for foreign ABIs. If this code is going t

Re: [Y2038] [PATCH v3 5/7] time: Add struct __kernel_timex

2018-07-12 Thread Christoph Hellwig
I don't think this patches makes sense without the next one, which actually uses the structure. > +/* CONFIG_64BIT_TIME enables new 64 bit time_t syscalls in the compat path > + * and 32-bit emulation. > + */ Wrong comment style, also the 'compat path is the 32 (or 31 in case of s390) bit emulati

Re: [Y2038] [PATCH v3 6/7] timex: use __kernel_timex internally

2018-07-12 Thread Christoph Hellwig
On Fri, Jul 06, 2018 at 10:42:46PM -0700, Deepa Dinamani wrote: > struct timex is not y2038 safe. > Replace all uses of timex with y2038 safe __kernel_timex. > > Note that struct __kernel_timex is an ABI interface definition. If it actually is an ABI interface it should probably have a different

Re: [Y2038] [PATCH v3 7/7] timex: change syscalls to use struct __kernel_timex

2018-07-12 Thread Christoph Hellwig
On Fri, Jul 06, 2018 at 10:42:47PM -0700, Deepa Dinamani wrote: > struct timex is not y2038 safe. > Switch all the syscall apis to use y2038 safe __kernel_timex. So you switch existing syscalls to use a different structure. If this actually happens to be safe it needs a big explanation in the comm

Re: [Y2038] [PATCH v2 3/7] riscv: Include asm-generic/compat.h

2018-07-12 Thread Christoph Hellwig
On Fri, Jul 06, 2018 at 01:42:46PM +0200, Arnd Bergmann wrote: > We can also rename all the compat syscalls that are now shared > with 32-bit, e.g. using sys_waitid_time32() instead of > compat_sys_waitid(), and that would be consistent with the > new _time64() naming that we are introducing for so

Re: [Y2038] [PATCH v2 3/7] riscv: Include asm-generic/compat.h

2018-07-12 Thread Arnd Bergmann
On Thu, Jul 12, 2018 at 10:32 AM, Christoph Hellwig wrote: > On Fri, Jul 06, 2018 at 01:42:46PM +0200, Arnd Bergmann wrote: >> We can also rename all the compat syscalls that are now shared >> with 32-bit, e.g. using sys_waitid_time32() instead of >> compat_sys_waitid(), and that would be consiste

Re: [Y2038] [PATCH v2 3/7] riscv: Include asm-generic/compat.h

2018-07-12 Thread Geert Uytterhoeven
Hi Arnd, On Fri, Jul 6, 2018 at 1:43 PM Arnd Bergmann wrote: > On Fri, Jul 6, 2018 at 1:56 AM, Deepa Dinamani wrote: > > On Thu, Jul 5, 2018 at 3:21 PM, Christoph Hellwig > > wrote: > >> On Thu, Jul 05, 2018 at 02:36:00PM -0700, Deepa Dinamani wrote: > >>> defconfig, allmodconfig and nomodconf

Re: [Y2038] [PATCH v2 3/7] riscv: Include asm-generic/compat.h

2018-07-12 Thread Arnd Bergmann
On Thu, Jul 12, 2018 at 2:42 PM, Geert Uytterhoeven wrote: > On Fri, Jul 6, 2018 at 1:43 PM Arnd Bergmann wrote: >> On Fri, Jul 6, 2018 at 1:56 AM, Deepa Dinamani >> wrote: >> > On Thu, Jul 5, 2018 at 3:21 PM, Christoph Hellwig >> > wrote: >> >> On Thu, Jul 05, 2018 at 02:36:00PM -0700, Deepa

Re: [Y2038] [PATCH v3 7/7] timex: change syscalls to use struct __kernel_timex

2018-07-12 Thread Arnd Bergmann
On Thu, Jul 12, 2018 at 10:29 AM, Christoph Hellwig wrote: > On Fri, Jul 06, 2018 at 10:42:47PM -0700, Deepa Dinamani wrote: > >> -#ifdef CONFIG_COMPAT >> - >> COMPAT_SYSCALL_DEFINE2(clock_adjtime, clockid_t, which_clock, >> struct compat_timex __user *, utp) >> { >> @@ -118

Re: [Y2038] [PATCH v3 5/7] time: Add struct __kernel_timex

2018-07-12 Thread Arnd Bergmann
On Thu, Jul 12, 2018 at 10:26 AM, Christoph Hellwig wrote: >> +#ifndef CONFIG_64BIT_TIME >> +#define __kernel_timex timex >> +#endif > > using #defines for structs has all kinds of ill effects. Why can't > we aways use __kernel_timex for the in-kernel usage? It's the same thing that Deepa did i