Received: by 10.213.65.68 with SMTP id h4csp513632imn; Tue, 20 Mar 2018 08:36:32 -0700 (PDT) X-Google-Smtp-Source: AG47ELsJefxDHSAmT3JOM5cqRoMkccKYWg9VDPM9RiqB9KjMJurPpOSgSc0OGdFsJxJg00Rdkn69 X-Received: by 10.99.138.202 with SMTP id y193mr12357483pgd.224.1521560192445; Tue, 20 Mar 2018 08:36:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521560192; cv=none; d=google.com; s=arc-20160816; b=kOjBcDtS8dQPgtLwz2woSTnMsrDaQH2YA7k9TDlOLnh949V+WO4hz+OTElbuInedyl q24j+/fgpNCqpPRVoa3NI/WXI5GRGanhe+i8v6Li3olSN1aL+dRSI/v+CO05EuXFaIkX jH+BUxfSPd7l/eCyMzgExQa8SzegQitBiNZXYHQ9EDcXIiAz3OX+X6qWylBk+JfzCpZv efp6UVIPnMnob23Zlb4jj1m9WEYCFH2c3gI1PGldgqmQXgGCzsEyOWnG2MuVWrISMZuS 3MnKnT9f7kyFcGZs3VmI0g3zy/P0Lrwf6TSvSeToQemMhQTg7idPaQ5Ef1smNWp5lIJi tX9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id:dkim-signature:arc-authentication-results; bh=mR3en/fOf7yht1qe5+DpJaSzSL/oqsX7n0l1Yc18OQQ=; b=uPBQMfudsWHzR5zWVGFJx3rb6PeEKIhz9Atsdk0Qft/JcNd0hGfNThQe5XdT8ae9sC n6kxEJdHKCC18Cm0TSL54OG7bYPO6UVwmVmqq3ljW+YRpjlCSv689GcT6bdQFcjB8ra/ rsUxh3Pvtqtl+mXENQWC9FB/Aj6kC9n+Orwf4UfTNLkCcDI3t1Ulgu4TeX8mtnQjKSTI Da2rsH2OoI8OT9jyQ+5+9EOZNsF4qHl7VcCPs/m3thKEZA/Ar8kLixqreYJN7jcQYmW6 t5s0jXmp4N7T/XoToqHX5VYFohSqxpyyXhJC06aHlauu8q1848DoXtHmNyIC6IFpsfe1 Jk9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=Tbx9MKDm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r29si1311290pgn.386.2018.03.20.08.36.15; Tue, 20 Mar 2018 08:36:32 -0700 (PDT) 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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=Tbx9MKDm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751899AbeCTPew (ORCPT + 99 others); Tue, 20 Mar 2018 11:34:52 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:55922 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751405AbeCTPet (ORCPT ); Tue, 20 Mar 2018 11:34:49 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2KFOil0105796; Tue, 20 Mar 2018 15:34:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : from : mime-version : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=mR3en/fOf7yht1qe5+DpJaSzSL/oqsX7n0l1Yc18OQQ=; b=Tbx9MKDmrVLJg7mR+ySDU5Asipx+GS8X+f4ia5QF9RlQ9s319Aefas3TFb7rCafQyisT Kc++V8tyxGjgn58+/5FFyUch1/KL/eboEMr3MNUnsyzeE3JosiNHCYAYYuyE+nf3yXev 6b1VpeB8FszOP/Gq+AYDq0783Yyd1b0GT8A+G4TdBrIz/o11m14P6uJmB6M/NYjXrJOw jAL2IxTidhv8h6QN6pLXqwZP8CpocWNw7qiaMXMca2uE43h/m4644OmMXq43+zJiT7t5 1J7DcIBPiaB9Dts+MEeO9EWsodBa5GIVuLZbpEVyPklg/vyhcj26YCqOu0GIaHyX4VaT RA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2gu4wqg25e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Mar 2018 15:34:44 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2KFYg3f002970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Mar 2018 15:34:43 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2KFYgOU027812; Tue, 20 Mar 2018 15:34:42 GMT Received: from [10.0.2.223] (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 20 Mar 2018 08:34:42 -0700 Message-ID: <5AB12A0E.2060704@ORACLE.COM> Date: Tue, 20 Mar 2018 17:34:38 +0200 From: Liran Alon User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: David Miller CC: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, idan.brown@ORACLE.COM, yuval.shaia@ORACLE.COM Subject: Re: [PATCH] net: dev_forward_skb(): Scrub packet's per-netns info only when crossing netns References: <1520953642-8145-1-git-send-email-liran.alon@oracle.com> <20180320.104759.796804827689233281.davem@davemloft.net> In-Reply-To: <20180320.104759.796804827689233281.davem@davemloft.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8837 signatures=668693 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803200127 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/03/18 16:47, David Miller wrote: > From: Liran Alon > Date: Tue, 13 Mar 2018 17:07:22 +0200 > >> Before this commit, dev_forward_skb() always cleared packet's >> per-network-namespace info. Even if the packet doesn't cross >> network namespaces. > > There was a lot of discussion about this patch. > > Particularly whether it could potentially break current > users or not. > > If this is resolved and the patch should still be applied, > please repost and the folks involved in this dicussion should > add their ACKs. > > Thanks. > The problem is that I don't think we have reached an agreement. I would be happy to here your opinion on the issue at hand here. I personally don't understand why we should maintain backwards-comparability to this behaviour. How would a user rely on the fact that skb->mark is scrubbed when it is passed between 2 netdevs on the same netns but only when it is passed between very specific netdev type (one of them being veth-peers). This behaviour seems to have been created by mistake. This feature is not documented to user-mode and I don't see why it is legit for the user to rely on it. In addition, even if we do want to maintain backwards-comparability to this behaviour, I think it is enough to have an opt-in flag in /proc/sys/net/core/ that when set to 1 will activate the fix in dev_forward_skb() provided by this patch. That would also be a very simple change to the patch provided here. Do you agree? Or do you think we should have a flag per netdev like suggested in other replies to this thread? Thanks, -Liran