All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH RFC] fzsync: tst_fzsync_pair_wait exit when parent hit accidental break
Date: Tue, 8 Jan 2019 22:07:05 +0800	[thread overview]
Message-ID: <CAEemH2cVdaL15BnwP=+1i2eo-aCU9b=N6Q_KQ3W412GneGcP9g@mail.gmail.com> (raw)
In-Reply-To: <20190108135452.GD30528@rei.lan>

On Tue, Jan 8, 2019, 21:57 Cyril Hrubis <chrubis@suse.cz wrote:

> Hi!
> > For system(rhel7.6, s390x) without __NR_recvmmsg supported, run
> > cve-2016-7117 result in timeout and killed by LTP framework. The
> > root reason is tst_syscall break with cleanup() function calling
> > in this trace path:
> >
> >   tst_syscall(__NR_recvmmsg, ...)
> >     tst_brk()
> >       cleanup()
> >         tst_fzsync_pair_cleanup()
> >           SAFE_PTHREAD_JOIN(pair->thread_b, NULL);
> >
> > cve-2016-7117 hung at here to wait for thread_b send_and_close()
> finishing.
> > But thread_b fall into infinite loop because of tst_fzsync_wait_b without
> > an extra condition to exit. Eventually, test get timeout error like:
> >
> >   cve-2016-7117.c:145: CONF: syscall(-1) __NR_recvmmsg not supported
> >   Test timeouted, sending SIGKILL!
> >   tst_test.c:1125: INFO: If you are running on slow machine, try
> exporting LTP_TIMEOUT_MUL > 1
> >   tst_test.c:1126: BROK: Test killed! (timeout?)
>
> Looks like the complete solution will be more complex, so what about we
> do a simple solution that would make it to the release?
>

Sure, I'm OK to delay the solution.


> We can change the cve-2016-7117 to check if __NR_recvmmsg() is supported
> in the test setup(), then we can avoid this problem to begin with.
>

Feel free to fix in that, thanks!

Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190108/1c4f44ae/attachment.html>

      reply	other threads:[~2019-01-08 14:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04  9:52 [LTP] [PATCH RFC] fzsync: tst_fzsync_pair_wait exit when parent hit accidental break Li Wang
2019-01-04 15:02 ` Richard Palethorpe
2019-01-07  6:51   ` Li Wang
2019-01-07 10:14     ` Richard Palethorpe
2019-01-08  7:01       ` Li Wang
2019-01-08 12:48         ` Richard Palethorpe
2019-01-08 13:54 ` Cyril Hrubis
2019-01-08 14:07   ` Li Wang [this message]

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='CAEemH2cVdaL15BnwP=+1i2eo-aCU9b=N6Q_KQ3W412GneGcP9g@mail.gmail.com' \
    --to=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    /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.