Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754236AbaKXO2p (ORCPT ); Mon, 24 Nov 2014 09:28:45 -0500 Received: from mx3-phx2.redhat.com ([209.132.183.24]:56982 "EHLO mx3-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753717AbaKXO2m (ORCPT ); Mon, 24 Nov 2014 09:28:42 -0500 Date: Mon, 24 Nov 2014 09:28:25 -0500 (EST) From: Pankaj Gupta To: "Michael S. Tsirkin" Cc: David Miller , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, jasowang@redhat.com, dgibson@redhat.com, vfalico@gmail.com, edumazet@google.com, vyasevic@redhat.com, hkchu@google.com, wuzhy@linux.vnet.ibm.com, xemul@parallels.com, therbert@google.com, bhutchings@solarflare.com, xii@google.com, stephen@networkplumber.org, jiri@resnulli.us, sergei shtylyov Message-ID: <1253769917.3166193.1416839305146.JavaMail.zimbra@redhat.com> In-Reply-To: <20141124080243.GD6286@redhat.com> References: <20141123104623.GA31915@redhat.com> <20141123.134323.1154795102254868842.davem@davemloft.net> <20141123203032.GA6286@redhat.com> <20141123.202321.1426718936320546377.davem@davemloft.net> <20141124080243.GD6286@redhat.com> Subject: Re: [PATCH net-net 0/4] Increase the limit of tuntap queues MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.5.82.11] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF23 (Linux)/8.0.6_GA_5922) Thread-Topic: Increase the limit of tuntap queues Thread-Index: vIYOeM7OP9Cnr8TAAAykzd3bW+uYXw== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Sun, Nov 23, 2014 at 08:23:21PM -0500, David Miller wrote: > > From: "Michael S. Tsirkin" > > Date: Sun, 23 Nov 2014 22:30:32 +0200 > > > > > qemu runs in the host, but it's unpriveledged: it gets > > > passed tun FDs by a priveledged daemon, and it only > > > has the rights to some operations, > > > in particular to attach and detach queues. > > > > > > The assumption always was that this operation is safe > > > and can't make kernel run out of resources. > > > > This creates a rather rediculous situation in my opinion. > > > > Configuring a network device is a privileged operation, the daemon > > should be setting this thing up. > > > > In no other context would we have to worry about something like this. > > Right. Jason corrected me. I got it wrong: > what qemu does is TUNSETQUEUE and that needs to get a queue > that's already initialized by the daemon. > > To create new queues daemon calls TUNSETIFF, > and that already can be used to create new devices, > so it's a priveledged operation. > > This means it's safe to just drop the restriction, > exactly as you suggested originally. I will drop patch2 to add sysctl entry and and will send a v2 with other patches. Thanks, Pankaj > -- > MST > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/