From patchwork Wed Jun 8 13:29:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 632255 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rPqGh6zjFz9sDC for ; Wed, 8 Jun 2016 23:36:44 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=K3ddo08r; dkim-atps=neutral Received: from localhost ([::1]:57041 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAdf0-0001Gf-SB for incoming@patchwork.ozlabs.org; Wed, 08 Jun 2016 09:36:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAdZ7-000458-Ms for qemu-devel@nongnu.org; Wed, 08 Jun 2016 09:30:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAdZ2-0005ba-Og for qemu-devel@nongnu.org; Wed, 08 Jun 2016 09:30:37 -0400 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]:36128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAdZ2-0005bW-F2 for qemu-devel@nongnu.org; Wed, 08 Jun 2016 09:30:32 -0400 Received: by mail-lf0-x231.google.com with SMTP id j5so5831689lfb.3 for ; Wed, 08 Jun 2016 06:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VG4psRdPwZnyb7WyIs366AoaDeSVazbsVtbFiRzYK3U=; b=K3ddo08reCijIntqRG1EJumyyweffs9fR/eCMh+p6KK7i4sH5SlCCprS6qSg4kOAA/ +qKBL9VYCaI9yYwZVaqtR0d+owXSiRDzDFEGGHRBN1e8UbsI9n7uLr7+fOrouNIi4Vy0 o4v5cpQ9S9+Rd64lc1sIoHczpyMaieaWPiUuw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VG4psRdPwZnyb7WyIs366AoaDeSVazbsVtbFiRzYK3U=; b=ABCbhS8Lpt6YGYlJDIpGbFzHechDQ9ozft2Rv4uhYnms2d1RHhlN6D3okWX3pEFBj+ I/954nwDdjI1Ek1vYBaoATU/CsVRWveljftsHLTgNheNk2BKwJTj+qXxBhR7XN+pNxwF /5AfvUCgGqQ5+WVLgyu2la9lFagd9Fl9QI1XusuFZJHSs5Otb2rJQLGgh1wjb81MEcf4 qxEmxDhS9wbv4zdQq/tVK657NCLEgKBxRpy2xPn2pKAbFXYPAVg5OY9WZIOD8k/Im/6r /otEIH1GogbJGIIC3cEg5EgT4PzikaFoVhmJJnvauhPZDw/KBkXyLXMMDXXurUIGGkZw 7OqA== X-Gm-Message-State: ALyK8tJul7UOk9Mt+Ko2OiTy5rizoYCqjov2FfWzLrmKMxE485dbzj3u3x3cYd4J97eJFV/n X-Received: by 10.25.214.231 with SMTP id p100mr4719809lfi.92.1465392631708; Wed, 08 Jun 2016 06:30:31 -0700 (PDT) Received: from beaming.home (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id 2sm139854lja.37.2016.06.08.06.30.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jun 2016 06:30:31 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Wed, 8 Jun 2016 16:29:44 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::231 Subject: [Qemu-devel] [PULL 03/44] linux-user: support netlink protocol NETLINK_KOBJECT_UEVENT X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Laurent Vivier This is the protocol used by udevd to manage kernel events. Signed-off-by: Laurent Vivier Signed-off-by: Riku Voipio --- 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 3e4895e..584aecc 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2718,7 +2718,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; } @@ -2740,6 +2741,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(); }