From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9319D36F8E5 for ; Thu, 21 May 2026 16:01:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.66 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779379306; cv=none; b=gCDpCMxQB1eC5jhHQg7AuUVl04txowb9qbNoTIlEW2LJysVtu/642q/Qt74eAjvRqlwBJDKIhwJHq1c3UFc5EwJZqukt7D1iPBpffBg0p1aQESSYz7nyxJwYVmvqrouFH1SyApI7HDK9GojVxivhvalreugJmF9YQjJbIBgd+lQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779379306; c=relaxed/simple; bh=4zM1ugNCLmNapDX1aXtA0pmcHFvT7iOMdAhWydF0hF8=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=CrDexUW4FD1aQuLwFvHqeNBi9YAlWOx2Px1zzRZEcqeeluZTeHYQIVLgJstsjtiZnsCZPLnML4MvLjTQ8hBudHqvSynoL1E1MjA7XqVkJeGucHN5GV7lJui7eqJrrN+ZYznAhzCOMbsvbUKsVifr8ko1BFBktAyRmZES8vBXMhk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ovn.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.128.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ovn.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f66.google.com with SMTP id 5b1f17b1804b1-48e82c23840so51433845e9.3 for ; Thu, 21 May 2026 09:01:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779379303; x=1779984103; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:cc:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Hb7NHOCqWYUK919ibqoR4LSTe+C7bYY+lOLvabZfEs8=; b=jA+DnR73PDxUkOfoOfo7pmHNZA6Jbwa5Bfpk/Z4kKhGJJ1cRC6pZr8Czfdv/MTpDJP n8Enz4sG1YVgmzDfyK4mbjMYcLjYV/vQTtMquKnQn3THcOvvGKiOXYKgHpu4MU7K9KjE PHuOLIjXntyFO4GoikvA+fOXUkUk5hX+srw64ONo6AH6u+dTFqgDCnlVmT+q5lDc5kM5 R3xjTJOvyBFnz9tDqdF+KfNM3MVFkdIRyPiMMeUQc3lsSi85FV/bWw+6rthUsC9b5gFb H3ks9FhQ3ysxlk63q/JG704vyUADYUPNK2pPtfhOdIBdynFEtCCPPBtz0d1lZ77xNK4C pQGw== X-Forwarded-Encrypted: i=1; AFNElJ+hCPJ9s5I8LJZrWQGDwAf22kUSdI3X5X88n+fcI5son9tLC09p50Ix4KUNSTnpKfcm7tVDi+A=@vger.kernel.org X-Gm-Message-State: AOJu0YyLqQX4HDHjPkVuPL9C4NcbxpYZ4Lgr5BBPfSLdkALaZgDqGtjD RlsLZfqeBw2r5HyG8RWyr78E4pH1V+fbZkxXikaEkrfhrk9f9m+udReS X-Gm-Gg: Acq92OGfIYcJVcMI6RQz99t2kw9rdfxcATPzcuHo2gOrw7GgPnjfT4xpKSyaJWt22iB vt6eujnHRrMGXcuQromoQhqCJKDWWwaAbIH5z2dIPRZ7Qbpvy5Z+0ssca76ckWzXRgxeiCqsBfo JgFeHL2TIg0dVHRau/6hjEbWqVKs/Vz/Y/Iw/QXWk20EhF6WQ43A9AIcjTePgpDIlamkc0GrLVn NdBUJzxGlOzJoffjtxtGfsvqPr/FrydFV4x5AGgLsLPZofT/XuWo+iRCA7qPSEB6pJEsg4PzKDG Yr4zXe26E4L9TGzxHopJhMNbrtyDSMaBQssyvOxfJ6rtFQOU/ay/ca/QzQNY36YmD5FudRzdZC8 Ymh+S8JcFCyXhxNaJo227yGvCtvTwSyeT7fR8AZXwmNEXf4Wvckx3z4ZdJyarvyteX/zaCCEORf CkI8ym8pGyrcrdSIRXU0AVlkxuuBE/UTTw7k6x+wThOpk7tJ728AW0eWc84lhUDuWa1tT/FXOp6 usJ X-Received: by 2002:a05:600c:4818:b0:488:904b:f31 with SMTP id 5b1f17b1804b1-490360bac01mr35583275e9.22.1779379302644; Thu, 21 May 2026 09:01:42 -0700 (PDT) Received: from [192.168.88.241] (89-24-33-222.nat.epc.tmcz.cz. [89.24.33.222]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49033cdcc01sm82691195e9.0.2026.05.21.09.01.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 May 2026 09:01:42 -0700 (PDT) Message-ID: Date: Thu, 21 May 2026 18:01:40 +0200 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: i.maximets@ovn.org, netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Donald Hunter , Shuah Khan , Kuniyuki Iwashima , Kees Cook , Adrian Moreno , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Matteo Perin Subject: Re: [PATCH net v2 2/4] net: netlink: don't set nsid on local notifications To: nicolas.dichtel@6wind.com, Jiri Benc References: <20260520172317.175168-1-i.maximets@ovn.org> <20260520172317.175168-3-i.maximets@ovn.org> <20260521160036.413771e9@griffin> <9e7b7aab-dad4-4b72-87cd-822e67b27afe@6wind.com> Content-Language: en-US From: Ilya Maximets Autocrypt: addr=i.maximets@ovn.org; keydata= xsFNBF77bOMBE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uglGl1ZBxR1uFvbU VXhewCNoviXxkkPk/DanIgYB1nUtkPC+BHkJJYCyf9Kfl33s/bai34aaxkGXqpKv+CInARg3 fCikcHzYYWKaXS6HABEBAAHCwXwEGAEIACYCGwwWIQSH6ZrVEpascJjzbVq59+x3yCm/lgUC Z8H0qQUJDIjuxgAKCRC59+x3yCm/loAdD/wJCOhPp9711J18B9c4f+eNAk5vrC9Cj3RyOusH Hebb9HtSFm155Zz3xiizw70MSyOVikjbTocFAJo5VhkyuN0QJIP678SWzriwym+EG0B5P97h FSLBlRsTi4KD8f1Ll3OT03lD3o/5Qt37zFgD4mCD6OxAShPxhI3gkVHBuA0GxF01MadJEjMu jWgZoj75rCLG9sC6L4r28GEGqUFlTKjseYehLw0s3iR53LxS7HfJVHcFBX3rUcKFJBhuO6Ha /GggRvTbn3PXxR5UIgiBMjUlqxzYH4fe7pYR7z1m4nQcaFWW+JhY/BYHJyMGLfnqTn1FsIwP dbhEjYbFnJE9Vzvf+RJcRQVyLDn/TfWbETf0bLGHeF2GUPvNXYEu7oKddvnUvJK5U/BuwQXy TRFbae4Ie96QMcPBL9ZLX8M2K4XUydZBeHw+9lP1J6NJrQiX7MzexpkKNy4ukDzPrRE/ruui yWOKeCw9bCZX4a/uFw77TZMEq3upjeq21oi6NMTwvvWWMYuEKNi0340yZRrBdcDhbXkl9x/o skB2IbnvSB8iikbPng1ihCTXpA2yxioUQ96Akb+WEGopPWzlxTTK+T03G2ljOtspjZXKuywV Wu/eHyqHMyTu8UVcMRR44ki8wam0LMs+fH4dRxw5ck69AkV+JsYQVfI7tdOu7+r465LUfg== In-Reply-To: <9e7b7aab-dad4-4b72-87cd-822e67b27afe@6wind.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 5/21/26 4:25 PM, Nicolas Dichtel wrote: > Le 21/05/2026 à 16:00, Jiri Benc a écrit : >> On Thu, 21 May 2026 14:36:12 +0200, Nicolas Dichtel wrote: >>> I still don't think that this is the right "fix". The app is broken. Even after >>> this patch, the bug could be easily triggered again by a third party. >>> There is nothing wrong with assigning a self-nsid. It would be a lot more robust >>> for the app to assign itself a self-nsid when it starts. >> >> On the other hand, does the patch break anything in practice (as >> opposed to in theory)? It makes live of several apps simpler, which is >> not a bad goal. > I'm not against the patch, it just look like a workaround. > I'm trying to understand how NETLINK_LISTEN_ALL_NSID is used (in fact, why it is > used if the app doesn't "understand" NSIDs). ovs-vswitchd works with NSIDs of remote ports. So it does understand them, it just doesn't expect the self-referential ones for the local namespace. openvswitch module has a minimal support for cross-namespace operation. Ports can be added to the openvswitch datapath and then moved to a different namespace (it's a little weird use case, but that's beyond the point here). ovs-vswitchd learns new NSIDs of those ports from the openvswitch module and then it can perform a limited set of cross-namespace operations on them and monitor their status changes through notifications on an all-nsid socket. It never learns the NSID of the current local namespace, because all the local ports can be directly accessed and openvswitch module doesn't report an NSID for them, as it's not needed for anything. In the end, ovs-vswitchd knows all the remote NSIDs it needs to know and can recognize them in notifications. But it doesn't know the NSID of it's own local namespace, as the openvswitch module never reports that for local ports and ovs-vswitchd doesn't explicitly check its own NSID. So, local notifications with NSID set get treatment of a notification from some remote namespace that we do not care about. We will be putting changes into ovs-vswitch to work around this issue, simply because it will take time for the kernel patch to propagate to distros. But this code will not be useful for anything except for working around this one specific case and so it would be nice to get rid of it eventually. And it would be nice if future applications didn't need to care about this behavior as well. Having the fix in stable will speed up the process significantly. HTH, Best regards, Ilya Maximets.