From: Laurent Vivier <laurent@vivier.eu>
To: Riku Voipio <riku.voipio@iki.fi>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Laurent Vivier <laurent@vivier.eu>
Subject: [Qemu-devel] [PATCH v2 2/3] linux-user: support netlink protocol NETLINK_KOBJECT_UEVENT
Date: Sun, 22 May 2016 18:56:20 +0200 [thread overview]
Message-ID: <1463936181-23683-3-git-send-email-laurent@vivier.eu> (raw)
In-Reply-To: <1463936181-23683-1-git-send-email-laurent@vivier.eu>
This is the protocol used by udevd to manage kernel events.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
v2: Check domain before opening socket
linux-user/syscall.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 3f1b2cc..ff63bf5 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2679,7 +2679,8 @@ static abi_long do_socket(int domain, int type, int protocol)
}
if (domain == PF_NETLINK &&
- protocol != NETLINK_ROUTE) {
+ !(protocol == NETLINK_ROUTE ||
+ protocol == NETLINK_KOBJECT_UEVENT)) {
return -EPFNOSUPPORT;
}
@@ -2701,6 +2702,9 @@ static abi_long do_socket(int domain, int type, int protocol)
case NETLINK_ROUTE:
fd_trans_register(ret, &target_netlink_route_trans);
break;
+ case NETLINK_KOBJECT_UEVENT:
+ /* nothing to do: messages are strings */
+ break;
default:
g_assert_not_reached();
}
--
2.5.5
next prev parent reply other threads:[~2016-05-22 16:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-22 16:56 [Qemu-devel] [PATCH v2 0/3] linux-user: netlink support Laurent Vivier
2016-05-22 16:56 ` [Qemu-devel] [PATCH v2 1/3] linux-user: add rtnetlink(7) support Laurent Vivier
2016-06-14 9:34 ` Peter Maydell
2016-06-14 10:03 ` Laurent Vivier
2016-05-22 16:56 ` Laurent Vivier [this message]
2016-05-22 16:56 ` [Qemu-devel] [PATCH v2 3/3] linux-user: add netlink audit Laurent Vivier
2016-05-24 8:29 ` [Qemu-devel] [PATCH v2 0/3] linux-user: netlink support Riku Voipio
2016-05-24 8:34 ` Peter Maydell
2016-05-24 8:50 ` Laurent Vivier
2016-05-24 8:42 ` Laurent Vivier
2016-05-24 12:05 ` Riku Voipio
2016-05-24 12:54 ` Riku Voipio
2016-05-24 13:08 ` Peter Maydell
2016-05-25 11:06 ` Riku Voipio
2016-05-25 12:31 ` Peter Maydell
2016-05-25 13:25 ` Laurent Vivier
2016-06-02 15:34 ` Laurent Vivier
2016-06-02 15:39 ` Peter Maydell
2016-06-02 15:45 ` Laurent Vivier
2016-06-02 15:49 ` Peter Maydell
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=1463936181-23683-3-git-send-email-laurent@vivier.eu \
--to=laurent@vivier.eu \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/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).