Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp528346pxh; Tue, 9 Nov 2021 14:44:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhOTg+5HnTwyFI3GE1L2YWpJtuCGXNZWVoqdJU2tz9KsH/QfM58NTBbkVh02BuA8jXXmg5 X-Received: by 2002:a17:907:9487:: with SMTP id dm7mr14579637ejc.95.1636497873779; Tue, 09 Nov 2021 14:44:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1636497873; cv=pass; d=google.com; s=arc-20160816; b=FO60JZ5kNNk0hLXxXXH8rhUHGUW18HH3KUgKnQN237JZ3lZF7iYm8AoGWfC852gG2k sAxFjJli0FyR60jyaYQrrY27fqK/IsDeGejt35eE8xT/gPZEgDOSeAVtY33pA4zEdEx1 +aODqmDjSKV9t1vXT/hm9b92bddM3YoHSwrlscM2Q5O7tq33Te68ncJiV+k8pAW4BJj3 f8347O9eGi8jPzlocGjw2ao1qBPqyQsw9BUQxcaX/Wq1v+PyyWIY2BgNCYauCa6HhNz8 1cO7eWUmY7f/PfJVCz4N9HKZ2jOcIKBiViY+oqKMbJ9vL6iuNz854HnXD+8snzNpXMBs JTwg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=t0Af6Rjo+BNXLXWBzjUrga5gQQEeo/zazf40/EAmzN0=; b=Sk0OGamgvrAtUufGCEkXuCrGMeBNlY+F7SBl6lvNN0vtqF/TjRzOnFP+Ep091o7Wr8 eeaB4QZlOz8b8XprvEc2eP/xMj7/M4u5Nt7lv2zXP4bto5/RU0nIC49TGmbD8bSMdFKN zgcbon9AHZk9OZvt9Z0nTKScZRowup8OXx6fOvZfYbUDxMGUkB4Q1YtjqQilNVtwgwLU uEXS+haVvY3ypW3EsfdLSVODFHUJDk7HHSqFlwp2LdGlfeWwb0RZB2VhoMDc5Y4Jc68o ZN4InVr0Z//xdK9phDcR90FZHcMF1y3VUmrQ6Ex0UjCRdsfR2yMIhALxrTKS3FTeMjVM QDhA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=W6BE8MCu; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l12si39369148edb.323.2021.11.09.14.44.07; Tue, 09 Nov 2021 14:44:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=W6BE8MCu; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242255AbhKIS1S (ORCPT + 99 others); Tue, 9 Nov 2021 13:27:18 -0500 Received: from mail-bn8nam08on2088.outbound.protection.outlook.com ([40.107.100.88]:44641 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239510AbhKIS1R (ORCPT ); Tue, 9 Nov 2021 13:27:17 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QyJBt+o8M8nBaJobortA6eIXeCp+V8Cg9jlYnDFNtyVfZZWNqcogmT5QOJxsI3wwfcRa8LVAySwUHPoHBrv+5vuEYZDvsuuex7P1mMw1XMNgzkyTejBbk6TP+gwd1BfN0FmLCvyH2l/krf+SE1zTJXhf7RgRM+CV26Cluf8aJIoPSCto/avPrV4Mw7PzoXjRWgxvyuhr4EoLLy08g+/abWlHdSWVilYDU8Qi9EcB6lexUV+iWjDKPTtbbttot8VYyBR5mVFe0mQlsHdElsC9zrjx7F2ShPrG7d6TYak3jkf6RsY8wY4xE43X7CCkvAyH841VzYkASwpyz1rNIxKmWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=t0Af6Rjo+BNXLXWBzjUrga5gQQEeo/zazf40/EAmzN0=; b=ZEgOaLzO/0g80EVnkmruMNxEpacc7uD/Klo2vylkhBqc/Wihk7Fe6LTCE2nMP0c3OjxtZlBCQ5LXO6R5EQiZQ6g/2LNOH9LpiG/jJSVwM3rkej6xMfvfXThoYJ7VlFrsFBh7R1k/oF/F/NNHG+xwqOmUf3dvzKLZ/3aM8ZvWu+mVXCdcnX56Cc1jg4jPfURit9N4j9Qxv0/tvba+O4/fJbry6pkfsY/voP6HjRKOolLYOYO2py7EljquYsdG1tg1P9+OQkVbIeUogFYP5a0v8lNmgYVUFS4EWOe+yfrO19aST3yeBSRrJDxvxRZxaHmvNsekuwfl6UG18KJmSamKTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t0Af6Rjo+BNXLXWBzjUrga5gQQEeo/zazf40/EAmzN0=; b=W6BE8MCuUBWMwrvkglNQPlY/khyh3K26KyuIgnWpiUd1bqOFBqNgiYkzplG/c7cVi0O9hfVpmGSgNLVa94IN9q0VAG5w2eMMIwCw3Z7oQ496BBruc15p84Zsem0wVJnuiCdscWkez4WNQkLPyH0nFWYA6A2Rrc/11STLutqYhY0dHk7SlWmX4Ey/W0bx6RmOdudB8qGb71CbFCfS+z1nrEZsvaC40rHz/eEsfpgrkYIcjsTubaToUs4hTh438yTVLHKtWgQ5cFTuhJhiRDUzBbEzXN1jp9aMGwN647HwFSi589E8bLbk2zFPIukZilh8R4BCCJAQZyq8Uq2QyO3x6A== Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nvidia.com; Received: from BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) by BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Tue, 9 Nov 2021 18:24:29 +0000 Received: from BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::5897:83b2:a704:7909]) by BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::5897:83b2:a704:7909%7]) with mapi id 15.20.4669.016; Tue, 9 Nov 2021 18:24:29 +0000 Date: Tue, 9 Nov 2021 14:24:27 -0400 From: Jason Gunthorpe To: Jakub Kicinski Cc: Jiri Pirko , Leon Romanovsky , Ido Schimmel , Jiri Pirko , "David S . Miller" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, edwin.peer@broadcom.com Subject: Re: [PATCH net-next] devlink: Require devlink lock during device reload Message-ID: <20211109182427.GJ1740502@nvidia.com> References: <20211108101646.0a4e5ca4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20211108104608.378c106e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20211108153126.1f3a8fe8@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20211109144358.GA1824154@nvidia.com> <20211109070702.17364ec7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20211109153335.GH1740502@nvidia.com> <20211109082042.31cf29c3@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211109082042.31cf29c3@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> X-ClientProxiedBy: BL1PR13CA0284.namprd13.prod.outlook.com (2603:10b6:208:2bc::19) To BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) MIME-Version: 1.0 Received: from mlx.ziepe.ca (142.162.113.129) by BL1PR13CA0284.namprd13.prod.outlook.com (2603:10b6:208:2bc::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.5 via Frontend Transport; Tue, 9 Nov 2021 18:24:28 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mkVnH-007huH-I9; Tue, 09 Nov 2021 14:24:27 -0400 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c688f258-0bfb-41ac-c01b-08d9a3ae2ae5 X-MS-TrafficTypeDiagnostic: BL0PR12MB5506: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aykn5n0J5LKxdW6+vmngan1c5H4bWZBxCSHxDDmjINbRrO1ANSCumdGZha8ZW9Zc1vEwyiK3QFl/i5cIT1IbrxAPCyfAlExT4MQ1/WftpdyDT1xyCb5h0fjuTSt9HVgGOI/vCCxAauztxpA1RMl2Trsd8bLbdChhoQwoqZzA9Fadzl52bhJ4P40eiTAaRnuGOBE6LLVFcTU7a81QApbKIxtIIWMfLwvL9m7dwWtnzZmncsAIfMp9SI+IPpQB+CCm+95J3y4IddxlMhbLAgY35lUb7DF0ZXyehGypJocfbZ66uw85dde/rpaQfG3/6mLCWY9W+jkkvhyHalVqV03WCacnx03GVgVVVfvxSbkQtmvkwBzTSyqlPRIooswQV2j9aHZ7zzk3U5P+MIr7xnq6lwoHrFIfg9EA8IQXwPn7Cg7d1eUuugAHYBQIHYzmdwUf5Pwk11iMu20mUJwyj25cMQS3OcnP8r/1Su1sy7HBU5dvwYEB7a+h0+7rtZyucq1JLmazyndRnBe1Cbt+cc1i+Cp365qbSv3Gi5/c5tNGD00W/lXkNd2HSj+OWMtyz5i3iaIt09g/4rqTxxQuVO6eUmmUIVWjV8xPbuq3ECkGmh6HGB7JMZx9dKKeZwZgV30zwHoLOeQi68WbJx6FLCsPdQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR12MB5506.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(316002)(33656002)(83380400001)(8936002)(2906002)(2616005)(4744005)(66946007)(54906003)(66556008)(66476007)(426003)(6916009)(508600001)(9786002)(9746002)(36756003)(1076003)(86362001)(38100700002)(186003)(5660300002)(8676002)(4326008)(26005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?7pDZT7GXQAm1tmoeMjOI4PKJw3M6PjiVYr4Unv5uE2lXhjv2dHWyLLzg6q7e?= =?us-ascii?Q?EuFKt8wbNFrNFDEwp9HhCNxxXERHfsi4DCXcxMpvppVGmBbx6PL+hI2Fr8A6?= =?us-ascii?Q?d3RMklX0S85rTGopo1E9FjWJ/7orOeMHsk/hTe1xNpv4ZyMdrbkOroG1ydBD?= =?us-ascii?Q?R+aZ0RD0xLYk1/Qz+tW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FVZOpl9NJothfXfo9YwcHgIlLJkWYP+PVV3R3jUJrHtTa4Eme8uXtzIwtl3/?= =?us-ascii?Q?VQZ3V1W+SxXuoNhZQV2pYXSCUEqSq6Lm4pRcvITq6iYXzsy9wFhtijb3PUJy?= =?us-ascii?Q?PZC7gLtUsizXsQdPFNM8D3A95L41AVtF8TgSovZvkC9hnvPwyy3KC3u7o0jK?= =?us-ascii?Q?HDWQ66uPnG34rWwFyV4bJhoqGAzt9/Y1BpbXJMPYTHKfj8DiZjRFqKOzu2vP?= =?us-ascii?Q?aLjgw5kckjBpJSD4lXfTZKgYHPh+XWMFZPHtU6cNS9ebBUY+2qaMovGg/QdJ?= =?us-ascii?Q?ySGQ88Hc3BpxdTz9m46TAyPTSSFM0E5Gghj2ET0V36pGQI0Q0Ckf6wW4FFBs?= =?us-ascii?Q?uPsWhqQZTJxhymjNDu6XqZNk4B8jBvO5dN6HRJd9hrZPD4Q9ufuuaca0iszz?= =?us-ascii?Q?ugAM4ZIm9zMjuk6BYLL0MaH/sxuOdGcaBGE9L1u1fng1gRPf7EnfJanP+9QH?= =?us-ascii?Q?NmElaXWe2yJsvG+p4LM=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: c688f258-0bfb-41ac-c01b-08d9a3ae2ae5 X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB5506.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2021 18:24:29.0526 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: L9Cd/LlriKIVVROYP7yuyOOfvgXOsBIIjsepwokTwnyid/b3IyyVKjneq/zB8Yk3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB5506 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 09, 2021 at 08:20:42AM -0800, Jakub Kicinski wrote: > On Tue, 9 Nov 2021 11:33:35 -0400 Jason Gunthorpe wrote: > > > > I once sketched out fixing this by removing the need to hold the > > > > per_net_rwsem just for list iteration, which in turn avoids holding it > > > > over the devlink reload paths. It seemed like a reasonable step toward > > > > finer grained locking. > > > > > > Seems to me the locking is just a symptom. > > > > My fear is this reload during net ns destruction is devlink uAPI now > > and, yes it may be only a symptom, but the root cause may be unfixable > > uAPI constraints. > > If I'm reading this right it locks up 100% of the time, what is a uAPI > for? DoS? ;) > > Hence my questions about the actual use cases. Removing namespace support from devlink would solve the crasher. I certainly didn't feel bold enough to suggest such a thing :) If no other devlink driver cares about this it is probably the best idea. Jason