From patchwork Thu Jul 6 12:08:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9828103 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 A40D1602BD for ; Thu, 6 Jul 2017 12:13:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94229283A5 for ; Thu, 6 Jul 2017 12:13:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 879A428632; Thu, 6 Jul 2017 12:13:59 +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 3E2E4283A5 for ; Thu, 6 Jul 2017 12:13:58 +0000 (UTC) Received: from localhost ([::1]:51165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dT5fR-0007bE-AG for patchwork-qemu-devel@patchwork.kernel.org; Thu, 06 Jul 2017 08:13:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dT5bb-0005ON-CJ for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dT5bX-0004go-Bc for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:09:59 -0400 Received: from mail-ve1eur01on0121.outbound.protection.outlook.com ([104.47.1.121]:61440 helo=EUR01-VE1-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 1dT5bW-0004gR-Ve for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:09:55 -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=0cxq83tsVcUcPi7kgZ36YlyZ1nCBCIymvuoqjFkrfUs=; b=HigYPKlhDwgC8mGLLb6f/Z5H4U2feDbtc7mGLeAnqUBbXhhpw/52Y4RNi9lnCBn4pOrvPHdG6bQOKWJaINQKEB6d6jOJG9zr8vqV39GE9fr2Hhdvxf2It9PiOk5WMrwZEH+0v0p07e1zGUTWdCGiq3POmCWacBWuwsCawlwijMg= 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 AM5PR0801MB1985.eurprd08.prod.outlook.com (2603:10a6:203:4b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13; Thu, 6 Jul 2017 12:09:47 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Thu, 6 Jul 2017 15:08:51 +0300 Message-ID: <1499342940-56739-5-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499342940-56739-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1499342940-56739-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HK2PR02CA0118.apcprd02.prod.outlook.com (2a01:111:e400:79aa::44) To AM5PR0801MB1985.eurprd08.prod.outlook.com (2603:10a6:203:4b::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3d1594a6-e826-4dae-c411-08d4c467e84d 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:AM5PR0801MB1985; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 3:eoi9fV6WrGgx1bdWOco/KF7gNmYUsYvlTlA03Na6mgqID/WeoqHmisQg8CgPktj3EtQ/Zp3gIHOywvoCQmQTKriCLy/RFTFXWlFBriPkZ7lBVPzd5kAj5jesSzOuozbck4+DvXoYJ2ARnRTzAYVWxVlM23U7AJYIUkoB9Hz5Kl9cjO3wf5ug+2S63rkP/31WWqtGOrqxgo6qCsm7NXNZWwu2sN0j7Wazr8a/nSLQG8d64tpgQmSb4q0HeQPJEpjRqLyShceqmhEpWLsMw2w2+Bath8eh4WOgh6PrnJqu5MyzYUssA4Pw5oW0KFJJp+LwhOwQIbg90IhAP5+zRHWCzkKD/4bfwgOTPLo6AnLiC+vbLg9qTRvf/ENFEFPCSVWw0ZWllaBWVzUU3I3vg2owLsxh61gFV7POzTBryrBxuToxCF2TPavrkrvw8/pa6t9f5VfAhKoVIpgta8xI+9d4tbEWTxiIiTCc3mMCAXwD20qHAgYXr6SLpC7UOHkzEY0enLXtGS8RSywBQfKM69IXb+lu/gx4fEmcON7z7H9nWlNSRVfYlFyOqJ60BHm9FOMcurcsMlHbdz7a7dYf/+bcWTpNw4E/AxZbBZWKBKi30vqZcAdmxltotWbH6XMhO3ApL7ezA6RqFYbhvk4NyxD5OYC9gejcWrLx+gK4BuB3FMqT2FBDAGvv72lI6aEIlBOuxcRBN7BG1meEJDu9kSYJzGZsc7yNxRTISu3cHgEfNlOZJHiSUrz6DXcqKoH2XVuc X-MS-Traffic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C9tOdtdRu1K5bSnNb9R3smdNmF/v99My1ZnzAhPXNqp0OkxmTejES82vn9aWs2g= 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)(2017060910047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0801MB1985; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0801MB1985; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1985; 4:QGpOTwFe21UyWdio7OeRYPLzkNfvYGeop40u8L5b?= =?us-ascii?Q?0JMnj4CLa/+mMMG9yziZLZQXOXONM6x5xOrEUVUqFQqoTWyLo1iHD4K7EIGj?= =?us-ascii?Q?x20cRWwEnypWL3Mvgkihy0qb1CjG0zBPLxw7xUDhuYfUR4HA0dz4Iyq5ibfv?= =?us-ascii?Q?7dDnAM1B+UaEqD6oOwDtRUoYHEdUYnq1Zzbkf2OZwhd0EuzysnEECYOyxhf3?= =?us-ascii?Q?hpTILO2djf+RY6BJUyZQuuTE9uw6yt+DRmml1ZoQkl9PAX0N7F1CNduCLsx4?= =?us-ascii?Q?NHC4DtIs1bQVpp5H6O7AZ4dL2gTRERSpjRpakpLVuEWLtTuhl0DI1znUtGw9?= =?us-ascii?Q?FUBOU84zRYoYEwJ4erdhozY0w/9EMB+zHRXOPioxV0DiUvzdIKfDG0KFU+kE?= =?us-ascii?Q?iryZY98rXENjosOn8bHsr4KPU4Zslk3vqo7jY+GmmDM1Q/3wQraua3Jf/KPL?= =?us-ascii?Q?3kx1SjuqUYWSp+hzbBdsFP1hlgTHxAWwpZrqLzbHCSaFgUq/J9fDM5szRGT0?= =?us-ascii?Q?9bHmX+PFt08z8bkBmhyeiWoAYI6n+MzNfBS1pM67YLPJ75LjFj5iOPTLsaRX?= =?us-ascii?Q?wbdjbYe/zH3cxuHykFTAd+We3r6Wx+zL5KTQ/7/5EnSZtD9WwRwQhS5f9vtr?= =?us-ascii?Q?yF/OT/8jLhLGElYvfvkQyT6d17/B2OS1l15PSMwTM7/9H7/fN/OadQQCrMqy?= =?us-ascii?Q?GS3LWipN0NMnmue4NIW/2kM/wMi+9c9BQGX0XKXTDw/vNpDz649/IZQtHoDf?= =?us-ascii?Q?GIquUT2Z7ZCzc6bs8fZu0W2ZRObRKpcCXfX33WF1kE9IWASbM2kZMuj6beRx?= =?us-ascii?Q?g+Z0OJJHGZD6tQfvLLc1g+E6DdhNGjZDUKG6nIY2HJNPjr6whKiV4GrX5kng?= =?us-ascii?Q?6N2FP89nwy3hA+6ck10PpGycO24VdJ+8r9VSMkIN8KL2gWuhLNS7symaUPRX?= =?us-ascii?Q?tFX7MwasBtA23ihN/lkollUYlupWx9sUacemWnWCcZZDrpcNyHtFANrZvQYM?= =?us-ascii?Q?80XHfp5R5f7Wldkw1/F3dqTMo1U5VOXAYSPKX+7inl7GetBWfXDCYYkaT77C?= =?us-ascii?Q?oRCdU5RQhObx6yJ1rnnuaghhn1fh1xCC8BNmzDmk8l9tPLngddZVsOqe9QGR?= =?us-ascii?Q?JoLUezm8NEKBvweMClIPaNO9Klzwd0XXIAOguzWNKf3vr9z/amHj/M+dIM/t?= =?us-ascii?Q?4spG3VaJPWb0gouAJlPTwSNur0+bDmEeCumy6xaENB2IZ9YuPGjq7L74XsD0?= =?us-ascii?Q?UQeR4/eBexuEDPEIoY8=3D?= X-Forefront-PRVS: 03607C04F0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39400400002)(39840400002)(39410400002)(2870700001)(81166006)(8676002)(36756003)(2351001)(23676002)(50226002)(25786009)(86362001)(50466002)(305945005)(478600001)(5660300001)(189998001)(6116002)(3846002)(7736002)(4326008)(107886003)(38730400002)(66066001)(110136004)(47776003)(2950100002)(53936002)(6666003)(76176999)(6506006)(6512007)(2361001)(6916009)(33646002)(50986999)(42186005)(6486002)(2906002)(53416004); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1985; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1985; 23:uwThEm44+KI5IARqyBbrHc1yqQnCfb5uzI4KQFn?= =?us-ascii?Q?7sbW2g6WzFgkPSv2go/ZSzU4LSqSu0zCjuoXJ+q9b85/4XteB7NjzEp8ItKf?= =?us-ascii?Q?pSIrAEdJ7/SEQGxdS7Wa7c0YgZ5PAqP+8giPd5ZVxXlEbDIZSGCe8Tlki/Cp?= =?us-ascii?Q?V3Lc6X4RMC++R6AsoP6HPag7WErOJWloNR5kE3syKKNQLro+/WQY1MCVawpL?= =?us-ascii?Q?oDvEY9SzoscGY775AO8JqxLclar9nKo35KgX2GpghowHSAFKVu+MdwLxQnYr?= =?us-ascii?Q?jw+AOON9eb/DGhIaQjCKdhuEM6KqMBNKyax1sU2Pk8aQoI1JpInK7+PS407w?= =?us-ascii?Q?5sZ73OfoMqMDN0ceIq4pRCdhYc21Qfa/V8WmHhw1BozXl+xruDESpDHheiMk?= =?us-ascii?Q?xSGLBdgewT40hpwnMNtH0NP7S7o6MdFpnHEwzrZ1h+Goz+S3DwGfN6lGMJYl?= =?us-ascii?Q?C7Sm07DcatiOP7r/ufrxHqpvPCtsr/t1zgqsz2rgTEgKBGT8npQWO8ZAY3fL?= =?us-ascii?Q?Bi02cS3kOUtc8FIBCbvp4h1XlhPXgkJ7ZNl9kCn87RSxHT0yAqWQE16QIGZB?=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ifmJHTn+AOYjmcpgYeOrZJXsnoBuaQYCE1Spyvqr2ZySrN2NjizxiEO52MNw5O4q8+fHMl/KgWRw3UX0wblgtcV4A3lKJvUEYJpW1CQT26lJ6WgsL1YRGwqflwn+j6hCb9yzoRlQE1oXhUWkkg+QiTodTjw5OvYzlb4ZILmI2G0EVBbQJCl+Ck5PdRtNiLfSZHssng8J9mhuUnf259DfCmewvEOiOkEh0C712eag3EWQhfKHl9c= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 20:6S5SgVHoSRsWw+jycwu+HoD39+XeSjFpII4smD61iZAvmNsa62H/2R0B3KwEoQGcrdG10Rr7udLUZdMLgRx/slI3LxcwB+21aq4LsdNnrVEmf0rwcovJxyl12Q1J6SpZWr+WZbIkkzr7BH2RqCw0ker8nMixU1Kf6RRZwDRsm4I= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2017 12:09:47.5574 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1985 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.1.121 Subject: [Qemu-devel] [PATCH v6 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 9f38060..588abed 100644 --- a/include/chardev/char-fe.h +++ b/include/chardev/char-fe.h @@ -46,10 +46,20 @@ void qemu_chr_fe_deinit(CharBackend *b, bool del); * * 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 7054863..de5ba3c 100644 --- a/chardev/char-fe.c +++ b/chardev/char-fe.c @@ -179,9 +179,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_init(CharBackend *b, Chardev *s, Error **errp) { int tag = 0;