All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-s390 <linux-s390@vger.kernel.org>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: [-next] strace tests fail because of "y2038: socket: Add compat_sys_recvmmsg_time64"
Date: Mon, 17 Dec 2018 23:05:06 +0100	[thread overview]
Message-ID: <CAK8P3a3buLM8aKdN8PATzx_mQqFrrLcJmPjbeiJ8uCzx2GwS2Q@mail.gmail.com> (raw)
In-Reply-To: <CAK8P3a0kLHcfAtVVuVBqwcQJE+qk6LAO9TBJO2Sb2_m6z5cn8g@mail.gmail.com>

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;

  reply	other threads:[~2018-12-17 22:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2018-12-18  7:56     ` Heiko Carstens
2018-12-18 15:14       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK8P3a3buLM8aKdN8PATzx_mQqFrrLcJmPjbeiJ8uCzx2GwS2Q@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.