Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1807883imm; Sat, 11 Aug 2018 23:48:50 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzSYguBkrb8nTbIxKgLkKbIJtVuZFRnkWoJ0oGY30T5J7naIUAcjAlmqmPxKT+vOLr7SDQt X-Received: by 2002:a17:902:158b:: with SMTP id m11-v6mr12281853pla.102.1534056530683; Sat, 11 Aug 2018 23:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534056530; cv=none; d=google.com; s=arc-20160816; b=BgL0lelHQ9J2oMb+kRa6cdA4aHPjkVdm3IeMzpAyJGe91CfAA8ZjiJBBTxwwHOV6E7 QDkeGcWoDC03QyTNahxyfd1FyOL6CyP9vMBV5wS5NZSOBATFJt3lUV/7jwdAhwNxfFde ZfpM84zFTMOvJQCN2KaiPwFVivMuy90ta2xEoWzAMTgmRi8gz2hf0pS2VePFQ2hiMZVK 09NV64zLRFPnJe591A82SPLLhs79Y5PG/EeBJUlZfgLZwW6fa93dkJKR12UbGJGeUfCa 5dw2Oa0Ri3vS5fmHAEfLw05jt8+nnRuUl6gZYECAbPaWGojNNP5wFnrF1DvEL/GEPvcu /+tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=RYoD9uHiiMEkr2xrfkk8LsLf93SSCgTzK24kR7iSMek=; b=bouRg62U38i3wrbgx330V0bUwS2s7sPJtfsBLcJ8GJe5JSg9cx4DjnBiu21KmNGO85 lypH7n5P8mAPFQJEuRVNruOnfTXlEOAJ76s7Vd/mi2i0WsjYFMRvf+7ZXRoqYwm8igkX nl4dbyYD0cR5Azu6Y/HZuhtSNlq9hwhRpLtzP9qdU8JAHMPXzo6NEUjoi662orzGvak8 +Idf9rU52xQchHCKgNIOW9LeV5XB0Mi8OP8K8jV21X16UH8OGfZgrb5SeALL018bUGXx vLbFJr4J0tageB6vKmi6JO/+xbJVAtAsOiEOsbovgTx3lrI2ULhGtmoNfD7oCLsYotqW 4Z8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=Fy0dDe8W; 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=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l26-v6si13193753pfo.325.2018.08.11.23.48.35; Sat, 11 Aug 2018 23:48:50 -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=@virtuozzo.com header.s=selector1 header.b=Fy0dDe8W; 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=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727733AbeHLJYI (ORCPT + 99 others); Sun, 12 Aug 2018 05:24:08 -0400 Received: from mail-ve1eur01on0127.outbound.protection.outlook.com ([104.47.1.127]:63842 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726773AbeHLJYI (ORCPT ); Sun, 12 Aug 2018 05:24:08 -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:X-MS-Exchange-SenderADCheck; bh=RYoD9uHiiMEkr2xrfkk8LsLf93SSCgTzK24kR7iSMek=; b=Fy0dDe8W4LK0XGIOlxdfo/+NPay+mTqc1Cll/avF7azPWzUq7vici8mRD1UoP8PIC6SJFWcgIgE6vCK4eRhMevuxE35sToGjj+vnmQlVHioWK3WfeGpDe9yNxnu3bt72oQbdSy5q2ZXLV2uEax0/r3hJgvEeQJ79gvpfiFiUHvY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=vvs@virtuozzo.com; Received: from [172.16.24.21] (185.231.240.5) by AM6PR08MB3639.eurprd08.prod.outlook.com (2603:10a6:20b:4c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.18; Sun, 12 Aug 2018 06:47:04 +0000 Subject: Re: [RFC/RFT, net-next, 00/17] net: Convert neighbor tables to per-namespace To: dsahern@kernel.org, netdev@vger.kernel.org Cc: nikita.leshchenko@oracle.com, roopa@cumulusnetworks.com, stephen@networkplumber.org, idosch@mellanox.com, jiri@mellanox.com, saeedm@mellanox.com, alex.aring@gmail.com, linux-wpan@vger.kernel.org, netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org, David Ahern References: <20180717120651.15748-1-dsahern@kernel.org> From: Vasily Averin Message-ID: Date: Sun, 12 Aug 2018 09:46:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180717120651.15748-1-dsahern@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: AM4PR0101CA0051.eurprd01.prod.exchangelabs.com (2603:10a6:200:41::19) To AM6PR08MB3639.eurprd08.prod.outlook.com (2603:10a6:20b:4c::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 58309312-6abe-4b06-7857-08d6001f6a62 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:AM6PR08MB3639; X-Microsoft-Exchange-Diagnostics: 1;AM6PR08MB3639;3:+5Ucjgab90eOB0OadkAAhnO12cVbmf2ubrPsWtT6alXKdl3FGGlqLQsPZ5OYrpZaBY5PaTofDyOkzEVOkzJnCzXaH0IKhYEfoImZBgPeKQgfn80GJykmaTXqbM5h3gua15F9HjHB9iDg/pMGp0e2JI/JQZPE6sqwWyrDMtiuvqBlYdq5X/u91cfGKuTsmKDfo6fKGpUKE0YPhGociYbRmVmhOjQOyLWzxWchqseRtASLb4dyH1y4rmC04ClNqGMv;25:e+lUNadjDHUFoq7Uy/+jP4pVRwVF9fuN3iJswIkQPGdfKfNVkQtpjSoP82pQDOdA2x2wYDHfEuJBDnZ/gGLdippSE5UMJ5VSyd/rQB7Rm/+j49RGjsNQKbL655SJdEaxkocAJKE1OdkG858PnjVl9Zx79lm9xLJMzwN2ROvOm0X94XAZpjBSJRCxdiGXY8i7rRVvz3UB2SrCM1Ua3RTo3EBia3/GTQtchwj5EPWYTWeYb0Grgf1on4S91eJ0iMv6ae/4ry4xUTN+JO0VTmW/gtXflPh2Uf92UuAoiYnSgY+iNA0U7Tp9u0CiKlsWcfEYRO+eqTdq6+eCWV+3Nwi9tA==;31:5CPfRhmd2q92FQl6BJQglHaNp4LmHtyujzEmk20drt59Zg6pHczcKwf0rZ0tkpUr/iItuOPAtyHk6LKNyDLcDr1jFkJPSCFF5UZb0+rkIfNFRXofMQjQnojEbz1RYdkrUHf7lIgnByVEcjhzt81jX+74SNYRuxrNkXCe9rJ341MiUDNXtW7d9PJ2QAhfLvtXsNDTKcNpTUgKNlDTj9EPGSXu9X9ZlUXqvWgkxwlrNNA= X-MS-TrafficTypeDiagnostic: AM6PR08MB3639: X-Microsoft-Exchange-Diagnostics: 1;AM6PR08MB3639;20:N1WTGeiFO6tXsaU3SOU/kytPieMez17w++pNKWohe/+tR0uenrWl4hHFErqF4yKmIowXBQzcrHyA/N6vigfLyNa8m/BArdNdOgVUX6vTL5QDC0ss+uTQNUf8yZm4DBk049VZCHFX1ZsJlv+WxMRDSMvvVYAvZmMw9+UCiSRQxLzR/gg1xn6GYUmjR3lmRL4QRG9bnidf2yD7ZvEd0gS6r3pxpPWp0nWiWibuxATcSyaSrYKAMX5UzwQNNpUoOWv8J8PVFhHgbQ+X2XdtTw9MladXrto90+WZTPN9O+H8dQ9yEuP9tG+oALWjyQVyTpuDVo9C+b/AtnASg1+DhkrXl1ZeBq3g6wYI1C9s5m4OLh2pyqYUwu6m7E+Lsyo0TP7ud3DifiVnGWnYH/vvPf3WyG90/Xnusf+0hKr7yHiPzV6/XXZPxcDsTU69oBG9H+qJybRMO/7lEcqz8nHauF4ObFTPYXW4Zc7Zzh1Or6hv/hHC6mKql6ceIYVJp/Z6Y4F5;4:cmxJuVz5iiaIc2ndk7kw6pQuIUm4KwL+jEua0IX6D5dXrjgvD/RQUwvHYIznQFwlz5KMvjgn+aqSktjSHBEUHqr1wSahgvT3x9Cb9LVtwkzwEhuZFJpxglLWlMQ1VlE6SltDurTRDTBlvDI/yBv/RMDhKs6s9uZYNk75XKzan/rbkidMKQ8BIpZyF+bMhOX7XfPu3lxpyX2Yk9BXxPQKtHh27rFGc9Esj4p15lJK0e4sDUYppwQcG9n6SwtJ+Cr6UyjlrBvr7ymmD9wN/3D0iwS1MQ3f+jYnen0ssLUML4H7Y2Td+F2P/IaASajoUDY7dKCTx42vIsuIACmeuz5EuAXLmoh3TumeLJV7NhCLATk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85827821059158)(17755550239193); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016);SRVR:AM6PR08MB3639;BCL:0;PCL:0;RULEID:;SRVR:AM6PR08MB3639; X-Forefront-PRVS: 0762FFD075 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(346002)(39840400004)(366004)(396003)(376002)(136003)(199004)(189003)(8936002)(81166006)(81156014)(8676002)(478600001)(97736004)(7416002)(50466002)(106356001)(2616005)(229853002)(956004)(105586002)(64126003)(86362001)(476003)(6486002)(486006)(31696002)(2906002)(14444005)(31686004)(68736007)(11346002)(446003)(186003)(6666003)(16526019)(58126008)(4326008)(53546011)(6246003)(53936002)(65956001)(316002)(65806001)(386003)(16576012)(66066001)(6116002)(47776003)(23676004)(3846002)(36756003)(65826007)(5660300001)(305945005)(7736002)(26005)(39060400002)(52116002)(2486003)(76176011)(230700001)(77096007)(52146003)(25786009)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:AM6PR08MB3639;H:[172.16.24.21];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTZQUjA4TUIzNjM5OzIzOkdFUWZTT3ZVVk1LbGdkQkw5ekVvM1lqYmRm?= =?utf-8?B?anVDVkx6WmtwZW9YemNmNk5jdms0dHRiQUNoYnIwcEdldFlSZEd4dzBMZU9D?= =?utf-8?B?L0Q3WktrUFVubkFDemFPN3BKWjdqcG1hcmxsbUVaRXJ5Z1Q3Z3NxelBuSUY1?= =?utf-8?B?dzkxWU1BVUxxcjUyQ0kzODZLUkxVdVJhM2FxdHRJOFRxckxKNWFnbXRCNnYz?= =?utf-8?B?cS9RVTJVQ21MMVZKZlRPUnVIZFF0SDhpUWpKRmFxaTU4S3JIOEpLNUFuZjB2?= =?utf-8?B?WTFHeTZVMFdhSzZpQXVSNVBoMkZQVUd5NG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nbM+EEYQWzxqyp2q7NBx2FhcYf3nFKq925sqUf7wPu7NLuS3Dhu19faLbJgkgXsKmjQWdhvWEIlqcfqL/nr2GelcyywihZwn5Eab1Dd5YbQKPH84ijueKWamQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM6PR08MB3639;20:W0CW36E/lGLRQd6BfN8lEt2msqdN0TKuk5DXCB6Xqdi8VsrdRfD8vRutRTK909A2Bip9sDq87F4FbYFO+L/xeVmzL+v5UCi/gxWUIou9wuPdgAANbtOB8OPhU+8z5s+/KEQYZBO+ONddkgWvhQQ7kRHW7zjvlorsvgk7/mQEKss= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2018 06:47:04.0422 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 58309312-6abe-4b06-7857-08d6001f6a62 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3639 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/17/2018 03:06 PM, dsahern@kernel.org wrote: > From: David Ahern > > Nikita Leshenko reported that neighbor entries in one namespace can > evict neighbor entries in another. The problem is that the neighbor > tables have entries across all namespaces without separate accounting > and with global limits on when to scan for entries to evict. > > Resolve by making the neighbor tables for ipv4, ipv6 and decnet per > namespace and making the accounting and threshold limits per namespace. Dear David, I prepared own patch set to fix this problem and found your one. It looks perfect for me, and I hope David Miller will merge it soon, however I have found a few drawbacks: 1) I know that if net_device exist it always have correct net reference, so dev_net(dev) will be always correct. However I afraid that device reference itself is correct in some places. For example, --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c @@ -376,9 +377,10 @@ mlxsw_sp_span_entry_gretap4_parms(const struct net_device *to_dev, return mlxsw_sp_span_entry_unoffloadable(sparmsp); l3edev = mlxsw_sp_span_gretap4_route(to_dev, &saddr.addr4, &gw.addr4); + tbl = ipv4_neigh_table(dev_net(l3edev)); return mlxsw_sp_span_entry_tunnel_parms_common(l3edev, saddr, daddr, gw, tparm.iph.ttl, - &arp_tbl, sparmsp); + tbl, sparmsp); } mlxsw_sp_span_entry_tunnel_parms_common() have "if (!edev)" check inside, so it seems l3edev can be set to NULL here and lead to crash inside dev_net(l3edev). There are few other suspicious places and I think they should be carefully re-checked. 2) modified arp_net_init() does not check return value neigh_sysctl_register() and lacks correct rollback. It was acceptable in arp_init, because it was called only once on boot, but now it will be called for each new net namespace, it can have real chances to fail lead to memory crash/memory corruption. 3) modified neigh_table_init() is called many times per netns but it can panic in case failed memory allocation. I think it should be reworked to return errors in such cases, its callers should check it and add correct rollbacks. 4) currently neigh_table_clear() always return 0, I think it makes sense to change it to return void. Thank you, Vasily Averin