From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: virtio-fs@redhat.com, Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Subject: Re: [Virtio-fs] [PATCH] virtiofsd: Add gettimeofday to the seccomp whitelist
Date: Wed, 31 Jul 2019 17:29:41 +0100 [thread overview]
Message-ID: <20190731162941.GH3203@work-vm> (raw)
In-Reply-To: <20190731150443.GC7363@stefanha-x1.localdomain>
* Stefan Hajnoczi (stefanha@redhat.com) wrote:
> On Tue, Jul 30, 2019 at 05:50:00PM -0400, Masayoshi Mizuma wrote:
> > From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> >
> > When I run fsstress on the virtio filesystem, virtiofsd sometimes
> > exits abnormally because it receives SIGSYS.
> >
> > >From strace:
> > 195852 15:07:47.799331 read(8, "\1\0\0\0\0\0\0\0", 8) = 8 <0.000011>
> > 195852 15:07:47.799379 gettimeofday( <unfinished ...>
> > 195852 15:07:53.354340 <... gettimeofday resumed> <unfinished ...>) = ?
> > 195852 15:07:53.400243 +++ killed by SIGSYS (core dumped) +++
> >
> > That is because virtiofsd calls gettimeofday() system call but
> > the system call isn't in the seccomp whitelist.
> >
> > virtiofsd doesn't call gettimeofday() directly. glib library
> > function may call g_get_current_time() and g_get_current_time()
> > calls the system call.
> >
> > Add gettimeofday() to the seccomp whitelist.
> >
> > Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> > ---
> > contrib/virtiofsd/seccomp.c | 1 +
> > 1 file changed, 1 insertion(+)
>
> Have you checked that your guest is using the vdso gettimeofday()
> implementation? gettimeofday() is implemented in userspace without a
> syscall using vdso to improve performance. If your guest isn't using it
> then performance will be worse. (There is a fallback code path in the
> vdso that invokes the syscall but I'm not sure it is taken in normal
> cases.)
>
> The patch is fine though:
>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Thanks,
Applied.
> _______________________________________________
> Virtio-fs mailing list
> Virtio-fs@redhat.com
> https://www.redhat.com/mailman/listinfo/virtio-fs
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2019-07-31 16:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 21:50 [Virtio-fs] [PATCH] virtiofsd: Add gettimeofday to the seccomp whitelist Masayoshi Mizuma
2019-07-31 15:04 ` Stefan Hajnoczi
2019-07-31 16:29 ` Dr. David Alan Gilbert [this message]
2019-07-31 18:43 ` Masayoshi Mizuma
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=20190731162941.GH3203@work-vm \
--to=dgilbert@redhat.com \
--cc=m.mizuma@jp.fujitsu.com \
--cc=stefanha@redhat.com \
--cc=virtio-fs@redhat.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.