Received: by 10.223.176.5 with SMTP id f5csp776225wra; Wed, 7 Feb 2018 07:23:00 -0800 (PST) X-Google-Smtp-Source: AH8x226pcst/JylJTA934PhZSP6GUbEhsVHCSr+VnFALTFr1zSAqKX2G9eeMkPTwyHq+QEVH57SP X-Received: by 10.98.18.10 with SMTP id a10mr6409335pfj.140.1518016980796; Wed, 07 Feb 2018 07:23:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518016980; cv=none; d=google.com; s=arc-20160816; b=bXuI2r07LzbxUnE7Gmz2ntUwJ+5I5ctuXlMFc/yUMCk7GxoVXTSptXzBhTrhd+x582 lwyhyl16BJn5SrPnrs14L1onFyi0/O0lvZq2FdYFktsrdJ/H63BlNZgtoV0ZHSfC7Lt6 RHrex0bvEEH1wv0xfX2He7eWLH9rFsWa5w98dMwX5iHX5gLCVDFAD87Fw6cqcH2a1pLT PLnvZhP6UfqNUkIvV/HnJxSjCeogyV9NvKQwgYF6FCMdro6T81AOyi+mxasn8WNDCQZq aSGbC6BtM5Cqx1NTnt2uekD2H73MmP+bDfzaROFFuZbs2/puFBDkBs4Z+0/c7u9y2iv7 ftuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from :arc-authentication-results; bh=FqD+vSr+WwzbfHtP9mI20Y72Bnu5kOR1Qt5BY6Onw5I=; b=bh7nHy1200Xdf1X6wKXhtn52sryjfWkXzkgqpEarO5KM5hnZkql2X3dXW7eOECghjo 4GaSfRrOD7N2vy2CWmDwlJDLA2Jw866iOHFFtd+1dMf4QNTixa552HYs+aX/JL7ZvFVr NrWs4Ukc2bZk+1AhfhNef1dEJAP8gk4W700/pfHNs2Gb0tHVQW+3lPtn1s8IhMuyvUAy UMCo4/LlsCvbRmyeFDdKmSIb7dChhl7KiuLidvvbVAfIy+Ti7iEsxpDcxLZ/rkG4UT+1 OvXQuzosrnRw1j/H3JyXKumsSUMjSduRzyJRl0b27fPLNMTIPCCX2nzNeL+OlrMc8Uha t0fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v32-v6si1221868plg.55.2018.02.07.07.22.46; Wed, 07 Feb 2018 07:23:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754516AbeBGPUu (ORCPT + 99 others); Wed, 7 Feb 2018 10:20:50 -0500 Received: from out02.mta.xmission.com ([166.70.13.232]:59179 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754417AbeBGPUs (ORCPT ); Wed, 7 Feb 2018 10:20:48 -0500 Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1ejRWg-0008K2-69; Wed, 07 Feb 2018 08:20:46 -0700 Received: from 174-19-85-160.omah.qwest.net ([174.19.85.160] helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1ejRWf-0003dV-2N; Wed, 07 Feb 2018 08:20:45 -0700 From: ebiederm@xmission.com (Eric W. Biederman) To: Christian Brauner Cc: Jiri Benc , Christian Brauner , netdev@vger.kernel.org, ktkhai@virtuozzo.com, stephen@networkplumber.org, w.bumiller@proxmox.com, nicolas.dichtel@6wind.com, linux-kernel@vger.kernel.org, dsahern@gmail.com, davem@davemloft.net References: <20180206131902.31937-1-christian.brauner@ubuntu.com> <20180206131902.31937-2-christian.brauner@ubuntu.com> <20180207121925.5fa1e534@redhat.com> <20180207115050.GA29047@gmail.com> Date: Wed, 07 Feb 2018 09:20:32 -0600 In-Reply-To: <20180207115050.GA29047@gmail.com> (Christian Brauner's message of "Wed, 7 Feb 2018 12:50:51 +0100") Message-ID: <878tc4g727.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1ejRWf-0003dV-2N;;;mid=<878tc4g727.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=174.19.85.160;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/GGGNE6/nDe7l2CEUsEXuvcTWt31pMeqs= X-SA-Exim-Connect-IP: 174.19.85.160 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on sa02.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TVD_RCVD_IP,T_TM2_M_HEADER_IN_MSG,XMSubLong autolearn=disabled version=3.4.0 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4989] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa02 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa02 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Christian Brauner X-Spam-Relay-Country: X-Spam-Timing: total 550 ms - load_scoreonly_sql: 0.07 (0.0%), signal_user_changed: 2.9 (0.5%), b_tie_ro: 1.91 (0.3%), parse: 1.17 (0.2%), extract_message_metadata: 24 (4.5%), get_uri_detail_list: 1.89 (0.3%), tests_pri_-1000: 9 (1.6%), tests_pri_-950: 2.2 (0.4%), tests_pri_-900: 1.77 (0.3%), tests_pri_-400: 29 (5.4%), check_bayes: 27 (5.0%), b_tokenize: 10 (1.8%), b_tok_get_all: 7 (1.2%), b_comp_prob: 4.3 (0.8%), b_tok_touch_all: 2.8 (0.5%), b_finish: 0.98 (0.2%), tests_pri_0: 466 (84.8%), check_dkim_signature: 0.86 (0.2%), check_dkim_adsp: 4.8 (0.9%), tests_pri_500: 8 (1.4%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH net 1/1 v3] rtnetlink: require unique netns identifier X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christian Brauner writes: > On Wed, Feb 07, 2018 at 12:19:25PM +0100, Jiri Benc wrote: >> On Tue, 6 Feb 2018 14:19:02 +0100, Christian Brauner wrote: >> > +/* Verify that rtnetlink requests supporting network namespace ids >> > + * do not pass additional properties potentially referring to different >> > + * network namespaces. >> > + */ >> > +static int rtnl_ensure_unique_netns(struct nlattr *tb[], >> > + struct netlink_ext_ack *extack) >> > +{ >> > + /* Requests without network namespace ids have been able to specify >> > + * multiple properties referring to different network namespaces so >> > + * don't regress them. >> > + */ >> > + if (!tb[IFLA_IF_NETNSID]) >> > + return 0; >> >> I agree with Eric that we should enforce this also for the existing >> pid/fd attributes. > > Yes, I would prefer this too but in the Linux spirit of never regressing > userspace I was afraid that there might already be userspace > applications that stick a pid and an fd at the same time into an > rtnetlink request. If we are ok with potentially breaking them then we > should just go for it. It is definitely the cleaner solution. Odds are low that anything does anything so silly. If we accidentally cause a regression then we fix it. Unless you have reason to suspect someone actually does something silly we should be good. Eric