From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 6EFFD11C5 for ; Tue, 15 Dec 2015 17:37:33 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 15 Dec 2015 08:37:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,433,1444719600"; d="scan'208";a="13628615" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 15 Dec 2015 08:37:05 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 15 Dec 2015 08:37:04 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.190]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.28]) with mapi id 14.03.0248.002; Wed, 16 Dec 2015 00:37:02 +0800 From: "Xie, Huawei" To: Pavel Fedin , 'Yuanhan Liu' Thread-Topic: [dpdk-dev] problem vhost-user sockets Thread-Index: AdE3Na1tT9Msc3KgSq64UcxjOtb0PP//kakAgAAEooD//1nq8A== Date: Tue, 15 Dec 2015 16:37:02 +0000 Message-ID: References: <00c101d13735$e85453d0$b8fcfb70$@samsung.com> <20151215140450.GL29571@yliu-dev.sh.intel.com> <00cd01d13743$e1a7c4a0$a4f74de0$@samsung.com> In-Reply-To: <00cd01d13743$e1a7c4a0$a4f74de0$@samsung.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" , 'Ilya Maximets' , 'Dyasly Sergey' Subject: Re: [dpdk-dev] problem vhost-user sockets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2015 16:37:33 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pavel Fedin > Sent: Tuesday, December 15, 2015 10:21 PM > To: 'Yuanhan Liu' > Cc: dev@dpdk.org; 'Ilya Maximets'; 'Dyasly Sergey' > Subject: Re: [dpdk-dev] problem vhost-user sockets >=20 > Hello! >=20 > > I'm thinking you can't simply unlink a file given by a user inside > > a libraray unconditionaly. Say, what if a user gives a wrong socket > > path? Exactly, Yuanhan. The initial thinking is it is the user's responsibility t= o provide a clean running environment and I try to avoid the dpdk app touch= something that others might be using. >=20 > Well... We can improve the security by checking that: >=20 > a) The file exists and it's a socket. > b) Nobody is listening on it. >=20 > > I normally write a short script to handle it automatically. Yes, the same to me. >=20 > I know, you can always hack up some kludges, just IMHO it's not > production-grade solution. What if you are cloud administrator, and > you have 1000 users, each of them using 100 vhost-user interfaces? > List all of them in some script? Too huge job, i would say. > And without it the thing just appears to be too fragile, requiring > manual maintenance after a single stupid failure. Pavel: I totally understand your pain, it also brings trouble to ourselves when de= bugging, but I want to follow the best practice. Btw I don't see the troubl= e with the script here. The users should know clearly where and how to do t= he cleanup. Normally the socket files should all reside in one single direc= tory. For the checking you mentioned above, even the existing file has nobody lis= tening on it, in theory there is no guarantee others might not use it. Of c= ourse, for this specific case, the chance is rare. >>From another point of view, DPDK huge re-creates rte_map files even if it e= xists. :).=20 We are open to this. Let us consider more and gather more comments.=20 >=20 > Kind regards, > Pavel Fedin > Expert Engineer > Samsung Electronics Research center Russia >=20