All of lore.kernel.org
 help / color / mirror / Atom feed
* [-next] strace tests fail because of "y2038: socket: Add compat_sys_recvmmsg_time64"
@ 2018-12-17 13:06 Heiko Carstens
  2018-12-17 21:40 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Heiko Carstens @ 2018-12-17 13:06 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-next, linux-kernel, linux-s390, Martin Schwidefsky

Hi Arnd,

in linux-next as of today 16 strace self tests fail on s390. I could
bisect this to b136972b063b ("y2038: socket: Add compat_sys_recvmmsg_time64").

The following tests fail:

mmsg.gen.test
clock.gen.test
regex.gen.test
sched.gen.test
trace_fstatfs.gen.test
trace_personality_regex_64.gen.test
trace_fstat.gen.test
trace_personality_32.gen.test
trace_question.gen.test
trace_personality_regex_32.gen.test
trace_personality_64.gen.test
trace_stat.gen.test
trace_statfs.gen.test
trace_lstat.gen.test
trace_stat_like.gen.test
trace_statfs_like.gen.test

If needed the s390 kernel config can be re-created with

make ARCH=s390 performance_defconfig

strace self tests can be reproduced with

> git clone https://gitlab.com/strace/strace.git
> cd strace
> ./bootstrap
> ./configure
> make
> cd tests
> make check


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [-next] strace tests fail because of "y2038: socket: Add compat_sys_recvmmsg_time64"
  2018-12-17 13:06 [-next] strace tests fail because of "y2038: socket: Add compat_sys_recvmmsg_time64" Heiko Carstens
@ 2018-12-17 21:40 ` Arnd Bergmann
  2018-12-17 22:05   ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2018-12-17 21:40 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, linux-s390,
	Martin Schwidefsky

On Mon, Dec 17, 2018 at 2:06 PM Heiko Carstens
<heiko.carstens@de.ibm.com> wrote:
>
> Hi Arnd,
>
> in linux-next as of today 16 strace self tests fail on s390. I could
> bisect this to b136972b063b ("y2038: socket: Add compat_sys_recvmmsg_time64").
>
> The following tests fail:

Hi Heiko,

Thanks for the report and sorry I broke things. I'll have a closer look
tomorrow if I don't find it right away. I suppose the regression was in
native system calls, not the compat syscalls with 31-bit user space,
right?

     Arnd

> mmsg.gen.test
> clock.gen.test
> regex.gen.test
> sched.gen.test
> trace_fstatfs.gen.test
> trace_personality_regex_64.gen.test
> trace_fstat.gen.test
> trace_personality_32.gen.test
> trace_question.gen.test
> trace_personality_regex_32.gen.test
> trace_personality_64.gen.test
> trace_stat.gen.test
> trace_statfs.gen.test
> trace_lstat.gen.test
> trace_stat_like.gen.test
> trace_statfs_like.gen.test
>
> If needed the s390 kernel config can be re-created with
>
> make ARCH=s390 performance_defconfig
>
> strace self tests can be reproduced with
>
> > git clone https://gitlab.com/strace/strace.git
> > cd strace
> > ./bootstrap
> > ./configure
> > make
> > cd tests
> > make check
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [-next] strace tests fail because of "y2038: socket: Add compat_sys_recvmmsg_time64"
  2018-12-17 21:40 ` Arnd Bergmann
@ 2018-12-17 22:05   ` Arnd Bergmann
  2018-12-18  7:56     ` Heiko Carstens
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2018-12-17 22:05 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, linux-s390,
	Martin Schwidefsky

On Mon, Dec 17, 2018 at 10:40 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Mon, Dec 17, 2018 at 2:06 PM Heiko Carstens
> <heiko.carstens@de.ibm.com> wrote:
> >
> > Hi Arnd,
> >
> > in linux-next as of today 16 strace self tests fail on s390. I could
> > bisect this to b136972b063b ("y2038: socket: Add compat_sys_recvmmsg_time64").
> >
> > The following tests fail:
>
> Hi Heiko,
>
> Thanks for the report and sorry I broke things. I'll have a closer look
> tomorrow if I don't find it right away. I suppose the regression was in
> native system calls, not the compat syscalls with 31-bit user space,
> right?

I found a bug in my patch by inspection. Can you try if the patch
below makes it all work (apologies for the garbled whitespace),
I'm considering a rewrite of that function now (to split it into two
again), but want to make sure there isn't another problem in my
original patch.

     Arnd

----
diff --git a/net/socket.c b/net/socket.c
index 3bb2ee083f97..7f9f225d0b6c 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2486,12 +2486,12 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg,
         return -EFAULT;

     if (!timeout && !timeout32)
