From patchwork Wed Jul 5 14:01:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9826597 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0119D60317 for ; Wed, 5 Jul 2017 14:11:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB5F328504 for ; Wed, 5 Jul 2017 14:11:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFA6828543; Wed, 5 Jul 2017 14:11:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 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 mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1ADA52853F for ; Wed, 5 Jul 2017 14:11:11 +0000 (UTC) Received: from localhost ([::1]:46415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSl1L-0003Qr-4H for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Jul 2017 10:11:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSksx-0004kR-Rg for qemu-devel@nongnu.org; Wed, 05 Jul 2017 10:02:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSkst-0007kF-32 for qemu-devel@nongnu.org; Wed, 05 Jul 2017 10:02:31 -0400 Received: from mail-eopbgr40113.outbound.protection.outlook.com ([40.107.4.113]:64062 helo=EUR03-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSkss-0007gG-Qw for qemu-devel@nongnu.org; Wed, 05 Jul 2017 10:02:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Y/UEtErcjTPv5rIELZsmf4BcHOo1vimpeWU4mtY/gQM=; b=LIxWtC2lM9QdOQqfXq7K209nqXfwQdltnezqIM95V4cSdDYWKRRIS2MGQ2/kTe7lrQUXVo9+Kl/8TwTRRn5YmYJ1qNVAXRUgn3OgZmh+c7+gLd06VN/XrBBgcPIRjuKAFQ451w17sK3HZ9JGjdI/zEDlCHFogXjQRZaiVCzl/5o= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by HE1PR0801MB1996.eurprd08.prod.outlook.com (2603:10a6:3:50::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Wed, 5 Jul 2017 14:02:23 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 17:01:55 +0300 Message-ID: <1499263324-15184-5-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499263324-15184-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1499263324-15184-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR02CA0007.eurprd02.prod.outlook.com (2603:10a6:6:15::20) To HE1PR0801MB1996.eurprd08.prod.outlook.com (2603:10a6:3:50::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c1adb7b4-f480-47f7-55d1-08d4c3ae7662 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:HE1PR0801MB1996; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 3:qPKXqhB8Km8dvldgz9COM44ZQaP8rwfchqRsw8spjzet+0b7TUuek7VRk0ZFGK2rNkDW35xWMKMy+8FVsfV33gi+0ICu58meto4rNLZW3gs8nAKiDPQuvHg086adA+8YtVhDRMa41pLtRPh83dtDWNFEPUZblEkSr9i5GPzHoYaZQQgGCKVCuO23HEfqBZ2PVGfV8wIsqhXfwY8nU1lGFGdDKsnn1Xwq2fPDvNVOTJ45vnjGkrPAC5TjrB2Q3tWOSIpDQVfPQNWtOAv2PfkDcVMC++XaxR6oRVP8HGp9VYuS4kpt85c4+jKdCZDvmRBOssUyHSUZhtPOmheZ2nAM7ky0WaNwMcwnbpVQXFRC31IOiAOtvqr24JtgCEoBXqzAsjloU1E73QdzunZPT/nVL5Zd/qWMZeDNlf/bWCUuvjY1vM/crLZrlm9hGCzvY12toj17LK9DI7H3DZlq1mVkDYLZewknMAL8OXBWSy6LOQOMHXuVcjLvbC1B5j2a+aLkaXvLQsrU6B7tc/iOtEBc+mxrYZ38g/kiAvNfr82Nl76B0/yTO41Kl2uLQyBIKc3HkMPyr50EqezsIz21SjGJjXQGaynOB0qfzGurvWy493LMrgA18Sr0hOXsRM3eB2HK5BQynmuV3KVkynXtPzd0petSelx6cGirQQGt2UkW0d5Q5PsHiauNjBX+09oAQ3GETpary5stIW5ys0H28GMCegf/zZ/anlyrmbfQVtVtnp4k/RRSQ3ZirNz0A89xkF3w X-MS-TrafficTypeDiagnostic: HE1PR0801M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ARad1A= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6041248)(20161123560025)(20161123558100)(20161123562025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0801MB1996; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0801MB1996; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0801MB1996; 4:1eFR3RCYY4DQ5pruQ1c9OOiaSREz3tDVkKdOlzD3?= =?us-ascii?Q?917lG8XFSafV0mFfrZkPnnRIEB4zK5rjVsPHJv+MZCx9cvmAyL+XtYdUQe24?= =?us-ascii?Q?+/jsdxJBf9B50kGZP5KyZXZS2TYTQVFbxnCYiJNNQOjsMjBTIV8WFa/QO459?= =?us-ascii?Q?4RWBr4aRUt/BU4QyvDzZV2z0pvb+nQ5LJ38HPR+6mVGCEO/Txz9Y3LvgRTkA?= =?us-ascii?Q?F/gkHFmRxMjhLCQY9yM0zcSs04hMSEqWEOMOdcF15w2kTRswa2qUyaewoe7R?= =?us-ascii?Q?FwR4eBA4/W+0xVGr+lk9RfeTBFnfdyYjFfdiN5MSzdCnipyt7FF510M4pkQj?= =?us-ascii?Q?eFbkE8bcRtZc4KhzCE7omypm3E2iIm3JD/Pq96YlLp3s03PrWMYxoVGTkAy0?= =?us-ascii?Q?UqLku9m3SWU/gcLPAKfZpRDtL8Vp506HRLIvUbjKYp7VCF1+ycGkNSxBZPWX?= =?us-ascii?Q?YfLHNaMsO90NpH2jUP3crS5LwElfKHazxWAe8vSC1ey7YdSsXoQGXcC+xrTg?= =?us-ascii?Q?hgpgIdr3mk6BwifuTPFa1WS26nAc/7XtMZEdSjEGOgUq7Yhl9sJlEYlBr+HT?= =?us-ascii?Q?V+CTRCFHgpOFDvvsX3JocfgT+YwUn89qZLXmKOFCxAlMMuAQnA7Fi1CEiSyU?= =?us-ascii?Q?qsp5vtV8i6QMCGPZjlRkIXJrBvL6+RI9mKGhXIUnuW34apnHZ3ZVbYvcmS36?= =?us-ascii?Q?IdGUS/RDvHqr7Wocc9nEVqtflD36udOFGrBnDlnoC0/J0XPRKkbUHsfEGpup?= =?us-ascii?Q?Y9Nbar96V3HMz02q1Te57H8yy84GTNmCOEjsIfUkJcOQepLmVIkx8ClfSKxy?= =?us-ascii?Q?SFJCa9lBKAcs9Uq1TsZzgYvaDAwIoPkL16hmOTZi225BjWguQvR6sy5qM11V?= =?us-ascii?Q?HvSgtltvAsEYYSWyFpi6Qt878asGvNxczQI5O7njUAJCU7NEITDdHt3XLd/F?= =?us-ascii?Q?+Udl0hjqcvGuN05iqkmwm/WkDM8KZFInD8REKvaqC9nUxVLCSc35eB4QQQJJ?= =?us-ascii?Q?In1huAEw/b2gy3KHGOGP24bfxkBlW7oH1gtV/2ZNFZTFnkxQH79INQFPKlBf?= =?us-ascii?Q?gMSARuTjA1y55K468O84a4o2yd+/0tdKT08Hi5qr0XPrjR5yD/vrzTOScwda?= =?us-ascii?Q?jP67q9MIELi239OEDtp14YZk6jRmDQ9WhsoLmy58TE0wNUs4VGnUZQPKIQLM?= =?us-ascii?Q?w4XpvWhLv682ue6Mx+FTK55dQ3fEyVauO+xZ6CQj9w46858t4mDNUBmMuw?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0359162B6D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39840400002)(39400400002)(39410400002)(6116002)(3846002)(8676002)(2950100002)(2361001)(6666003)(33646002)(2351001)(53936002)(86362001)(2906002)(38730400002)(107886003)(110136004)(50226002)(42186005)(6512007)(81166006)(4326008)(25786009)(50986999)(478600001)(189998001)(2870700001)(76176999)(5660300001)(6506006)(6486002)(66066001)(50466002)(36756003)(23676002)(7736002)(6916009)(47776003)(305945005)(53416004)(309714004); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0801MB1996; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0801MB1996; 23:EEhMexKs/S6zRWqRh/VI6YU/JplRYgN1UPxPCqX?= =?us-ascii?Q?N/bDO4U6xayL78H7AQk/WGSem0IN5NW6NbGpkZ/30v3Z0uXiT2lfCAcOrmL8?= =?us-ascii?Q?N2BmMpZH/J+fOxvcDznZ0KK3sRR2ZXZFp8kNU21sSNlzlI75KIKSZ2VP/uOH?= =?us-ascii?Q?an+oML9Bofoq+/ntjEd/0zvOCwTA5MRfN9s0EJaltb5f2QNaDzmGJVletDy2?= =?us-ascii?Q?GROAEf1N0b6M/1JSmBQ02AjwsTs0DJmyDJMq3UM7GBLSbKUBjwg3ZdHVx9rp?= =?us-ascii?Q?ipMzTe1pPPX8ZucvJZhcnhkLo5+2eKJ8mJUBS1USfKU0DeS4ZNSTVubz2jJK?= =?us-ascii?Q?TFdHPtJS6+A+zZS3SUcwoA9UeUTt+Iqq3ckHBFfKwsVG/OMwpcfPuT8FBa0N?= =?us-ascii?Q?JqmsH8vF+2cVoX3Ot2jwMCcMggu6iozVe/Hrhp7HaE6FWqvFkQNsALWv2pP/?= =?us-ascii?Q?MRCP6xDh8DPNba8aLAq6w6M2NCyKwY3lwjG53/vKrcIdy0YfIk5dInSB0jWl?= =?us-ascii?Q?DxO5XrCgOWr3nM8LyR1tA4oxa17rriNlHGaIDHXDMOOe7a7Ua6QA7uAlbAgN?= =?us-ascii?Q?I/kjMXs/cW005mziOm83uUMxqHnm+19u4rNS+rFH24WxTLOTSYPFZ+ojHD+3?= =?us-ascii?Q?zF9xiUGOET7DuESDlHZM8Pc1TkfgFX3dUKtUzw9ln8X81vi8CzqwgjyN6WGB?= =?us-ascii?Q?WLyIyvkXgd5+yAx0kKDtbLd+MYT2xoxc2QtiXdSgDbdYA897sag7oe2Q1NzZ?= =?us-ascii?Q?5UhOG7BKzckPjzvXXJChi1jCU8oaxw2IMl4+jQ7oDSZaXjHBw3107j6QrrvA?= =?us-ascii?Q?dmumc3gyxyyLznP64P43m85WzSBvgCotdVCrPjjqg6Cs97gMGMnkgzFVJ77j?= =?us-ascii?Q?xekYxMC/kJ1qsmwxTy3k1o1pJq2tOLJ1sV1vTFvp4B9q0vDXKsUsRWlaVgob?= =?us-ascii?Q?CS27VnhhliyLUg950crdNH06b32IAT5vWeE+//i4L4R3cDzc6vOZ1lDCzox8?= =?us-ascii?Q?XQv5Vmx48spG/+OOfqFsN9BuDorKYCRtBn5A3oNE9ctJlRGHwnn0hRgXdDp+?= =?us-ascii?Q?2TDCs1U5wseM++xa4rjXdg2tB7gAbIKXdNiMquTC7Ga57ihD+tw=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0801MB1996; 6:R3vnHG/6mCoO0I8aiq3nlr0CEMo0fjerxyOFIr+F?= =?us-ascii?Q?F68k7ET4+Wyxsww6SHPr3e0JMHSd3IT64q046sPB4HW2v95CnYs9zXk5aU+q?= =?us-ascii?Q?9PmJMzt5o8muGl0ODzESIe5sRHq/KPqim/nBGoJiONkQlnH/2gapgsNs2etR?= =?us-ascii?Q?0JEy6wzYwLQOHrWaHCfAAGhQD+A9qUC9x8OpXsibNm+EdKR4tDU7KzBTd5W5?= =?us-ascii?Q?qMXqziRd9n146yIVSyb9FJk1Pkr3gj7V6Xh0V8FPrMj0CJBKGw679BsJgzzT?= =?us-ascii?Q?prOX+4D5EtRoj9dTQy+wjX/W+revW0N5evSs+8eI8TGhXSNetgEcS5//ZF2R?= =?us-ascii?Q?XEXsdg5kg/CId3mevuXNx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vathoUPrRyA8SgjAdN86wqXF1R23dd2406/sIfA2lxAG8HllNZ+KmYYNx8wqL8BRYf9W8Jk4xzT+agZSGtQPCF3GI7rV/Dn7r12HjTee4U7BcH6FEdwA4bhaNIFLdqmoWuWvuMCYy4ONvIPLbD9EndYM0mt+CTFB2X6rVE2kuIejXDg5beVwwB9fiLKbp0InDGHj3coRZJs= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 20:i102gKAgFKTos12/FMhTORVS/f3N5+hzjBl6r6Mv89ORDwqJLjxVITvqRMaTU0pJhs86dACUqMrBJJPmptf46owbGzq9fJ4qKq4TSua53o9gtZiz96reqZCTJOgVzFLNHYAUnZtiSPajBfGcnZDY3MTzFSkwrN1tThs+xlblXaw= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2017 14:02:23.2245 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1996 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.4.113 Subject: [Qemu-devel] [PATCH v5 04/13] char: forbid direct chardevice access for hotswap devices 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: Anton Nefedov , den@virtuozzo.com, amit@kernel.org, mst@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP qemu_chr_fe_get_driver() is unsafe, frontends with hotswap support should not access CharDriver ptr directly as CharDriver might change. Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Marc-André Lureau --- include/chardev/char-fe.h | 10 ++++++++++ chardev/char-fe.c | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h index 0314870..385aa99 100644 --- a/include/chardev/char-fe.h +++ b/include/chardev/char-fe.h @@ -63,10 +63,20 @@ bool qemu_chr_fe_connect(CharBackend *b, Chardev *s, Error **errp); * * Returns the driver associated with a CharBackend or NULL if no * associated Chardev. + * Note: avoid this function as the driver should never be accessed directly, + * especially by the frontends that support chardevice hotswap. + * Consider qemu_chr_fe_backend_connected() to check for driver existence */ Chardev *qemu_chr_fe_get_driver(CharBackend *be); /** + * @qemu_chr_fe_backend_connected: + * + * Returns true if there is a chardevice associated with @be. + */ +bool qemu_chr_fe_backend_connected(CharBackend *be); + +/** * @qemu_chr_fe_set_handlers: * @b: a CharBackend * @fd_can_read: callback to get the amount of data the frontend may diff --git a/chardev/char-fe.c b/chardev/char-fe.c index 86a878b..be96fb5 100644 --- a/chardev/char-fe.c +++ b/chardev/char-fe.c @@ -183,9 +183,16 @@ void qemu_chr_fe_printf(CharBackend *be, const char *fmt, ...) Chardev *qemu_chr_fe_get_driver(CharBackend *be) { + /* this is unsafe for the users that support chardev hotswap */ + assert(be->chr_be_change == NULL); return be->chr; } +bool qemu_chr_fe_backend_connected(CharBackend *be) +{ + return !!be->chr; +} + bool qemu_chr_fe_connect(CharBackend *b, Chardev *s, Error **errp) { int tag = 0;