From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, "Brad Smith" <brad@comstyle.com>,
"Kamil Rytarowski" <kamil@netbsd.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Fam Zheng" <fam@euphon.net>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Thomas Huth" <thuth@redhat.com>, "Li Qiang" <liq3ea@163.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] XXX oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure
Date: Mon, 28 Jan 2019 16:05:11 +0100 [thread overview]
Message-ID: <cfa21c5e-5cb5-8996-0712-a6516e50b8aa@redhat.com> (raw)
In-Reply-To: <8f1c2854-fb0a-b8cd-14aa-1b30924f11bf@redhat.com>
On 1/28/19 12:03 PM, Paolo Bonzini wrote:
> On 28/01/19 10:47, Alex Bennée wrote:
>>>
>>> [1] The fix seems https://github.com/openbsd/src/commit/c2a35b387f9d3c
>>> "fcntl(F_SETFL) invokes the FIONBIO and FIOASYNC ioctls internally, so
>>> the memory devices (/dev/null, /dev/zero, etc) need to permit them."
>> I assume set_nonblock is called on more than just these special devices?
>> Is there anyway to check this on OpenBSD or is it just an anonymous fd
>> at this point?
>>
>
> Perhaps on OpenBSD we should just assert that we don't get EBADF?
We get ENODEV for "not a memory device":
19 ENODEV Operation not supported by device.
An attempt was made to apply an inappropriate function to a device,
for example, trying to read a write-only device such as a printer.
I'll respin with your suggestion.
Thanks!
Phil.
next prev parent reply other threads:[~2019-01-28 15:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 19:27 [Qemu-devel] [PATCH 0/3] OpenBSD fixes Philippe Mathieu-Daudé
2019-01-25 19:27 ` [Qemu-devel] [PATCH 1/3] configure: Disable W^X on OpenBSD Philippe Mathieu-Daudé
2019-01-28 8:43 ` Thomas Huth
2019-01-28 10:53 ` Philippe Mathieu-Daudé
2019-01-25 19:27 ` [Qemu-devel] [PATCH 2/3] XXX oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure Philippe Mathieu-Daudé
2019-01-28 6:22 ` Markus Armbruster
2019-01-28 10:55 ` Philippe Mathieu-Daudé
2019-01-28 9:47 ` Alex Bennée
2019-01-28 10:59 ` Philippe Mathieu-Daudé
2019-01-28 11:03 ` Paolo Bonzini
2019-01-28 15:05 ` Philippe Mathieu-Daudé [this message]
2019-01-25 19:27 ` [Qemu-devel] [PATCH 3/3] WIP tests/vm: Run tests on OpenBSD Philippe Mathieu-Daudé
2019-01-28 8:44 ` Thomas Huth
2019-01-28 11:03 ` Philippe Mathieu-Daudé
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=cfa21c5e-5cb5-8996-0712-a6516e50b8aa@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=brad@comstyle.com \
--cc=fam@euphon.net \
--cc=kamil@netbsd.org \
--cc=liq3ea@163.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=thuth@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).