-        do_recvmmsg(fd, mmsg, vlen, flags, NULL);
+        return do_recvmmsg(fd, mmsg, vlen, flags, NULL);

     datagrams = do_recvmmsg(fd, mmsg, vlen, flags, &timeout_sys);

-    if (!datagrams)
-        return 0;
+    if (datagrams <= 0)
+        return datagrams;

     if (timeout && put_timespec64(&timeout_sys, timeout))
         datagrams = -EFAULT;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [-next] strace tests fail because of "y2038: socket: Add compat_sys_recvmmsg_time64"
  2018-12-17 22:05   ` Arnd Bergmann
@ 2018-12-18  7:56     ` Heiko Carstens
  2018-12-18 15:14       ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Heiko Carstens @ 2018-12-18  7:56 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, linux-s390,
	Martin Schwidefsky

On Mon, Dec 17, 2018 at 11:05:06PM +0100, Arnd Bergmann wrote:
> On Mon, Dec 17, 2018 at 10:40 PM Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > On Mon, Dec 17, 2018 at 2:06 PM Heiko Carstens
> > <heiko.carstens@de.ibm.com> wrote:
> > >
> > > Hi Arnd,
> > >
> > > in linux-next as of today 16 strace self tests fail on s390. I could
> > > bisect this to b136972b063b ("y2038: socket: Add compat_sys_recvmmsg_time64").
> > >
> > > The following tests fail:
> >
> > Hi Heiko,
> >
> > Thanks for the report and sorry I broke things. I'll have a closer look
> > tomorrow if I don't find it right away. I suppose the regression was in
> > native system calls, not the compat syscalls with 31-bit user space,
> > right?

Yes, I was talking about 64 bit native system calls.

> I found a bug in my patch by inspection. Can you try if the patch
> below makes it all work (apologies for the garbled whitespace),
> I'm considering a rewrite of that function now (to split it into two
> again), but want to make sure there isn't another problem in my
> original patch.

With your patch below applied, the tests pass again.

Thanks!

> ----
> diff --git a/net/socket.c b/net/socket.c
> index 3bb2ee083f97..7f9f225d0b6c 100644
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -2486,12 +2486,12 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg,
>          return -EFAULT;
> 
>      if (!timeout && !timeout32)
> -        do_recvmmsg(fd, mmsg, vlen, flags, NULL);
> +        return do_recvmmsg(fd, mmsg, vlen, flags, NULL);
> 
>      datagrams = do_recvmmsg(fd, mmsg, vlen, flags, &timeout_sys);
> 
> -    if (!datagrams)
> -        return 0;
> +    if (datagrams <= 0)
> +        return datagrams;
> 
>      if (timeout && put_timespec64(&timeout_sys, timeout))
>          datagrams = -EFAULT;
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [-next] strace tests fail because of "y2038: socket: Add compat_sys_recvmmsg_time64"
  2018-12-18  7:56     ` Heiko Carstens
@ 2018-12-18 15:14       ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2018-12-18 15:14 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, linux-s390,
	Martin Schwidefsky

On Tue, Dec 18, 2018 at 8:57 AM Heiko Carstens
<heiko.carstens@de.ibm.com> wrote:
>
> On Mon, Dec 17, 2018 at 11:05:06PM +0100, Arnd Bergmann wrote:
> > On Mon, Dec 17, 2018 at 10:40 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > >
> > > On Mon, Dec 17, 2018 at 2:06 PM Heiko Carstens
> > > <heiko.carstens@de.ibm.com> wrote:
> > > >
> > > > Hi Arnd,
> > > >
> > > > in linux-next as of today 16 strace self tests fail on s390. I could
> > > > bisect this to b136972b063b ("y2038: socket: Add compat_sys_recvmmsg_time64").
> > > >
> > > > The following tests fail:
> > >
> > > Hi Heiko,
> > >
> > > Thanks for the report and sorry I broke things. I'll have a closer look
> > > tomorrow if I don't find it right away. I suppose the regression was in
> > > native system calls, not the compat syscalls with 31-bit user space,
> > > right?
>
> Yes, I was talking about 64 bit native system calls.
>
> > I found a bug in my patch by inspection. Can you try if the patch
> > below makes it all work (apologies for the garbled whitespace),
> > I'm considering a rewrite of that function now (to split it into two
> > again), but want to make sure there isn't another problem in my
> > original patch.
>
> With your patch below applied, the tests pass again.

Ok, thanks for testing, I've pushed out the fixed version of that
branch now.

       Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-12-18 15:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-17 13:06 [-next] strace tests fail because of "y2038: socket: Add compat_sys_recvmmsg_time64" Heiko Carstens
2018-12-17 21:40 ` Arnd Bergmann
2018-12-17 22:05   ` Arnd Bergmann
2018-12-18  7:56     ` Heiko Carstens
2018-12-18 15:14       ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.